Fix igen build
authorTom Tromey <tromey@adacore.com>
Tue, 4 May 2021 14:45:46 +0000 (08:45 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 4 May 2021 19:19:33 +0000 (13:19 -0600)
The igen build fails for me like:

gcc  -g -O2 -c ../../binutils-gdb/sim/igen/igen.c -o igen/igen.o
In file included from ../../binutils-gdb/sim/igen/igen.c:26:
../../binutils-gdb/sim/igen/lf.h:22:10: fatal error: ansidecl.h: No such file or directory

This patch fixes the problem by arranging for igen to find the
libiberty includes.

This seems slightly hacky to me, because libiberty is not a "build"
library, so it can't be linked against.  However, since igen currently
only includes the header, it seems relatively safe.

2021-05-04  Tom Tromey  <tromey@adacore.com>

* Makefile.in: Rebuild.
* Makefile.am (AM_CPPFLAGS): New variable.

sim/ChangeLog
sim/Makefile.am
sim/Makefile.in

index a26cae9d2d82604ba643f148a909c5b245691241..16bca69cacccf146ea5c1105230ca2ec2c3556df 100644 (file)
@@ -1,3 +1,8 @@
+2021-05-04  Tom Tromey  <tromey@adacore.com>
+
+       * Makefile.in: Rebuild.
+       * Makefile.am (AM_CPPFLAGS): New variable.
+
 2021-05-04  Mike Frysinger  <vapier@gentoo.org>
 
        * m4/sim_ac_toolchain.m4 (SIM_AC_TOOLCHAIN): Define AR_FOR_BUILD and
index a68a964d87a339895e8b68d28ac6de5607fad38f..6696adc304a40b28f575038d2eac516da1658c81 100644 (file)
@@ -35,6 +35,8 @@ CLEANFILES =
 DISTCLEANFILES =
 MOSTLYCLEANFILES = core
 
+AM_CPPFLAGS = -I$(srcroot)/include
+
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS) $(CFLAGS_FOR_BUILD)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
 
index 890adab507216fb873a1be8feff2f40ee708c2f7..5c997b0c1185d25819fe8277c80d5a309ee94982 100644 (file)
@@ -682,6 +682,7 @@ CLEANFILES = testsuite/common/bits-gen testsuite/common/bits32m0.c \
 DISTCLEANFILES = 
 MOSTLYCLEANFILES = core $(am__append_3) site-srcdir.exp testrun.log \
        testrun.sum
+AM_CPPFLAGS = -I$(srcroot)/include
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS) $(CFLAGS_FOR_BUILD)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
 @SIM_ENABLE_IGEN_TRUE@igen_libigen_a_SOURCES = \