]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: use build-gnulib with build-time tools [PR sim/30882] users/vapier/sim/gnulib-build
authorMike Frysinger <vapier@gentoo.org>
Sun, 15 Oct 2023 17:13:56 +0000 (22:58 +0545)
committerMike Frysinger <vapier@gentoo.org>
Mon, 1 Jan 2024 23:23:28 +0000 (18:23 -0500)
Some of our build-time tools are fairly complicated and require some
POSIX APIs that the build system doesn't provide.  Leverage the new
build-gnulib tree to provide fallback implementations automatically.

30 files changed:
sim/Makefile.am
sim/Makefile.in
sim/cr16/gencode.c
sim/cr16/local.mk
sim/d10v/gencode.c
sim/d10v/local.mk
sim/igen/filter.c
sim/igen/filter_host.c
sim/igen/gen-engine.c
sim/igen/gen-icache.c
sim/igen/gen-idecode.c
sim/igen/gen-itable.c
sim/igen/gen-model.c
sim/igen/gen-semantics.c
sim/igen/gen-support.c
sim/igen/gen.c
sim/igen/igen.c
sim/igen/ld-cache.c
sim/igen/ld-decode.c
sim/igen/ld-insn.c
sim/igen/lf.c
sim/igen/local.mk
sim/igen/misc.c
sim/igen/table.c
sim/m32c/local.mk
sim/m32c/opc2c.c
sim/m68hc11/gencode.c
sim/m68hc11/local.mk
sim/sh/gencode.c
sim/sh/local.mk

