[3/3] sim: unify gettext/intl probing logic

Message ID 20210619050936.23617-3-vapier@gentoo.org
State New
Headers show
Series
  • [1/3] sim: unify toolchain probing logic
Related show

Commit Message

Rustam Kovhaev via Gdb-patches June 19, 2021, 5:09 a.m.
Move these options up to the common dir so we only test & export
them once across all ports.
---
 sim/Makefile.in                | 13 +++++
 sim/aarch64/aclocal.m4         |  1 -
 sim/aarch64/configure          | 84 --------------------------------
 sim/aclocal.m4                 |  1 +
 sim/arch-subdir.mk.in          |  4 ++
 sim/arm/aclocal.m4             |  1 -
 sim/arm/configure              | 84 --------------------------------
 sim/avr/aclocal.m4             |  1 -
 sim/avr/configure              | 84 --------------------------------
 sim/bfin/aclocal.m4            |  1 -
 sim/bfin/configure             | 84 --------------------------------
 sim/bpf/aclocal.m4             |  1 -
 sim/bpf/configure              | 84 --------------------------------
 sim/common/Make-common.in      |  4 +-
 sim/config.h.in                |  4 ++
 sim/configure                  | 88 +++++++++++++++++++++++++++++++++-
 sim/cr16/aclocal.m4            |  1 -
 sim/cr16/configure             | 84 --------------------------------
 sim/cris/aclocal.m4            |  1 -
 sim/cris/configure             | 84 --------------------------------
 sim/d10v/aclocal.m4            |  1 -
 sim/d10v/configure             | 84 --------------------------------
 sim/erc32/aclocal.m4           |  1 -
 sim/erc32/configure            | 84 --------------------------------
 sim/example-synacor/aclocal.m4 |  1 -
 sim/example-synacor/configure  | 84 --------------------------------
 sim/frv/aclocal.m4             |  1 -
 sim/frv/configure              | 84 --------------------------------
 sim/ft32/aclocal.m4            |  1 -
 sim/ft32/configure             | 84 --------------------------------
 sim/h8300/aclocal.m4           |  1 -
 sim/h8300/configure            | 84 --------------------------------
 sim/iq2000/aclocal.m4          |  1 -
 sim/iq2000/configure           | 84 --------------------------------
 sim/lm32/aclocal.m4            |  1 -
 sim/lm32/configure             | 84 --------------------------------
 sim/m32c/aclocal.m4            |  1 -
 sim/m32c/configure             | 84 --------------------------------
 sim/m32r/aclocal.m4            |  1 -
 sim/m32r/configure             | 84 --------------------------------
 sim/m4/sim_ac_common.m4        |  5 --
 sim/m4/sim_ac_platform.m4      |  5 ++
 sim/m68hc11/aclocal.m4         |  1 -
 sim/m68hc11/configure          | 84 --------------------------------
 sim/mcore/aclocal.m4           |  1 -
 sim/mcore/configure            | 84 --------------------------------
 sim/microblaze/aclocal.m4      |  1 -
 sim/microblaze/configure       | 84 --------------------------------
 sim/mips/aclocal.m4            |  1 -
 sim/mips/configure             | 84 --------------------------------
 sim/mn10300/aclocal.m4         |  1 -
 sim/mn10300/configure          | 84 --------------------------------
 sim/moxie/aclocal.m4           |  1 -
 sim/moxie/configure            | 84 --------------------------------
 sim/msp430/aclocal.m4          |  1 -
 sim/msp430/configure           | 84 --------------------------------
 sim/or1k/aclocal.m4            |  1 -
 sim/or1k/configure             | 84 --------------------------------
 sim/ppc/Makefile.in            |  4 --
 sim/ppc/config.in              |  4 --
 sim/ppc/configure              | 85 --------------------------------
 sim/ppc/configure.ac           |  6 ---
 sim/pru/aclocal.m4             |  1 -
 sim/pru/configure              | 84 --------------------------------
 sim/riscv/aclocal.m4           |  1 -
 sim/riscv/configure            | 84 --------------------------------
 sim/rl78/aclocal.m4            |  1 -
 sim/rl78/configure             | 84 --------------------------------
 sim/rx/aclocal.m4              |  1 -
 sim/rx/configure               | 84 --------------------------------
 sim/sh/aclocal.m4              |  1 -
 sim/sh/configure               | 84 --------------------------------
 sim/v850/aclocal.m4            |  1 -
 sim/v850/configure             | 84 --------------------------------
 74 files changed, 114 insertions(+), 2744 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in
