* [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* Re: [RFC/AIX] xm-aix4.h - Remove alloca #pragma
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
0 siblings, 1 reply; 3+ messages in thread
From: Peter Schauer @ 2004-08-08 7:39 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, cagney, kevinb
Could you please try to include malloc.h instead ?
> 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
>
--
Peter Schauer Peter.Schauer@mytum.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC/AIX] xm-aix4.h - Remove alloca #pragma
2004-08-08 7:39 ` Peter Schauer
@ 2004-08-08 12:23 ` Mark Kettenis
0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2004-08-08 12:23 UTC (permalink / raw)
To: Peter.Schauer; +Cc: brobecker, gdb-patches, cagney, kevinb
From: Peter Schauer <Peter.Schauer@mytum.de>
Date: Sun, 8 Aug 2004 09:39:25 +0200 (CEST)
Could you please try to include malloc.h instead ?
Including malloc.h is a bad idea. Many modern systems have a #warning
in that file, which would kill -Werror compilation.
Anyway. The whole alloca mess is pretty well sorted out in autoconf.
There is an AC_FUNC_ALLOCA macro and we're calling it in our
configure.in. The necessary glue, include the #pragma alloca is in
defs.h (although it is arranges a little differently than the autoconf
manual suggests). So I really think we can just scrap it.
Mark
^ 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