index b42926070dbd0503ed903dcb018286672a3ab4fd..7c20ad70c1f4d1915be2be30e28b6e27f6d2215a 100644 (file)
@@ -20,6 +20,7 @@ ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
 
 GNULIB_PARENT_DIR = ..
 @am__include@ @am__quote@$(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc@am__quote@
+@am__include@ @am__quote@$(GNULIB_PARENT_DIR)/build-$(build)/gnulib/Makefile.gnulib.inc@am__quote@
 
 srccom = $(srcdir)/common
 srcroot = $(srcdir)/..
@@ -66,11 +67,14 @@ AM_CPPFLAGS = \
        $(AM_CPPFLAGS_$(subst -,_,$(@D)_$(@F)))
 
 AM_CPPFLAGS_FOR_BUILD = \
+       $(BUILD_INCGNU) \
+       -I../build-$(build) \
        -I$(srcroot)/include \
        $(SIM_HW_CFLAGS) \
        $(SIM_INLINE)
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
+LIBS_FOR_BUILD = $(BUILD_LIBGNU) $(BUILD_LIBGNU_EXTRA_LIBS)
 
 ## Deps to add to the all-recursive target.  These are built before descending
 ## into any subdirs.
index cc6ee928270281013e6aa7e02fd6b348ba026e15..82cb041f3c585f34bfcbaa1fbba89d7e49e0b7bb 100644 (file)
@@ -980,7 +980,8 @@ bpf_run_OBJECTS = $(am_bpf_run_OBJECTS)
 @SIM_ENABLE_ARCH_cr16_TRUE@    cr16/gencode.$(OBJEXT)
 cr16_gencode_OBJECTS = $(am_cr16_gencode_OBJECTS)
 @SIM_ENABLE_ARCH_cr16_TRUE@cr16_gencode_DEPENDENCIES =  \
-@SIM_ENABLE_ARCH_cr16_TRUE@    cr16/cr16-opc.o
+@SIM_ENABLE_ARCH_cr16_TRUE@    cr16/cr16-opc.o \
+@SIM_ENABLE_ARCH_cr16_TRUE@    $(am__DEPENDENCIES_1)
 am_cr16_run_OBJECTS =
 cr16_run_OBJECTS = $(am_cr16_run_OBJECTS)
 @SIM_ENABLE_ARCH_cr16_TRUE@cr16_run_DEPENDENCIES = cr16/nrun.o \
@@ -998,7 +999,8 @@ cris_rvdummy_OBJECTS = $(am_cris_rvdummy_OBJECTS)
 @SIM_ENABLE_ARCH_d10v_TRUE@    d10v/gencode.$(OBJEXT)
 d10v_gencode_OBJECTS = $(am_d10v_gencode_OBJECTS)
 @SIM_ENABLE_ARCH_d10v_TRUE@d10v_gencode_DEPENDENCIES =  \
-@SIM_ENABLE_ARCH_d10v_TRUE@    d10v/d10v-opc.o
+@SIM_ENABLE_ARCH_d10v_TRUE@    d10v/d10v-opc.o \
+@SIM_ENABLE_ARCH_d10v_TRUE@    $(am__DEPENDENCIES_1)
 am_d10v_run_OBJECTS =
 d10v_run_OBJECTS = $(am_d10v_run_OBJECTS)
 @SIM_ENABLE_ARCH_d10v_TRUE@d10v_run_DEPENDENCIES = d10v/nrun.o \
@@ -1040,7 +1042,7 @@ igen_gen_OBJECTS = $(am_igen_gen_OBJECTS)
 igen_gen_DEPENDENCIES = igen/gen-main.o igen/libigen.a
 am_igen_igen_OBJECTS = igen/igen.$(OBJEXT)
 igen_igen_OBJECTS = $(am_igen_igen_OBJECTS)
-igen_igen_DEPENDENCIES = igen/libigen.a
+igen_igen_DEPENDENCIES = igen/libigen.a $(am__DEPENDENCIES_1)
 am_igen_ld_cache_OBJECTS =
 igen_ld_cache_OBJECTS = $(am_igen_ld_cache_OBJECTS)
 igen_ld_cache_DEPENDENCIES = igen/ld-cache-main.o igen/libigen.a
@@ -1065,7 +1067,8 @@ lm32_run_OBJECTS = $(am_lm32_run_OBJECTS)
 @SIM_ENABLE_ARCH_m32c_TRUE@am_m32c_opc2c_OBJECTS =  \
 @SIM_ENABLE_ARCH_m32c_TRUE@    m32c/opc2c.$(OBJEXT)
 m32c_opc2c_OBJECTS = $(am_m32c_opc2c_OBJECTS)
-m32c_opc2c_LDADD = $(LDADD)
+@SIM_ENABLE_ARCH_m32c_TRUE@m32c_opc2c_DEPENDENCIES =  \
+@SIM_ENABLE_ARCH_m32c_TRUE@    $(am__DEPENDENCIES_1)
 am_m32c_run_OBJECTS =
 m32c_run_OBJECTS = $(am_m32c_run_OBJECTS)
 @SIM_ENABLE_ARCH_m32c_TRUE@m32c_run_DEPENDENCIES = m32c/main.o \
@@ -1077,7 +1080,8 @@ m32r_run_OBJECTS = $(am_m32r_run_OBJECTS)
 @SIM_ENABLE_ARCH_m68hc11_TRUE@am_m68hc11_gencode_OBJECTS =  \
 @SIM_ENABLE_ARCH_m68hc11_TRUE@ m68hc11/gencode.$(OBJEXT)
 m68hc11_gencode_OBJECTS = $(am_m68hc11_gencode_OBJECTS)
-m68hc11_gencode_LDADD = $(LDADD)
+@SIM_ENABLE_ARCH_m68hc11_TRUE@m68hc11_gencode_DEPENDENCIES =  \
+@SIM_ENABLE_ARCH_m68hc11_TRUE@ $(am__DEPENDENCIES_1)
 am_m68hc11_run_OBJECTS =
 m68hc11_run_OBJECTS = $(am_m68hc11_run_OBJECTS)
 @SIM_ENABLE_ARCH_m68hc11_TRUE@m68hc11_run_DEPENDENCIES =  \
@@ -1159,7 +1163,8 @@ rx_run_OBJECTS = $(am_rx_run_OBJECTS)
 @SIM_ENABLE_ARCH_rx_TRUE@      $(am__DEPENDENCIES_4)
 @SIM_ENABLE_ARCH_sh_TRUE@am_sh_gencode_OBJECTS = sh/gencode.$(OBJEXT)
 sh_gencode_OBJECTS = $(am_sh_gencode_OBJECTS)
-sh_gencode_LDADD = $(LDADD)
+@SIM_ENABLE_ARCH_sh_TRUE@sh_gencode_DEPENDENCIES =  \
+@SIM_ENABLE_ARCH_sh_TRUE@      $(am__DEPENDENCIES_1)
 am_sh_run_OBJECTS =
 sh_run_OBJECTS = $(am_sh_run_OBJECTS)
 @SIM_ENABLE_ARCH_sh_TRUE@sh_run_DEPENDENCIES = sh/nrun.o sh/libsim.a \
@@ -1860,10 +1865,12 @@ AM_CPPFLAGS = $(INCGNU) -I$(srcroot) -I$(srcroot)/include -I../bfd \
        -I.. -I$(@D) -I$(srcdir)/$(@D) $(SIM_HW_CFLAGS) $(SIM_INLINE) \
        $(AM_CPPFLAGS_$(subst -,_,$(@D))) $(AM_CPPFLAGS_$(subst \
        -,_,$(@D)_$(@F))) -I$(srcdir)/common -DSIM_TOPDIR_BUILD
-AM_CPPFLAGS_FOR_BUILD = -I$(srcroot)/include $(SIM_HW_CFLAGS) \
-       $(SIM_INLINE) -I$(srcdir)/common
+AM_CPPFLAGS_FOR_BUILD = $(BUILD_INCGNU) -I../build-$(build) \
+       -I$(srcroot)/include $(SIM_HW_CFLAGS) $(SIM_INLINE) \
+       -I$(srcdir)/common
 COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
 LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
+LIBS_FOR_BUILD = $(BUILD_LIBGNU) $(BUILD_LIBGNU_EXTRA_LIBS)
 SIM_ALL_RECURSIVE_DEPS = $(am__append_89)
 SIM_INSTALL_DATA_LOCAL_DEPS = 
 SIM_INSTALL_EXEC_LOCAL_DEPS = $(am__append_30)
@@ -2007,7 +2014,7 @@ igen_libigen_a_SOURCES = \
        igen/gen.c
 
 igen_igen_SOURCES = igen/igen.c
-igen_igen_LDADD = igen/libigen.a
+igen_igen_LDADD = igen/libigen.a $(LIBS_FOR_BUILD)
 igen_filter_SOURCES = 
 igen_filter_LDADD = igen/filter-main.o igen/libigen.a
 igen_gen_SOURCES = 
@@ -2210,7 +2217,7 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_cr16_TRUE@    cr16/table.c
 
 @SIM_ENABLE_ARCH_cr16_TRUE@cr16_gencode_SOURCES = cr16/gencode.c
-@SIM_ENABLE_ARCH_cr16_TRUE@cr16_gencode_LDADD = cr16/cr16-opc.o
+@SIM_ENABLE_ARCH_cr16_TRUE@cr16_gencode_LDADD = cr16/cr16-opc.o $(LIBS_FOR_BUILD)
 @SIM_ENABLE_ARCH_cris_TRUE@AM_CFLAGS_cris_mloopv10f.o = $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE) \
 @SIM_ENABLE_ARCH_cris_TRUE@    $(SIM_CFLAG_WNO_SHADOW_LOCAL)
 @SIM_ENABLE_ARCH_cris_TRUE@AM_CFLAGS_cris_mloopv32f.o = $(SIM_CFLAG_WNO_UNUSED_BUT_SET_VARIABLE)
