This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] fix bfd multi-arch compilation failure
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: <gdb-patches at sourceware dot org>, <binutils at sourceware dot org>
- Date: Wed, 18 Mar 2009 00:26:53 +0100
- Subject: [RFA] fix bfd multi-arch compilation failure
Hi,
I tried to do a compilation of
gdb with --enable-targets=all --enable-64-bits-bfd
on OpenSolaris 2008.11.
I found two problems in bfd directory,
related to uses of alloca without
including <alloca.h>
I added
#include <alloca.h>
garded by #ifdef HAVE_ALLOCA_H
as I suppose that on some systems
alloca is builtin and thus does not require any header.
Is this OK to check in?
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2009-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
* elf32-m68hc1x.c: Add alloca header.
* xsym.c: Ditto.
Index: bfd/elf32-m68hc1x.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.c,v
retrieving revision 1.33
diff -u -p -r1.33 elf32-m68hc1x.c
--- bfd/elf32-m68hc1x.c 12 Mar 2008 08:36:59 -0000 1.33
+++ bfd/elf32-m68hc1x.c 17 Mar 2009 23:18:58 -0000
@@ -20,6 +20,9 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
Index: bfd/xsym.c
===================================================================
RCS file: /cvs/src/src/bfd/xsym.c,v
retrieving revision 1.23
diff -u -p -r1.23 xsym.c
--- bfd/xsym.c 30 Jul 2008 04:34:56 -0000 1.23
+++ bfd/xsym.c 17 Mar 2009 23:18:58 -0000
@@ -23,6 +23,9 @@
#include "xsym.h"
#include "bfd.h"
#include "libbfd.h"
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
#define bfd_sym_close_and_cleanup
_bfd_generic_close_and_clea
nup
#define bfd_sym_bfd_free_cached_info
_bfd_generic_bfd_free_cache
d_info
cvs diff: Diffing bfd/doc
cvs diff: Diffing bfd/hosts
cvs diff: Diffing bfd/po