Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC/AIX] xm-aix4.h - Remove alloca #pragma
@ 2004-08-08  4:54 Joel Brobecker
  2004-08-08  7:39 ` Peter Schauer
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2004-08-08  4:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Cagney, Peter Schauer, Kevin Buettner

config/xm-aix4.h contains the following definition:

| /* The IBM compiler requires this in order to properly compile alloca().  */
| #pragma alloca

I just checked with an IBM C compiler, and indeed, we need this pragma
or the link will fail.  Yuck! Can we solve this problem this way?

   . Add a check in configure to link a program using alloca.
   . If pass, we're done.
   . Try again with #pragma alloca
   . If pass, then define #USE_PRAGMA_ALLOCA, or HAVE_PRAGMA_ALLOCA
     or something like this
   . Some other ways to get alloca???
   . If fail, then abort configure, we need alloca.

Then add something like this in defs:

#ifdef USE_PRAGMA_ALLOCA
#pragma alloca
#endif

-- 
Joel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-08 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-08  4:54 [RFC/AIX] xm-aix4.h - Remove alloca #pragma Joel Brobecker
2004-08-08  7:39 ` Peter Schauer
2004-08-08 12:23   ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox