From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id CCA8F3858003 for ; Sat, 26 Jun 2021 21:07:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCA8F3858003 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 992F433FAD1 for ; Sat, 26 Jun 2021 21:07:52 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 2/2] sim: erc32: merge with common configure script Date: Sat, 26 Jun 2021 17:07:51 -0400 Message-Id: <20210626210751.19269-2-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210626210751.19269-1-vapier@gentoo.org> References: <20210626210751.19269-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jun 2021 21:07:57 -0000 Move the unique library tests to the common code so we can delete the erc32 configure logic entirely. --- sim/Makefile.in | 8 +- sim/arch-subdir.mk.in | 3 + sim/configure | 165 +- sim/configure.ac | 2 +- sim/erc32/Makefile.in | 4 - sim/erc32/aclocal.m4 | 15 - sim/erc32/configure | 4233 ------------------------------------- sim/erc32/configure.ac | 47 - sim/m4/sim_ac_platform.m4 | 28 + 9 files changed, 200 insertions(+), 4305 deletions(-) delete mode 100644 sim/erc32/aclocal.m4 delete mode 100755 sim/erc32/configure delete mode 100644 sim/erc32/configure.ac diff --git a/sim/arch-subdir.mk.in b/sim/arch-subdir.mk.in index 0689dbc29ed1..efd91e76b1c3 100644 --- a/sim/arch-subdir.mk.in +++ b/sim/arch-subdir.mk.in @@ -51,6 +51,9 @@ LIBINTL_DEP = @LIBINTL_DEP@ INTL_CFLAGS = @INCINTL@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ +TERMCAP_LIB = @TERMCAP_LIB@ +READLINE_LIB = @READLINE_LIB@ +READLINE_CFLAGS = @READLINE_CFLAGS@ COMMON_LIBS = @LIBS@ WARN_CFLAGS = @WARN_CFLAGS@ diff --git a/sim/configure.ac b/sim/configure.ac index 3632b559bf0f..15b2b65c87e8 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -139,7 +139,7 @@ if test "${enable_sim}" != no; then SIM_TARGET([rl78-*-*], [rl78]) SIM_TARGET([rx-*-*], [rx]) SIM_TARGET([sh*-*-*], [sh]) - SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32], [true]) + SIM_TARGET([sparc-*-rtems*|sparc-*-elf*], [erc32]) SIM_TARGET([powerpc*-*-*], [ppc], [true]) SIM_TARGET([v850*-*-*], [v850], [true], [sim_igen=yes]) done diff --git a/sim/erc32/Makefile.in b/sim/erc32/Makefile.in index 278b4792daeb..9ca0e3519a27 100644 --- a/sim/erc32/Makefile.in +++ b/sim/erc32/Makefile.in @@ -18,11 +18,7 @@ ## COMMON_PRE_CONFIG_FRAG -TERMCAP_LIB = @TERMCAP@ - READLINE_SRC = $(srcroot)/readline/readline -READLINE_LIB = @READLINE@ -READLINE_CFLAGS = @READLINE_CFLAGS@ SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o SIM_RUN_OBJS = sis.o diff --git a/sim/erc32/configure.ac b/sim/erc32/configure.ac deleted file mode 100644 index db6b98efa2e4..000000000000 --- a/sim/erc32/configure.ac +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 1996-2021 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program. If not, see . - -dnl Process this file with autoconf to produce a configure script. -AC_INIT(Makefile.in) -AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) - -# In the Cygwin environment, we need some additional flags. -AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, -[AC_EGREP_CPP(lose, [ -#ifdef __CYGWIN__ -lose -#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) - -# Keep in sync with gdb's configure.ac list. -AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], - [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""]) -if test x$sim_cv_os_cygwin = xyes; then - TERMCAP="${TERMCAP} -luser32" -fi -AC_SUBST(TERMCAP) - -# We prefer the in-tree readline. Top-level dependencies make sure -# src/readline (if it's there) is configured before src/sim. -if test -r ../../readline/Makefile; then - READLINE=../../readline/readline/libreadline.a - READLINE_CFLAGS='-I$(READLINE_SRC)/..' -else - AC_CHECK_LIB(readline, readline, READLINE=-lreadline, - AC_ERROR([the required "readline" library is missing]), $TERMCAP) - READLINE_CFLAGS= -fi -AC_SUBST(READLINE) -AC_SUBST(READLINE_CFLAGS) -SIM_AC_OUTPUT diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 2a84a0130a33..b0abe62a51f3 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -171,4 +171,32 @@ PKG_CHECK_MODULES(SDL, sdl, [dnl ], [:]) AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) + +dnl In the Cygwin environment, we need some additional flags. +AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin, +[AC_EGREP_CPP(lose, [ +#ifdef __CYGWIN__ +lose +#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])]) + +dnl Keep in sync with gdb's configure.ac list. +AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses], + [TERMCAP_LIB=$ac_cv_search_tgetent], [TERMCAP_LIB=""]) +if test x$sim_cv_os_cygwin = xyes; then + TERMCAP_LIB="${TERMCAP_LIB} -luser32" +fi +AC_SUBST(TERMCAP_LIB) + +dnl We prefer the in-tree readline. Top-level dependencies make sure +dnl src/readline (if it's there) is configured before src/sim. +if test -r ../readline/Makefile; then + READLINE_LIB=../../readline/readline/libreadline.a + READLINE_CFLAGS='-I$(READLINE_SRC)/..' +else + AC_CHECK_LIB(readline, readline, READLINE_LIB=-lreadline, + AC_ERROR([the required "readline" library is missing]), $TERMCAP_LIB) + READLINE_CFLAGS= +fi +AC_SUBST(READLINE_LIB) +AC_SUBST(READLINE_CFLAGS) ]) -- 2.31.1