home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / 18117 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.7 KB

  1. Xref: sparky comp.sys.sgi:18117 gnu.misc.discuss:4017
  2. Path: sparky!uunet!olivea!sgigate!sgi!quasar.mti.sgi.com!davea
  3. From: davea@quasar.mti.sgi.com (David B.Anderson)
  4. Newsgroups: comp.sys.sgi,gnu.misc.discuss
  5. Subject: Re: makefile for gnu make on SGI
  6. Message-ID: <tmi3iac@sgi.sgi.com>
  7. Date: 17 Dec 92 00:31:32 GMT
  8. Sender: davea@quasar.mti.sgi.com
  9. Organization: Silicon Graphics, Inc.  Mountain View, CA
  10. Lines: 34
  11.  
  12. In article <1992Dec16.224421.2340@microunity.com> brendan@microunity.com (Brendan Eich) writes:
  13. >In comp.sys.sgi, "Stephen E. Bacher" <seb1525@mvs.draper.com> writes:
  14. >| Irix Release 4.0.1 System V (which is where I did the build)
  15. >| appears to have __builtin_alloca, as shown in /usr/include/alloca.h,
  16. >| which is why I used -Dsparc (which doesn't trigger anything else in
  17. >| this particular make).  Is this OK to use, or do I still need to get
  18. >| the GNU alloca?
  19. >
  20. >I think the Irix __builtin_alloca works only in certain contexts.
  21. >Someone should double-check my memory, but I believe you can't
  22. >
  23. >    array[i] = alloca(1024);
  24. >
  25. >nor can you
  26. >
  27. >    call_a_function(alloca(1024));
  28. >
  29. >There may be other restrictions.  If the man page doesn't treat them,
  30. >the release notes may.  Or you could enquire on comp.sys.sgi -- Dave
  31. >Anderson will have the answer.
  32. >
  33. >Rather than worry, I just grabbed gcc alloca.c.
  34. [stuff deleted for brevity]
  35.  
  36. Brendan is quite right.  And it _is_ probably simplest to use gcc alloca.c
  37.  
  38.     call_a_function(alloca(100));
  39. is not portable as I recall, so it is not wise to do it.
  40.  
  41. We've fixed alloca in the compilers for the next major release so
  42. the problems compiling gnu-make with the built-in-alloca should go away.
  43.  
  44. Regards,
  45. [ David B. Anderson             (415)390-4263             davea@sgi.com ]
  46.