index 167d39bf8e2f..8128a27971d7 100644
--- a/sim/arch-subdir.mk.in
+++ b/sim/arch-subdir.mk.in
@@ -45,6 +45,10 @@  DEPDIR = @DEPDIR@
 
 zlibdir = @zlibdir@
 @PLUGINS_TRUE@LIBDL = @lt_cv_dlopen_libs@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
+INTL_CFLAGS = @INCINTL@
+
 COMMON_LIBS = @LIBS@
 WARN_CFLAGS = @WARN_CFLAGS@
 WERROR_CFLAGS = @WERROR_CFLAGS@
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 4b430b806af2..80e45c761830 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -211,7 +211,7 @@  CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \
   -I../../bfd -I$(srcroot)/bfd \
   -I../../opcodes -I$(srcroot)/opcodes \
   -I../.. \
-  @INCINTL@
+  $(INTL_CFLAGS)
 ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(INCGNU) $(SIM_EXTRA_CFLAGS) $(CFLAGS)
 BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
 
@@ -221,8 +221,6 @@  ZLIB = $(zlibdir) -lz
 LIBIBERTY_LIB = ../../libiberty/libiberty.a
 BFD_LIB = ../../bfd/libbfd.a
 OPCODES_LIB = ../../opcodes/libopcodes.a
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
 CONFIG_LIBS = $(COMMON_LIBS) @LIBS@ $(ZLIB)
 LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB)
 EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 1dff64ef9e69..26d0eefdc35c 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -21,11 +21,6 @@  dnl
 dnl See README-HACKING for more details.
 AC_DEFUN([SIM_AC_COMMON],
 [dnl
-dnl We don't use gettext, but bfd does.  So we do the appropriate checks
-dnl to see if there are intl libraries we should link against.
-ALL_LINGUAS=
-ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
-
 dnl We don't use automake, but we still want to support
 dnl --enable-maintainer-mode.
 AM_MAINTAINER_MODE
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 87ebe6a9c2e3..b7573567d24c 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -142,6 +142,11 @@  AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
 AC_TYPE_UID_T
 
+dnl We don't use gettext, but bfd does.  So we do the appropriate checks
+dnl to see if there are intl libraries we should link against.
+ALL_LINGUAS=
+ZW_GNU_GETTEXT_SISTER_DIR
+
 dnl BFD conditionally uses zlib, so we must link it in if libbfd does, by
 dnl using the same condition.
 AM_ZLIB
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index e6e746d40015..a621e9940119 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -133,10 +133,6 @@  LIBIBERTY_LIB	= ../../libiberty/libiberty.a
 BFD_LIB		= ../../bfd/libbfd.a
 ZLIB		= $(zlibdir) -lz
 
-LIBINTL = @LIBINTL@
-LIBINTL_DEP = @LIBINTL_DEP@
-INTL_CFLAGS = @INCINTL@
-
 
 TARGETLIB	= libsim.a
 
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 8efee5042072..58c68a110f99 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -5,12 +5,6 @@  AC_CONFIG_MACRO_DIRS([../.. ../../config])
 AC_PROG_INSTALL
 AC_PROG_CC
 
-dnl We don't use gettext, but bfd does.  So we do the appropriate checks
-dnl to see if there are intl libraries we should link against.
-ALL_LINGUAS=
-ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
-
-
 AC_ARG_ENABLE(sim-bitsize,
 [  --enable-sim-bitsize=n		Specify target bitsize (32 or 64).],
 [case "${enableval}" in