@@ -2286,7 +2293,7 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_d10v_TRUE@    d10v/table.c
 
 @SIM_ENABLE_ARCH_d10v_TRUE@d10v_gencode_SOURCES = d10v/gencode.c
-@SIM_ENABLE_ARCH_d10v_TRUE@d10v_gencode_LDADD = d10v/d10v-opc.o
+@SIM_ENABLE_ARCH_d10v_TRUE@d10v_gencode_LDADD = d10v/d10v-opc.o $(LIBS_FOR_BUILD)
 @SIM_ENABLE_ARCH_erc32_TRUE@READLINE_SRC = $(srcroot)/readline/readline
 @SIM_ENABLE_ARCH_erc32_TRUE@AM_CPPFLAGS_erc32 = $(READLINE_CFLAGS) \
 @SIM_ENABLE_ARCH_erc32_TRUE@   -DFAST_UART
@@ -2528,6 +2535,7 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_m32c_TRUE@    m32c/r8c.c
 
 @SIM_ENABLE_ARCH_m32c_TRUE@m32c_opc2c_SOURCES = m32c/opc2c.c
+@SIM_ENABLE_ARCH_m32c_TRUE@m32c_opc2c_LDADD = $(LIBS_FOR_BUILD)
 
 # opc2c leaks memory, and therefore makes AddressSanitizer unhappy.  Disable
 # leak detection while running it.
