|
From: | Nick Clifton |
Subject: | Re: [Bug binutils/5146] New: bfd build fails in alloca-conf.h when built without gcc |
Date: | Fri, 12 Oct 2007 17:47:08 +0100 |
User-agent: | Thunderbird 1.5.0.12 (X11/20070718) |
Hi Michael,
When building binutils-2.18 with native cc on hppa-hpux11.11, include/alloca-conf.h fails to correctly include <alloca.h>, or to define 'PTR' when included in bfd/som.c.
Hmm, the problem here, it seems to me, is the alloca-conf.h header using PTR when it is not defined. (It is defined in include/ansidecl.h, but alloca-conf.h does not include that header).
Fixing the bfd configure script so that the system alloca.h is used instead does not seem to me to be sufficient - the problem can still arise in other build directories. So please could you try out the patch below (which fixes the header itself) and let me know if it works for you ?
Cheers Nick Index: include/alloca-conf.h =================================================================== RCS file: /cvs/src/src/include/alloca-conf.h,v retrieving revision 1.1 diff -c -3 -p -r1.1 alloca-conf.h *** include/alloca-conf.h 28 Sep 2000 08:00:54 -0000 1.1 --- include/alloca-conf.h 12 Oct 2007 16:42:35 -0000 *************** *** 12,20 **** # include <alloca.h> # else /* ! defined (HAVE_ALLOCA_H) */ # ifdef __STDC__ ! extern PTR alloca (size_t); # else /* ! defined (__STDC__) */ ! extern PTR alloca (); # endif /* ! defined (__STDC__) */ # endif /* ! defined (HAVE_ALLOCA_H) */ # ifdef _WIN32 --- 12,20 ---- # include <alloca.h> # else /* ! defined (HAVE_ALLOCA_H) */ # ifdef __STDC__ ! extern void * alloca (size_t); # else /* ! defined (__STDC__) */ ! extern char * alloca (); # endif /* ! defined (__STDC__) */ # endif /* ! defined (HAVE_ALLOCA_H) */ # ifdef _WIN32
[Prev in Thread] | Current Thread | [Next in Thread] |