Compare commits

...

3 Commits

Author SHA1 Message Date
Mike Frysinger
024a2b53b5 sim: use build-gnulib with build-time tools [PR sim/30882]
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.
2024-01-01 18:23:28 -05:00
Mike Frysinger
bf53e171b5 gnulib: enable a --build setup for sim [PR sim/30882]
The sim tree has some build-time programs for generating source files
that are a bit complicated and expect a POSIX-compatible system.  Use
the existing gnulib project to provide missing APIs.
2024-01-01 18:23:28 -05:00
Mike Frysinger
ba0eff81c4 gnulib: support building for --build [PR sim/30882]
The sim tree has some build-time programs for generating source files
that are a bit complicated and expect a POSIX-compatible system.  But
some targets (e.g. mingw) might not provide up-to-date support.  Since
we already have gnulib in the tree, leverage that to also build for
the --build system.

The top-level configure logic will pass down --with-build-subdir when
the subdir is built for it.  Use that to adjust the output variable
names and paths.  This allows us to include the gnulib makefile frags
for both --host and --build simultaneously.
2024-01-01 18:23:28 -05:00
39 changed files with 216 additions and 42 deletions

View File

@@ -27,6 +27,7 @@ AutoGen definitions Makefile.tpl;
build_modules= { module= libiberty; };
build_modules= { module= bison; };
build_modules= { module= flex; };
build_modules= { module= gnulib; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
build_modules= { module= fixincludes; };
@@ -600,6 +601,7 @@ dependencies = { module=install-strip-sid; on=install-strip-tcl; };
dependencies = { module=install-sid; on=install-tk; };
dependencies = { module=install-strip-sid; on=install-strip-tk; };
dependencies = { module=configure-sim; on=all-build-gnulib; };
dependencies = { module=configure-sim; on=all-gnulib; };
dependencies = { module=configure-sim; on=configure-gettext; };
dependencies = { module=all-sim; on=all-gettext; };

View File

@@ -1199,6 +1199,7 @@ all:
all-build: maybe-all-build-libiberty
all-build: maybe-all-build-bison
all-build: maybe-all-build-flex
all-build: maybe-all-build-gnulib
all-build: maybe-all-build-m4
all-build: maybe-all-build-texinfo
all-build: maybe-all-build-fixincludes
@@ -3300,6 +3301,63 @@ all-build-flex: configure-build-flex
.PHONY: configure-build-gnulib maybe-configure-build-gnulib
maybe-configure-build-gnulib:
@if gcc-bootstrap
configure-build-gnulib: stage_current
@endif gcc-bootstrap
@if build-gnulib
maybe-configure-build-gnulib: configure-build-gnulib
configure-build-gnulib:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/gnulib/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/gnulib; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/gnulib; \
cd "$(BUILD_SUBDIR)/gnulib" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(BUILD_SUBDIR)/gnulib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
module_srcdir=gnulib; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) \
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
--target=${target_alias} \
|| exit 1
@endif build-gnulib
.PHONY: all-build-gnulib maybe-all-build-gnulib
maybe-all-build-gnulib:
@if gcc-bootstrap
all-build-gnulib: stage_current
@endif gcc-bootstrap
@if build-gnulib
TARGET-build-gnulib=all
maybe-all-build-gnulib: all-build-gnulib
all-build-gnulib: configure-build-gnulib
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/gnulib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-gnulib))
@endif build-gnulib
.PHONY: configure-build-m4 maybe-configure-build-m4
maybe-configure-build-m4:
@if gcc-bootstrap
@@ -66659,6 +66717,7 @@ install-sid: maybe-install-tcl
install-strip-sid: maybe-install-strip-tcl
install-sid: maybe-install-tk
install-strip-sid: maybe-install-strip-tk
configure-sim: maybe-all-build-gnulib
configure-sim: maybe-all-gnulib
configure-sim: maybe-all-readline
all-fastjar: maybe-all-build-texinfo

5
configure vendored
View File

@@ -9957,6 +9957,11 @@ case " ${configdirs} " in
configdirs="${configdirs} gnulib"
;;
esac
case " ${configdirs} " in
*\ sim\ *)
build_configdirs="${build_configdirs} gnulib"
;;
esac
# Strip out unwanted targets.

View File

@@ -3076,6 +3076,11 @@ case " ${configdirs} " in
configdirs="${configdirs} gnulib"
;;
esac
case " ${configdirs} " in
*\ sim\ *)
build_configdirs="${build_configdirs} gnulib"
;;
esac
# Strip out unwanted targets.

View File

@@ -31,16 +31,20 @@
#
# INCGNU: A list of -I.... include paths that should be passed to the
# compiler, these are where the gnulib headers can be found.
#
# When building for --build, the variables will be prefixed with BUILD_.
# Packages must define the relative path to gnulib's parent dir.
ifndef GNULIB_PARENT_DIR
$(error missing GNULIB_PARENT_DIR)
endif
LIBGNU = $(GNULIB_PARENT_DIR)/gnulib/import/libgnu.a
LIBGNU_EXTRA_LIBS = @FREXPL_LIBM@ @FREXP_LIBM@ @INET_NTOP_LIB@ \
@LIBTHREAD@ @LIB_GETLOGIN@ @LIB_GETRANDOM@ \
@LIB_HARD_LOCALE@ @LIB_MBRTOWC@ \
@LIB_SETLOCALE_NULL@ @LIBINTL@ @LIB_SELECT@ @LIBSOCKET@
INCGNU = -I$(srcdir)/$(GNULIB_PARENT_DIR)/gnulib/import \
-I$(GNULIB_PARENT_DIR)/gnulib/import
@VAR_PREFIX@LIBGNU = $(GNULIB_PARENT_DIR)/@BUILD_SUBDIR@gnulib/import/libgnu.a
@VAR_PREFIX@LIBGNU_EXTRA_LIBS = \
@FREXPL_LIBM@ @FREXP_LIBM@ @INET_NTOP_LIB@ \
@LIBTHREAD@ @LIB_GETLOGIN@ @LIB_GETRANDOM@ \
@LIB_HARD_LOCALE@ @LIB_MBRTOWC@ \
@LIB_SETLOCALE_NULL@ @LIBINTL@ @LIB_SELECT@ @LIBSOCKET@
@VAR_PREFIX@INCGNU = \
-I$(srcdir)/$(GNULIB_PARENT_DIR)/gnulib/import \
-I$(GNULIB_PARENT_DIR)/@BUILD_SUBDIR@gnulib/import