@@ -2625,6 +2633,7 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_m68hc11_TRUE@ m68hc11/m68hc12int.c
 
 @SIM_ENABLE_ARCH_m68hc11_TRUE@m68hc11_gencode_SOURCES = m68hc11/gencode.c
+@SIM_ENABLE_ARCH_m68hc11_TRUE@m68hc11_gencode_LDADD = $(LIBS_FOR_BUILD)
 @SIM_ENABLE_ARCH_mcore_TRUE@nodist_mcore_libsim_a_SOURCES = \
 @SIM_ENABLE_ARCH_mcore_TRUE@   mcore/modules.c
 
@@ -3053,6 +3062,7 @@ testsuite_common_CPPFLAGS = \
 @SIM_ENABLE_ARCH_sh_TRUE@      sh/table.c
 
 @SIM_ENABLE_ARCH_sh_TRUE@sh_gencode_SOURCES = sh/gencode.c
+@SIM_ENABLE_ARCH_sh_TRUE@sh_gencode_LDADD = $(LIBS_FOR_BUILD)
 @SIM_ENABLE_ARCH_v850_TRUE@AM_CPPFLAGS_v850 = -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31
 @SIM_ENABLE_ARCH_v850_TRUE@nodist_v850_libsim_a_SOURCES = \
 @SIM_ENABLE_ARCH_v850_TRUE@    v850/modules.c
