This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC/AIX] xm-aix4.h - Remove alloca #pragma
- From: Joel Brobecker <brobecker at gnat dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Andrew Cagney <cagney at redhat dot com>,Peter Schauer <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>,Kevin Buettner <kevinb at redhat dot com>
- Date: Sat, 7 Aug 2004 21:54:07 -0700
- Subject: [RFC/AIX] xm-aix4.h - Remove alloca #pragma
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