View File

@@ -366,6 +366,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
BUILD_SUBDIR = @BUILD_SUBDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -1674,6 +1675,7 @@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
VAR_PREFIX = @VAR_PREFIX@
VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@

50
gnulib/configure vendored
View File

@@ -635,6 +635,8 @@ gl_LTLIBOBJS
gl_LIBOBJS
LTLIBOBJS
LIBOBJS
VAR_PREFIX
BUILD_SUBDIR
LN_S
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
@@ -2219,6 +2221,7 @@ enable_threads
enable_cross_guesses
enable_dependency_tracking
enable_silent_rules
with_build_subdir
'
ac_precious_vars='build_alias
host_alias
@@ -2866,6 +2869,12 @@ Optional Features:
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-build-subdir=SUBDIR
Configuring in a subdirectory for build
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@@ -13813,8 +13822,8 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS=$save_LIBS
test $gl_pthread_api = yes && break
done
echo "$as_me:13816: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:13817: LIBPTHREAD=$LIBPTHREAD" >&5
echo "$as_me:13825: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:13826: LIBPTHREAD=$LIBPTHREAD" >&5
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
@@ -13839,7 +13848,7 @@ rm -f conftest*
;;
esac
echo "$as_me:13842: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
echo "$as_me:13851: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
@@ -13993,7 +14002,7 @@ fi
fi
fi
echo "$as_me:13996: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
echo "$as_me:14005: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
$as_echo_n "checking whether POSIX threads API is available... " >&6; }
@@ -17070,8 +17079,8 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS=$save_LIBS
test $gl_pthread_api = yes && break
done
echo "$as_me:17073: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:17074: LIBPTHREAD=$LIBPTHREAD" >&5
echo "$as_me:17082: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:17083: LIBPTHREAD=$LIBPTHREAD" >&5
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
@@ -17096,7 +17105,7 @@ rm -f conftest*
;;
esac
echo "$as_me:17099: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
echo "$as_me:17108: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
@@ -17250,7 +17259,7 @@ fi
fi
fi
echo "$as_me:17253: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
echo "$as_me:17262: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
$as_echo_n "checking whether POSIX threads API is available... " >&6; }
@@ -17476,8 +17485,8 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS=$save_LIBS
test $gl_pthread_api = yes && break
done
echo "$as_me:17479: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:17480: LIBPTHREAD=$LIBPTHREAD" >&5
echo "$as_me:17488: gl_pthread_api=$gl_pthread_api" >&5
echo "$as_me:17489: LIBPTHREAD=$LIBPTHREAD" >&5
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
@@ -17502,7 +17511,7 @@ rm -f conftest*
;;
esac
echo "$as_me:17505: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
echo "$as_me:17514: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
@@ -17656,7 +17665,7 @@ fi
fi
fi
echo "$as_me:17659: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
echo "$as_me:17668: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
$as_echo_n "checking whether POSIX threads API is available... " >&6; }
@@ -36621,6 +36630,23 @@ fi
# Checks for libraries. #
# ---------------------- #
# Check whether --with-build-subdir was given.
if test "${with_build_subdir+set}" = set; then :
withval=$with_build_subdir;
fi
VAR_PREFIX=
BUILD_SUBDIR=
if test -n "${with_build_subdir}"; then :
VAR_PREFIX="BUILD_"
BUILD_SUBDIR="${with_build_subdir}/"
fi
ac_config_files="$ac_config_files Makefile.gnulib.inc"

View File

@@ -56,6 +56,18 @@ AC_CHECK_TOOL(AR, ar)
# Checks for libraries. #
# ---------------------- #
AC_ARG_WITH(build-subdir,
[AS_HELP_STRING([--with-build-subdir=SUBDIR], [Configuring in a subdirectory for build])])
VAR_PREFIX=
BUILD_SUBDIR=
AS_IF([test -n "${with_build_subdir}"], [dnl
VAR_PREFIX="BUILD_"
BUILD_SUBDIR="${with_build_subdir}/"
])
AC_SUBST(BUILD_SUBDIR)
AC_SUBST(VAR_PREFIX)
AC_CONFIG_FILES(Makefile.gnulib.inc)
AC_OUTPUT(Makefile import/Makefile,

View File

@@ -700,6 +700,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
BUILD_SUBDIR = @BUILD_SUBDIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -2008,6 +2009,7 @@ UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
VAR_PREFIX = @VAR_PREFIX@
VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@

View 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.

View 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.

View 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>

View 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)

View 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>

View 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)

View 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>

View 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. */

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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>

View 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"

View File

@@ -19,9 +19,11 @@
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"

View 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"

View 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>

View 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)

View 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>

View 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>

View 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)

View 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>

View 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>

View 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)

View 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>

View 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)