@@ -4909,6 +4919,7 @@ uninstall-am: uninstall-armdocDATA uninstall-dtbDATA \
 .PRECIOUS: Makefile
 
 @am__include@ @am__quote@$(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc@am__quote@
+@am__include@ @am__quote@$(GNULIB_PARENT_DIR)/build-$(build)/gnulib/Makefile.gnulib.inc@am__quote@
 
 # Generate target constants for newlib/libgloss from its source tree.
 # This file is shipped with distributions so we build in the source dir.
index b0bb67b63c0b838d5bd1050797b0427fb9fcfba5..dbe1b9e1423e079636c822e786a924a41b55ff2a 100644 (file)
@@ -18,7 +18,7 @@
    along with this program. If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This must come before any other includes.  */
-#include "defs.h"
+#include "gnulib/config.h"
 
 #include <stdio.h>
 #include <ctype.h>
index 10533a46733352ba22bcefa79d6360d62ef3ce36..9eb464f58351cd53a24b59615c7d9894505be553 100644 (file)
@@ -55,7 +55,7 @@ BUILT_SOURCES += %D%/simops.h
 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
 
 %C%_gencode_SOURCES = %D%/gencode.c
-%C%_gencode_LDADD = %D%/cr16-opc.o
+%C%_gencode_LDADD = %D%/cr16-opc.o $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/gencode$(EXEEXT): $(%C%_gencode_OBJECTS) $(%C%_gencode_DEPENDENCIES) %D%/$(am__dirstamp)
index 3a37bac62563f56a5070c690faf97028614b5d12..42d655d39845ecd21b5825ce88674c3cadad8792 100644 (file)
@@ -1,3 +1,6 @@
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include <stdio.h>
 #include <ctype.h>
 #include <limits.h>
index a65635e81ede3ce563b7864a41cb21460dc7a2d1..0a9aa8fe5d5dbaf7c2c98c9d44f96c9cb8caa6ac 100644 (file)
@@ -56,7 +56,7 @@ BUILT_SOURCES += %D%/simops.h
 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
 
 %C%_gencode_SOURCES = %D%/gencode.c
-%C%_gencode_LDADD = %D%/d10v-opc.o
+%C%_gencode_LDADD = %D%/d10v-opc.o $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/gencode$(EXEEXT): $(%C%_gencode_OBJECTS) $(%C%_gencode_DEPENDENCIES) %D%/$(am__dirstamp)
index 71b5482635d0e1c39fcdbceb40bd5a210a2eaab1..2e9ae7900a281da0fdfee7ce298ffc3f00b7c53f 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include <stdio.h>
 #include <string.h>
index ce5aa4b7f959b1eedfa6c86a7199f0cbfb7cbb30..526d6a452e08895ebf7cefa8ab89485c9adb5d70 100644 (file)
@@ -19,6 +19,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include "filter_host.h"
 
 /* Shorten traces by eliminating the directory component to filenames.  */
index 29eb33310230bc2d11080da8fcffd300b7cb704c..83d4292797dff0f059f3cc763c8e85db4e07e1b6 100644 (file)
@@ -19,6 +19,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include "misc.h"
 #include "lf.h"
 #include "table.h"
index 366ba9307d0bd66ac28d5abc964e63ca021c08e5..aa0cd6685fe27abbef8502c46c0f1d725301f50a 100644 (file)
@@ -19,6 +19,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include <stdlib.h>
 
 #include "misc.h"
index 0059c1c2ee1029e23a712ea8ddd9f62645517838..d6be10be86b218699d3b43b3b9381e56cd76396e 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index bea06e861e20f48324df8eef5ef9a59ca9f45caa..c13307bcab3f99b1ee154e34ef5d1cdea9eda7b9 100644 (file)
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 31f56bc45f30be845476fdc871fa4e1e3f5287a2..3731a2eec61a04e4c963563339a877fb4bc2b7d8 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 455702973e4b201206f8657a861e0cdfa49158ab..b216347cfe96bf999109bdbb380bdfaf0c5e8518 100644 (file)
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 63b29324c4b196eb53c294493d2803ab2c3a52be..78ace2084fc80874e39f2ddf59d50e81b90f4c48 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 2176b603fc59001416c96187c52cd508d7bbedc3..ac4ca6b01d629d42e57a004095a4e67f35bff717 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index b9919a9d80c1a31968ad923e8a2261e19308b7b7..eaf69b9982f7a53c175310c16896920e05ec7c18 100644 (file)
@@ -19,6 +19,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include <getopt.h>
 #include <stdlib.h>
 
index 3c00f3443b7d77908fb1eae8e07736e7d064f5c7..b5f5b9ded855d969637f2de1cc592e3f9922575d 100644 (file)
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 6edd7c8ec3d6bb2d6770ced2ad2adcc18ee62fe6..ad0e64f58c7fb74038aa41ea9800511e405c52f8 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
 /* load the opcode stat structure */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include "misc.h"
 #include "lf.h"
 #include "table.h"
index af639df7c0ae59124a2dbf945cabdf024ad776e8..fa5b46bcf15cf1d26079577fe2e2c3d4237fe7ff 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include "misc.h"
 #include "lf.h"
index 46b1f6b59ec9403bca38c68d80793c40ab99ce61..e664fbc4627826e4337ea74c9794ac64ec993c3e 100644 (file)
@@ -19,6 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include <stdbool.h>
 #include <stdio.h>
index f4487a89d3b92d4456598256b347ffc26555e2a2..f9a2cf88755c8a15e7fc5b1dc69694f3280b2526 100644 (file)
@@ -47,7 +47,7 @@ EXTRA_LIBRARIES += %D%/libigen.a
        %D%/gen.c
 
 %C%_igen_SOURCES = %D%/igen.c
-%C%_igen_LDADD = %D%/libigen.a
+%C%_igen_LDADD = %D%/libigen.a $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/libigen.a: $(igen_libigen_a_OBJECTS) $(igen_libigen_a_DEPENDENCIES) $(EXTRA_igen_libigen_a_DEPENDENCIES) %D%/$(am__dirstamp)
index fface6f66d5abe114db81a2565e08b28a2c7ad8d..e949b6cb87514a0cbf70694e3d5a7fc9c61bbda5 100644 (file)
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include <stdio.h>
 #include <stdarg.h>
index fdca9cb325546255b3a8c80e330df5c81d1e87ce..d5c7068bce11d53491b107309b5d0b9d74951e26 100644 (file)
@@ -19,7 +19,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
index 39620b5ce2f2b43515b0a71972ded0ced2e59044..f8efd074b9bc04647442c840db7027018d7f7230 100644 (file)
@@ -61,6 +61,7 @@ noinst_PROGRAMS += %D%/run
 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
 
 %C%_opc2c_SOURCES = %D%/opc2c.c
+%C%_opc2c_LDADD = $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/opc2c$(EXEEXT): $(%C%_opc2c_OBJECTS) $(%C%_opc2c_DEPENDENCIES) %D%/$(am__dirstamp)
index 113e39072abe6717e8a78ca058391d8655a1ed6f..1b2b13379a50c3ea7db4a0e2c28c2a84121a2288 100644 (file)
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This must come before any other includes.  */
-#include "defs.h"
+#include "gnulib/config.h"
 
 #include <stdio.h>
 #include <string.h>
index 4e507701b9d0d53b79b30eefbf98b3335e99296b..4862a6dd7a73de8c4ddb43fb30c0cf4dc4bb0e10 100644 (file)
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* This must come before any other includes.  */
-#include "defs.h"
+#include "gnulib/config.h"
 
 #include <stdio.h>
 #include <stdlib.h>
index 36c503e3bd8881961c99df4ab34a0a43fe89b6e0..1ec60d701ff0d3c50e3bc8b26a7313765b8ae144 100644 (file)
@@ -71,6 +71,7 @@ noinst_PROGRAMS += %D%/run
 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
 
 %C%_gencode_SOURCES = %D%/gencode.c
+%C%_gencode_LDADD = $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/gencode$(EXEEXT): $(%C%_gencode_OBJECTS) $(%C%_gencode_DEPENDENCIES) %D%/$(am__dirstamp)
index c121d53bb40b350b3cf8204770aaa83745fda156..99b02253b946a1965bf4b02f32190f96a635a941 100644 (file)
@@ -30,6 +30,9 @@
 
 */
 
+/* This must come before any other includes.  */
+#include "gnulib/config.h"
+
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
index 6cbd3a7f1581bc9dbfd468eeec4013d343eb8b61..0d8a28a9db46db9962fd55babcae41d88eb0f5c3 100644 (file)
@@ -57,6 +57,7 @@ BUILT_SOURCES += \
 %D%/modules.c: | $(%C%_BUILD_OUTPUTS)
 
 %C%_gencode_SOURCES = %D%/gencode.c
+%C%_gencode_LDADD = $(LIBS_FOR_BUILD)
 
 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
 %D%/gencode$(EXEEXT): $(%C%_gencode_OBJECTS) $(%C%_gencode_DEPENDENCIES) %D%/$(am__dirstamp)