diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-01 18:05:49 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-29 11:56:43 -0400 |
commit | 5c9e84c2d8208444772cae8130a23aa27407f32c (patch) | |
tree | 549d735f6de862152ae964f1f1548f78392a5053 | |
parent | 63e47e10725f93a4c07ced83050b917bc9e6b205 (diff) | |
download | gdb-5c9e84c2d8208444772cae8130a23aa27407f32c.zip gdb-5c9e84c2d8208444772cae8130a23aa27407f32c.tar.gz gdb-5c9e84c2d8208444772cae8130a23aa27407f32c.tar.bz2 |
sim: leverage gnulib
We use getline, so leverage gnulib to provide fallback implementation.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | sim/common/ChangeLog | 9 | ||||
-rw-r--r-- | sim/common/Make-common.in | 9 | ||||
-rw-r--r-- | sim/common/defs.h | 12 | ||||
-rw-r--r-- | sim/ppc/ChangeLog | 4 | ||||
-rw-r--r-- | sim/ppc/Makefile.in | 2 |
8 files changed, 44 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2021-05-29 Mike Frysinger <vapier@gentoo.org> + + * configure.ac: Add gnulib to configdirs for sim. + * configure: Regenerate. + 2021-05-24 Maciej W. Rozycki <macro@orcam.me.uk> * MAINTAINERS: Update path to readline config.{sub,guess} files. @@ -7504,6 +7504,9 @@ case " ${configdirs} " in *\ gdbserver\ *) configdirs="${configdirs} gnulib gdbsupport" ;; + *\ sim\ *) + configdirs="${configdirs} gnulib" + ;; esac # Strip out unwanted targets. diff --git a/configure.ac b/configure.ac index 59b4194..797a624 100644 --- a/configure.ac +++ b/configure.ac @@ -2812,6 +2812,9 @@ case " ${configdirs} " in *\ gdbserver\ *) configdirs="${configdirs} gnulib gdbsupport" ;; + *\ sim\ *) + configdirs="${configdirs} gnulib" + ;; esac # Strip out unwanted targets. diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 76bf134..f44e055 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +2021-05-29 Mike Frysinger <vapier@gentoo.org> + + * Make-common.in (GNULIB_BUILDDIR): Define. + Include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc. + (CSEARCH): Add -I../... + (ALL_CFLAGS): Add $(INCGNU). + (EXTRA_LIBS): Add $(LIBGNU). + * defs.h: Include gnulib/config.h. Undefine PACKAGE* defines. + 2021-05-17 Mike Frysinger <vapier@gentoo.org> * sim-base.h (SIM_HAVE_COMMON_SIM_STATE): Delete. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index d38c849..8f52cf5 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -40,6 +40,10 @@ srccom = $(srcdir)/../common srcroot = $(srcdir)/../.. srcsim = $(srcdir)/.. +# Helper code from gnulib. +GNULIB_BUILDDIR = ../../gnulib +include $(GNULIB_BUILDDIR)/Makefile.gnulib.inc + prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -232,8 +236,9 @@ CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \ -I../../include -I$(srcroot)/include \ -I../../bfd -I$(srcroot)/bfd \ -I../../opcodes -I$(srcroot)/opcodes \ + -I../.. \ @INCINTL@ -ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS) $(CFLAGS) +ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(INCGNU) $(SIM_EXTRA_CFLAGS) $(CFLAGS) BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH) COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS) @@ -248,7 +253,7 @@ LIBINTL_DEP = @LIBINTL_DEP@ CONFIG_LIBS = @LIBS@ $(ZLIB) LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB) EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \ - $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) + $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) $(LIBDL) $(LIBGNU) LIB_OBJS = callback.o modules.o syscall.o targ-map.o version.o \ $(SIM_OBJS) diff --git a/sim/common/defs.h b/sim/common/defs.h index 3a0737c..957e36d 100644 --- a/sim/common/defs.h +++ b/sim/common/defs.h @@ -22,6 +22,18 @@ #ifdef HAVE_CONFIG_H +/* Include gnulib's various configure tests. */ +#include "gnulib/config.h" + +/* Reset macros that our config.h will provide. */ +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_URL +#undef PACKAGE_VERSION + /* Include sim's various configure tests. */ #include "config.h" diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 0755fe2..15b50ef 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,7 @@ +2021-05-29 Mike Frysinger <vapier@gentoo.org> + + * Makefile.in (INCLUDES): Add -I../.. + 2021-05-16 Mike Frysinger <vapier@gentoo.org> * Makefile.in (gentmap): Pass -DUSE_CONFIG_H. diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 5ce511e..1996e13 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -147,7 +147,7 @@ LIB_INCLUDES = -I$(srcdir)/../../include BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) +INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES) -I../.. LIBIBERTY_LIB = ../../libiberty/libiberty.a BFD_LIB = ../../bfd/libbfd.a |