aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-31 18:31:44 +0545
committerMike Frysinger <vapier@gentoo.org>2022-11-03 12:53:49 +0545
commit46a1e1f20b1192da31104f9ed436ea33328c79d4 (patch)
tree71ababdf1c68669109a41784402defe05884edb9
parentca7b34c5bead0acd3c93670d849081da04f5bcd9 (diff)
downloadgdb-46a1e1f20b1192da31104f9ed436ea33328c79d4.zip
gdb-46a1e1f20b1192da31104f9ed436ea33328c79d4.tar.gz
gdb-46a1e1f20b1192da31104f9ed436ea33328c79d4.tar.bz2
sim: merge gnulib logic into the top-level
We aren't using this just yet, but we will, so make it available to building of common sim files.
-rw-r--r--sim/Makefile.am4
-rw-r--r--sim/Makefile.in6
-rwxr-xr-xsim/configure8
-rw-r--r--sim/configure.ac5
4 files changed, 20 insertions, 3 deletions
diff --git a/sim/Makefile.am b/sim/Makefile.am
index 594c91f..d312502 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -18,6 +18,9 @@
AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
+GNULIB_PARENT_DIR = ..
+@include_makefile@ $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
+
srccom = $(srcdir)/common
srcroot = $(srcdir)/..
@@ -39,6 +42,7 @@ MOSTLYCLEANFILES = core
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
AM_CPPFLAGS = \
+ $(INCGNU) \
-I$(srcroot)/include \
$(SIM_INLINE)
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 36e95cf..8e2385e 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -891,6 +891,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
+include_makefile = @include_makefile@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@@ -927,6 +928,7 @@ zlibdir = @zlibdir@
zlibinc = @zlibinc@
AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects
ACLOCAL_AMFLAGS = -Im4 -I.. -I../config
+GNULIB_PARENT_DIR = ..
srccom = $(srcdir)/common
srcroot = $(srcdir)/..
SUBDIRS = @subdirs@ $(SIM_SUBDIRS)
@@ -945,7 +947,8 @@ MOSTLYCLEANFILES = core $(am__append_5) site-sim-config.exp \
$(am__append_26) $(am__append_29) $(am__append_31) \
$(am__append_34) $(am__append_37) $(am__append_39)
AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
-AM_CPPFLAGS = -I$(srcroot)/include $(SIM_INLINE) -I$(srcdir)/common
+AM_CPPFLAGS = $(INCGNU) -I$(srcroot)/include $(SIM_INLINE) \
+ -I$(srcdir)/common
AM_CPPFLAGS_FOR_BUILD = -I$(srcroot)/include $(SIM_INLINE) \
-I$(srcdir)/common
COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
@@ -2423,6 +2426,7 @@ uninstall-am: uninstall-armdocDATA uninstall-dtbDATA \
.PRECIOUS: Makefile
+@include_makefile@ $(GNULIB_PARENT_DIR)/gnulib/Makefile.gnulib.inc
# Generate target constants for newlib/libgloss from its source tree.
# This file is shipped with distributions so we build in the source dir.
diff --git a/sim/configure b/sim/configure
index 5283ef9..538e528 100755
--- a/sim/configure
+++ b/sim/configure
@@ -638,6 +638,7 @@ enable_option_checking=no
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
+include_makefile
SIM_RX_CYCLE_ACCURATE_FLAGS
SIM_FRV_TRAPDUMP_FLAGS
sim_float
@@ -12775,7 +12776,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12778 "configure"
+#line 12779 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12881,7 +12882,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12884 "configure"
+#line 12885 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16509,6 +16510,9 @@ fi
+include_makefile="include"
+
+
ac_config_files="$ac_config_files arch-subdir.mk Makefile .gdbinit:gdbinit.in"
cat >confcache <<\_ACEOF
diff --git a/sim/configure.ac b/sim/configure.ac
index be0cfdb..30479ae 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -198,5 +198,10 @@ dnl Some arches have unique configure flags.
m4_include([frv/acinclude.m4])
m4_include([rx/acinclude.m4])
+dnl Hack to output an "include" statement in the Makefile so automake doesn't
+dnl try to follow it itself while processing Makefile.am.
+include_makefile="include"
+AC_SUBST(include_makefile)
+
AC_CONFIG_FILES([arch-subdir.mk Makefile .gdbinit:gdbinit.in])
AC_OUTPUT