From patchwork Tue Jan 2 05:36:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83103 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2CF45385828D for ; Tue, 2 Jan 2024 06:37:37 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B8AF73858CDB for ; Tue, 2 Jan 2024 06:36:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8AF73858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B8AF73858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177404; cv=none; b=c6WPkBLYQXOU51B+in0BiLroppQaEjDuM1VeceOyrWmZyfz2Ycx1Fvi0wrkJrzLpTgVGKcgQ2sX5TJQ0FQ+8SJeTHLk4Y0KDAPVRGxaZO3CmSFXRfp81/JFEDZHMzhlI1FBInBvCZyNFmdfOYIeE5QobBlkimpodi48WJKuDJ44= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177404; c=relaxed/simple; bh=ZsLJHoF2DyDx5+oDnNwxJGU/tWh6vS7jKxWmaiEiy4M=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kfb8XbPgEzJcPsbcMkxnkmJ84zujZy5shuN7Gf0SkUQ5a3qYpww1FvO9Xxzvebzq9Q8yRJUxetk4BTRl+fTWm15kCNyfaYEInxJKk6t41LzirrDyAKmdlh9cUQ7kR9G8oz7mChNcrW/DyDBcP6+YKrtwruJg3DF18qZEev2yAbs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 6902D340813; Tue, 2 Jan 2024 06:36:42 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 01/10] sim: ppc: move long long test to top-level Date: Tue, 2 Jan 2024 00:36:29 -0500 Message-ID: <20240102053639.28290-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org While the sim code doesn't utilize HAVE_LONG_LONG itself, other code (like libiberty) seem to, so check for it in the top-level for all ports to leverage. --- sim/config.h.in | 3 + sim/configure | 14 +- sim/m4/sim_ac_platform.m4 | 1 + sim/ppc/config.in | 33 -- sim/ppc/configure | 618 +------------------------------------- sim/ppc/configure.ac | 2 - 6 files changed, 18 insertions(+), 653 deletions(-) diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index dcab5b2862d9..1914f61f8101 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -132,6 +132,7 @@ AC_CHECK_TYPES(socklen_t, [], [], [#include #include ]) +AC_CHECK_TYPES([long long]) dnl Some System V related checks. AC_CACHE_CHECK([if union semun defined], diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 06be2c960768..9c2d64b4c66b 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -382,8 +382,6 @@ if test $ac_cv_struct_statfs = yes; then [Define if struct statfs is defined in ]) fi -AC_CHECK_TYPES(long long) - AC_SUBST(sim_line_nr) AC_SUBST(sim_opcode) AC_SUBST(sim_switch) From patchwork Tue Jan 2 05:36:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83104 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B014338582A5 for ; Tue, 2 Jan 2024 06:37:40 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id EA4C83858C41 for ; Tue, 2 Jan 2024 06:36:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EA4C83858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EA4C83858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177407; cv=none; b=CgEP7qdzMWWggV8GYptnUK71G5f3NaK4OK2rhSssMjU1AlSYP22BG/coODMs1dwdc5aJKdOG3dVRqsUEGoWTWvfsIfu6nkHVRJRAmnZWDzMwIz/E6RSG7kb2HyEeN8iN7mGIPxPIyuGRa+ut/G3eZNFLPXj5GHiiyxGks8zD0W0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177407; c=relaxed/simple; bh=cTR6upV9nZ5xZEj34DRUSPeykP7l4cbK0tPzwuvuWNs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IWymGUIKa/db8/SPUrbZqkDqHHP53oBct9hbxvw5JfE0IgeMuFX5Hj9PyowgHWqDNTqKKQR2jww+wVVzRS2ty1yKcHndr8lHpO5AoqcEFbjY4vLCo/wdoKVkAS2LvzcI7t7Z2STBDt+Nae6xONyYL6EqeLDv217eDQVwf9E9O54= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 6D85F3408DD; Tue, 2 Jan 2024 06:36:44 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 02/10] sim: ppc: move struct statfs to top-level Date: Tue, 2 Jan 2024 00:36:30 -0500 Message-ID: <20240102053639.28290-2-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org --- sim/config.h.in | 3 +++ sim/configure | 51 +++++++++++++++++++++++++++++++++++++-- sim/m4/sim_ac_platform.m4 | 24 ++++++++++++++++++ sim/ppc/config.in | 3 --- sim/ppc/configure | 44 --------------------------------- sim/ppc/configure.ac | 24 ------------------ 6 files changed, 76 insertions(+), 73 deletions(-) diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 1914f61f8101..6f3e48f63dd2 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -134,6 +134,30 @@ AC_CHECK_TYPES(socklen_t, [], [], ]) AC_CHECK_TYPES([long long]) +dnl Check for struct statfs. +AC_CACHE_CHECK([for struct statfs], + [sim_cv_struct_statfs], + [AC_TRY_COMPILE([ +#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include +#endif +#ifdef HAVE_SYS_STATFS_H +#include +#endif], [ + struct statfs s; +], [sim_cv_struct_statfs="yes"], [sim_cv_struct_statfs="no"])]) +AS_IF([test x"sim_cv_struct_statfs" = x"yes"], [dnl + AC_DEFINE(HAVE_STRUCT_STATFS, 1, + [Define if struct statfs is defined in ]) +]) + dnl Some System V related checks. AC_CACHE_CHECK([if union semun defined], [sim_cv_has_union_semun], diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 9c2d64b4c66b..13db9fc4791e 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -358,30 +358,6 @@ else ac_cv_termio_cline=no fi -dnl Check for struct statfs -AC_MSG_CHECKING(for struct statfs) -AC_CACHE_VAL(ac_cv_struct_statfs, -[AC_TRY_COMPILE([#include -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_VFS_H -#include -#endif -#ifdef HAVE_SYS_STATFS_H -#include -#endif], -[static struct statfs s;], -ac_cv_struct_statfs=yes, ac_cv_struct_statfs=no)]) -AC_MSG_RESULT($ac_cv_struct_statfs) -if test $ac_cv_struct_statfs = yes; then - AC_DEFINE(HAVE_STRUCT_STATFS, 1, - [Define if struct statfs is defined in ]) -fi - AC_SUBST(sim_line_nr) AC_SUBST(sim_opcode) AC_SUBST(sim_switch) From patchwork Tue Jan 2 05:36:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83107 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6ADF5385828E for ; Tue, 2 Jan 2024 06:38:42 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id EF5BE3858C2F for ; Tue, 2 Jan 2024 06:36:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF5BE3858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EF5BE3858C2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177409; cv=none; b=XclT4dpGond17ezdvuMaNp7/ScihOGgj1JlcRz1izimOmcSdFHgsgidLuhpmY7s5Pps6Rhr6Pf51dNoM/4GHt2vpeHAGRl6Xe3jf2pDXxA14KqyVBys6l/nfvAKm+AX0GutDm+VgqTJsHVSry2sThmt9UlKW5FEq/3GPzDGB8XE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177409; c=relaxed/simple; bh=6LgLWyRIvFMLI/dZvs2RW23lzgwBxJ61axlmXHCmerI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=llsOC5eJHljyGd9jcdAfNcxMLd7gu052iIWvX2trCAlRJ+icKd02xx+EcGfbiEv4Ul0mUNFo75sgj/t7apb57fpRlqTJ4mjndZayt7+PmLIqNyj+bee18sL0EsF6CpNbBy1VPCk6jVPRC844f95Gvzw7mv4sbAwvV5LEqerCsTY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 84497340813; Tue, 2 Jan 2024 06:36:46 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 03/10] sim: ppc: move termio defines to config.h Date: Tue, 2 Jan 2024 00:36:31 -0500 Message-ID: <20240102053639.28290-3-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Move the defines from explicit -D options to config.h defines to simplify the build and make it easier to move to the top-level configure. --- sim/ppc/Makefile.in | 2 -- sim/ppc/config.in | 12 ++++++++++++ sim/ppc/configure | 19 ++++++++++++------- sim/ppc/configure.ac | 10 ++++------ 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 26a1e7cfd28e..8eaad7424c44 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -68,7 +68,6 @@ TIMEBASE_CFLAGS = @sim_timebase@ FLOAT_CFLAGS = @sim_float@ MONITOR_CFLAGS = @sim_monitor@ MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@ -TERMIO_CFLAGS = @sim_termio@ SWITCH_CFLAGS = @sim_switch@ CONFIG_CFLAGS = \ $(SMP_CFLAGS) \ @@ -78,7 +77,6 @@ CONFIG_CFLAGS = \ $(FLOAT_CFLAGS) \ $(MONITOR_CFLAGS) \ $(MODEL_CFLAGS) \ - $(TERMIO_CFLAGS) \ $(SWITCH_CFLAGS) SIM_FPU_CFLAGS = -DHAVE_COMMON_FPU -I../common -I${srcdir}/../common diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 13db9fc4791e..e8354791a711 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -289,7 +289,6 @@ AC_CONFIG_HEADER(config.h:config.in) dnl Figure out what type of termio/termios support there is -sim_termio="" AC_MSG_CHECKING(for struct termios) AC_CACHE_VAL(ac_cv_termios_struct, [AC_TRY_COMPILE([#include @@ -303,7 +302,7 @@ AC_CACHE_VAL(ac_cv_termios_struct, ac_cv_termios_struct=yes, ac_cv_termios_struct=no)]) AC_MSG_RESULT($ac_cv_termios_struct) if test $ac_cv_termios_struct = yes; then - sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE" + AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.]) fi if test "$ac_cv_termios_struct" = "yes"; then @@ -316,7 +315,7 @@ if test "$ac_cv_termios_struct" = "yes"; then AC_MSG_RESULT($ac_cv_termios_cline) if test $ac_cv_termios_cline = yes; then - sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE" + AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.]) fi else ac_cv_termios_cline=no @@ -336,7 +335,7 @@ if test "$ac_cv_termios_struct" != "yes"; then ac_cv_termio_struct=yes, ac_cv_termio_struct=no)]) AC_MSG_RESULT($ac_cv_termio_struct) if test $ac_cv_termio_struct = yes; then - sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE" + AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.]) fi else ac_cv_termio_struct=no @@ -352,7 +351,7 @@ if test "$ac_cv_termio_struct" = "yes"; then AC_MSG_RESULT($ac_cv_termio_cline) if test $ac_cv_termio_cline = yes; then - sim_termio="$sim_termio -DHAVE_TERMIO_CLINE" + AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.]) fi else ac_cv_termio_cline=no @@ -378,7 +377,6 @@ AC_SUBST(sim_monitor) AC_SUBST(sim_model) AC_SUBST(sim_default_model) AC_SUBST(sim_model_issue) -AC_SUBST(sim_termio) AC_OUTPUT(Makefile, [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) From patchwork Tue Jan 2 05:36:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83105 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64EC138582A4 for ; Tue, 2 Jan 2024 06:37:56 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id DF1223858417 for ; Tue, 2 Jan 2024 06:36:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF1223858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DF1223858417 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177411; cv=none; b=p4u+lX9zySwMSRr4/HlbJP8Nhrf2A8x5CFsi8H9ojhAKNQ54kr9Hpt6pAXNgJDnVyis1sjiFrjYL8C+PqYNj89sGcJHF+aavoBqp0TvMzwgQI0Sea/LMccCLPBRzCRVUVmPlRoXwYde10iH8RAY5u3GSZLhDy9CfyGchNSJLRFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177411; c=relaxed/simple; bh=ihDIS8YXhTogmY7SoY7W56BEn+n7XyckM29ZxlMHwoc=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=k6OHWXNbxAUTA23OFeJp0Bl30+nclFXhGjFPFSnvGK2nj4oZxk392Rc0/TI9YXgzQ3xKZqLaJ2JnewokKD5NiCFb7w2KRxlFgVXZVBLZdrqTUpVW83fe6uAIokDMxe8tjAgq4E0FwtP0Lkb9cTxgFbggHdn62fazP2dYcdkJi3I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 84F513408DD; Tue, 2 Jan 2024 06:36:48 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 04/10] sim: ppc: switch struct member checks to AC_CHECK_MEMBER Date: Tue, 2 Jan 2024 00:36:32 -0500 Message-ID: <20240102053639.28290-4-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This covers a lot of the AC_MSG_CHECKING+AC_TRY_COMPILE+AC_MSG_RESULT boilerplate and matches what we do in the top-level platform checks. --- sim/ppc/configure | 127 +++++++++++++++++++++++++++---------------- sim/ppc/configure.ac | 40 +++++++------- 2 files changed, 99 insertions(+), 68 deletions(-) diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index e8354791a711..8810ff2f4726 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -306,19 +306,19 @@ if test $ac_cv_termios_struct = yes; then fi if test "$ac_cv_termios_struct" = "yes"; then - AC_MSG_CHECKING(for c_line field in struct termios) - AC_CACHE_VAL(ac_cv_termios_cline, - [AC_TRY_COMPILE([#include -#include ], -[static struct termios x; x.c_line = 0;], - ac_cv_termios_cline=yes, ac_cv_termios_cline=no)]) - - AC_MSG_RESULT($ac_cv_termios_cline) - if test $ac_cv_termios_cline = yes; then + AC_CACHE_VAL([sim_cv_termios_cline]) + AC_CHECK_MEMBER( + [struct termios.c_line], + [sim_cv_termios_cline="yes"], + [sim_cv_termios_cline="no"], [ +#include +#include +]) + if test $sim_cv_termios_cline = yes; then AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.]) fi else - ac_cv_termios_cline=no + sim_cv_termios_cline=no fi if test "$ac_cv_termios_struct" != "yes"; then @@ -342,19 +342,19 @@ else fi if test "$ac_cv_termio_struct" = "yes"; then - AC_MSG_CHECKING(for c_line field in struct termio) - AC_CACHE_VAL(ac_cv_termio_cline, - [AC_TRY_COMPILE([#include -#include ], -[static struct termio x; x.c_line = 0;], - ac_cv_termio_cline=yes, ac_cv_termio_cline=no)]) - - AC_MSG_RESULT($ac_cv_termio_cline) - if test $ac_cv_termio_cline = yes; then + AC_CACHE_VAL([sim_cv_termio_cline]) + AC_CHECK_MEMBER( + [struct termio.c_line], + [sim_cv_termio_cline="yes"], + [sim_cv_termio_cline="no"], [ +#include +#include +]) + if test $sim_cv_termio_cline = yes; then AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.]) fi else - ac_cv_termio_cline=no + sim_cv_termio_cline=no fi AC_SUBST(sim_line_nr) From patchwork Tue Jan 2 05:36:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83110 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4DE84385842B for ; Tue, 2 Jan 2024 06:39:25 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id CDCF33858C2C for ; Tue, 2 Jan 2024 06:36:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CDCF33858C2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CDCF33858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177414; cv=none; b=C4zPdvq7mU8jjNbnmxglb9EPwK1A8Rf9OJ6ur7aJuxXh6lX2pagH8kz+8gjD/6V/rUYeWKPcAhbxWbMmxKTrJeX7HgN5u0mSXhm0rNzWqPvkJbpEppe9RrdpErGF3MCm2IrCeASvhaVm0NYFvneM9KbaXHX4oiOt9HjtQE7NaBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177414; c=relaxed/simple; bh=QusPZbNMKJ4kd5gWbOMMV74A4YkqgD7kujqQwSDElyg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ih/xbofFgw2p54lcG+7XsYJzNmxl2z/LQVyHcANHnWmAAKqc6gDvVlR/QGv0WxvD3CBekHu15DJl/gi7+fIUJYb6c67do1+npEl4c4+9bTp4JFY81z61+mqq+MT1UPCDhGjdhWFT0/dayMt+OdKTjS2XL3rEGnMLK+3BpMpOnnA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 967C3340813; Tue, 2 Jan 2024 06:36:50 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 05/10] sim: ppc: switch to AC_CACHE_CHECK Date: Tue, 2 Jan 2024 00:36:33 -0500 Message-ID: <20240102053639.28290-5-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This macro replaces the AC_MSG_CHECKING+AC_CACHE_VAL+AC_MSG_RESULT which reduces the boilerplate in here a little bit. --- sim/ppc/configure | 66 +++++++++++++++++++++++--------------------- sim/ppc/configure.ac | 60 ++++++++++++++++++++-------------------- 2 files changed, 65 insertions(+), 61 deletions(-) diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 8810ff2f4726..7b4b998e9487 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -289,23 +289,23 @@ AC_CONFIG_HEADER(config.h:config.in) dnl Figure out what type of termio/termios support there is -AC_MSG_CHECKING(for struct termios) -AC_CACHE_VAL(ac_cv_termios_struct, -[AC_TRY_COMPILE([#include -#include ], -[static struct termios x; - x.c_iflag = 0; - x.c_oflag = 0; - x.c_cflag = 0; - x.c_lflag = 0; - x.c_cc[NCCS] = 0;], -ac_cv_termios_struct=yes, ac_cv_termios_struct=no)]) -AC_MSG_RESULT($ac_cv_termios_struct) -if test $ac_cv_termios_struct = yes; then +AC_CACHE_CHECK([for struct termios], + [sim_cv_termios_struct], + [AC_TRY_COMPILE([ +#include +#include ], [ + static struct termios x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCCS] = 0; +], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])]) +if test $sim_cv_termios_struct = yes; then AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.]) fi -if test "$ac_cv_termios_struct" = "yes"; then +if test "$sim_cv_termios_struct" = "yes"; then AC_CACHE_VAL([sim_cv_termios_cline]) AC_CHECK_MEMBER( [struct termios.c_line], @@ -321,27 +321,27 @@ else sim_cv_termios_cline=no fi -if test "$ac_cv_termios_struct" != "yes"; then - AC_MSG_CHECKING(for struct termio) - AC_CACHE_VAL(ac_cv_termio_struct, - [AC_TRY_COMPILE([#include -#include ], -[static struct termio x; - x.c_iflag = 0; - x.c_oflag = 0; - x.c_cflag = 0; - x.c_lflag = 0; - x.c_cc[NCC] = 0;], -ac_cv_termio_struct=yes, ac_cv_termio_struct=no)]) - AC_MSG_RESULT($ac_cv_termio_struct) - if test $ac_cv_termio_struct = yes; then +if test "$sim_cv_termios_struct" != "yes"; then + AC_CACHE_CHECK([for struct termio], + [sim_cv_termio_struct], + [AC_TRY_COMPILE([ +#include +#include ], [ + static struct termio x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCC] = 0; +], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])]) + if test $sim_cv_termio_struct = yes; then AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.]) fi else - ac_cv_termio_struct=no + sim_cv_termio_struct=no fi -if test "$ac_cv_termio_struct" = "yes"; then +if test "$sim_cv_termio_struct" = "yes"; then AC_CACHE_VAL([sim_cv_termio_cline]) AC_CHECK_MEMBER( [struct termio.c_line], From patchwork Tue Jan 2 05:36:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83106 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D4C63858281 for ; Tue, 2 Jan 2024 06:38:10 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D55723858412 for ; Tue, 2 Jan 2024 06:36:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D55723858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D55723858412 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177415; cv=none; b=DD82Ny9e+x1xMAvMagfMhXH3X7vKpPqpkpjEk9ik+JpuD/D3UnHrsvSzNcxFo1Yd/Q6oeDM1bY0b5cyrXMbKEyNuadOHDbpEON6hCMfSVg8/0OPLn7J+7o6xZHECaunGBLfosphPYkKB6qfVaILc/UqQvt2LWh3Mmz+gCI7xqbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177415; c=relaxed/simple; bh=Enib8Gc9nyPwAEXSPOsmBa9TWHa6caxd0hQLpgfgiGE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=WQHJ8ks3EglbhgBxEJxnE4Neys+02oJ59mCUJN39DKGKGu3xe1DGsEWIjU9+ALxjb7pfRfOWfKxBvdTPgiKddzv18heI0gg86pCzANskjlP4L/YFd9EmffsgrEkJNdMf/0mTXA/tpSedOuIORdWmubkJ23dHo2o7TVqfB3982V0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 9A94C3408DD; Tue, 2 Jan 2024 06:36:52 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 06/10] sim: ppc: move termios probes to top-level Date: Tue, 2 Jan 2024 00:36:34 -0500 Message-ID: <20240102053639.28290-6-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This is the last compile-time logic in the ppc subdir. --- sim/config.h.in | 12 +++ sim/configure | 138 ++++++++++++++++++++++++++- sim/m4/sim_ac_platform.m4 | 69 ++++++++++++++ sim/ppc/config.in | 12 --- sim/ppc/configure | 192 -------------------------------------- sim/ppc/configure.ac | 69 -------------- 6 files changed, 217 insertions(+), 275 deletions(-) diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 6f3e48f63dd2..f523f03518bb 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -213,6 +213,75 @@ AS_IF([test x"$sim_cv_sysv_shm" = x"yes"], [dnl AC_DEFINE(HAVE_SYSV_SHM, 1, [Define if System V shared memory is supported]) ]) +dnl Figure out what type of termio/termios support there is +AC_CACHE_CHECK([for struct termios], + [sim_cv_termios_struct], + [AC_TRY_COMPILE([ +#include +#include ], [ + static struct termios x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCCS] = 0; +], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])]) +if test $sim_cv_termios_struct = yes; then + AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.]) +fi + +if test "$sim_cv_termios_struct" = "yes"; then + AC_CACHE_VAL([sim_cv_termios_cline]) + AC_CHECK_MEMBER( + [struct termios.c_line], + [sim_cv_termios_cline="yes"], + [sim_cv_termios_cline="no"], [ +#include +#include +]) + if test $sim_cv_termios_cline = yes; then + AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.]) + fi +else + sim_cv_termios_cline=no +fi + +if test "$sim_cv_termios_struct" != "yes"; then + AC_CACHE_CHECK([for struct termio], + [sim_cv_termio_struct], + [AC_TRY_COMPILE([ +#include +#include ], [ + static struct termio x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCC] = 0; +], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])]) + if test $sim_cv_termio_struct = yes; then + AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.]) + fi +else + sim_cv_termio_struct=no +fi + +if test "$sim_cv_termio_struct" = "yes"; then + AC_CACHE_VAL([sim_cv_termio_cline]) + AC_CHECK_MEMBER( + [struct termio.c_line], + [sim_cv_termio_cline="yes"], + [sim_cv_termio_cline="no"], [ +#include +#include +]) + if test $sim_cv_termio_cline = yes; then + AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.]) + fi +else + sim_cv_termio_cline=no +fi + dnl Types used by common code AC_TYPE_GETGROUPS AC_TYPE_MODE_T diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 7b4b998e9487..b19be90ec33b 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -288,75 +288,6 @@ fi],[sim_xor_endian=""])dnl AC_CONFIG_HEADER(config.h:config.in) -dnl Figure out what type of termio/termios support there is -AC_CACHE_CHECK([for struct termios], - [sim_cv_termios_struct], - [AC_TRY_COMPILE([ -#include -#include ], [ - static struct termios x; - x.c_iflag = 0; - x.c_oflag = 0; - x.c_cflag = 0; - x.c_lflag = 0; - x.c_cc[NCCS] = 0; -], [sim_cv_termios_struct="yes"], [sim_cv_termios_struct="no"])]) -if test $sim_cv_termios_struct = yes; then - AC_DEFINE([HAVE_TERMIOS_STRUCTURE], 1, [Define if struct termios exists.]) -fi - -if test "$sim_cv_termios_struct" = "yes"; then - AC_CACHE_VAL([sim_cv_termios_cline]) - AC_CHECK_MEMBER( - [struct termios.c_line], - [sim_cv_termios_cline="yes"], - [sim_cv_termios_cline="no"], [ -#include -#include -]) - if test $sim_cv_termios_cline = yes; then - AC_DEFINE([HAVE_TERMIOS_CLINE], 1, [Define if struct termios has c_line.]) - fi -else - sim_cv_termios_cline=no -fi - -if test "$sim_cv_termios_struct" != "yes"; then - AC_CACHE_CHECK([for struct termio], - [sim_cv_termio_struct], - [AC_TRY_COMPILE([ -#include -#include ], [ - static struct termio x; - x.c_iflag = 0; - x.c_oflag = 0; - x.c_cflag = 0; - x.c_lflag = 0; - x.c_cc[NCC] = 0; -], [sim_cv_termio_struct="yes"], [sim_cv_termio_struct="no"])]) - if test $sim_cv_termio_struct = yes; then - AC_DEFINE([HAVE_TERMIO_STRUCTURE], 1, [Define if struct termio exists.]) - fi -else - sim_cv_termio_struct=no -fi - -if test "$sim_cv_termio_struct" = "yes"; then - AC_CACHE_VAL([sim_cv_termio_cline]) - AC_CHECK_MEMBER( - [struct termio.c_line], - [sim_cv_termio_cline="yes"], - [sim_cv_termio_cline="no"], [ -#include -#include -]) - if test $sim_cv_termio_cline = yes; then - AC_DEFINE([HAVE_TERMIO_CLINE], 1, [Define if struct termio has c_line.]) - fi -else - sim_cv_termio_cline=no -fi - AC_SUBST(sim_line_nr) AC_SUBST(sim_opcode) AC_SUBST(sim_switch) From patchwork Tue Jan 2 05:36:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83108 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A8E03385840F for ; Tue, 2 Jan 2024 06:38:47 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 13DB83858283 for ; Tue, 2 Jan 2024 06:36:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13DB83858283 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 13DB83858283 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177417; cv=none; b=oV3NVBR1ax2PX2EP6+JasoPl0f4e9yVBhLqtZne5ClBAav+a20vJlZSNQ6xOywPKmn9HqW/h/GzKOJWSZSHyUN5GQTphiu+03Pg+XM5cFgdKO0fbUBuJ6BXnCl4NWS1B3h9pHxBThWfxdyAb+dxgXJBs445X4MtP3urxRPuGIZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177417; c=relaxed/simple; bh=yWACDddv9tdjXLKWkhnmpCL72YEGZNmw2EM+uSZ6bGE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=aEhymOXOIRLxNRXBTnddM2NMXyeexiFLm3McPfF9LzP4yQ8w55cwu8OikI40YmQOtYB8bF0G+VCy1pnjrnZ6cEktIrq+Zs+wWkzZ8kWuzYpc5WqitcH+NrGKp1TmF4CErdyD81Zae75UE7h9tTOBe6veq7Uy4mu/WmNYTsBt2mo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id A5270340906; Tue, 2 Jan 2024 06:36:54 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 07/10] sim: ppc: stop including headers from gdb/ Date: Tue, 2 Jan 2024 00:36:35 -0500 Message-ID: <20240102053639.28290-7-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org The common sim code doesn't snoop in gdb/, and the ppc code doesn't need to either. Any common code we pull from gnulib/ now only. --- sim/ppc/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 8eaad7424c44..9b0cd2cffe8b 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -113,9 +113,8 @@ MAKEOVERRIDES= 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) -I../.. +INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) -I../.. LIBIBERTY_LIB = ../../libiberty/libiberty.a BFD_LIB = ../../bfd/libbfd.la From patchwork Tue Jan 2 05:36:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83111 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B72A13858294 for ; Tue, 2 Jan 2024 06:39:38 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 03D543858428 for ; Tue, 2 Jan 2024 06:36:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03D543858428 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 03D543858428 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177419; cv=none; b=fh5KLnlQZTPfvtL8l9Ko5+M9pg8O2SQ3oZgZfpzEB7Y6L6oMBJaoeL2bpUkNs6BTtS94o29ej5U19z1PXCVSDlGa79l+G5CtAKK8UF+o2auIQhlHODBep8GoLP+Dgy30byCJFZpKMO9Nu+dRPtPVtOSOIGkP8QZJcdpoN+wviqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177419; c=relaxed/simple; bh=QsWHxKPWRrCcq2Yn1z2GmJo+BGyy/MgN6W67/TNb17A=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IcqZKVU7bwJjLoT6jl62YofCyZ29VBD+BznSn6MWdcJ10QFfDsKViQAH4ZzNI490uZL+m/wEw+FL0UVIF2VFJdtN3f4wxQRUcjM7Spe635RziT5Bt2kxjxydGfxelW4mKEnmk4Xv11qTfD8xjNcvgwohxGQ1xUeaNQEf/rWkAOM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id A7630340813; Tue, 2 Jan 2024 06:36:56 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 08/10] sim: ppc: drop custom config.h header Date: Tue, 2 Jan 2024 00:36:36 -0500 Message-ID: <20240102053639.28290-8-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Now that everything has moved to the top-level, we can drop the custom ppc config.h and reuse the common one. --- sim/ppc/Makefile.in | 30 ++---- sim/ppc/configure | 216 ++++++++----------------------------------- sim/ppc/configure.ac | 6 +- sim/ppc/defs.h | 53 ----------- 4 files changed, 50 insertions(+), 255 deletions(-) delete mode 100644 sim/ppc/defs.h diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 9b0cd2cffe8b..71199fc72ede 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -70,6 +70,7 @@ MONITOR_CFLAGS = @sim_monitor@ MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@ SWITCH_CFLAGS = @sim_switch@ CONFIG_CFLAGS = \ + -DHAVE_CONFIG_H \ $(SMP_CFLAGS) \ $(XOR_ENDIAN_CFLAGS) \ $(BITSIZE_CFLAGS) \ @@ -141,9 +142,6 @@ COMMON_SIM_INLINE_H = $(srcroot)/sim/common/sim-inline.h COMMON_SIM_SIGNAL_H = $(srcroot)/sim/common/sim-signal.h # Headers in sim/ppc. -ACCONFIG_H = \ - acconfig.h - ALTIVEC_EXPRESSION_H = \ altivec_expression.h @@ -152,7 +150,6 @@ ALTIVEC_REGISTERS_H = \ BASICS_H = \ basics.h \ - $(CONFIG_H) \ $(INLINE_H) \ $(SIM_CALLBACKS_H) \ $(DEBUG_H) \ @@ -293,8 +290,7 @@ LF_H = \ lf.h MISC_H = \ - misc.h \ - $(CONFIG_H) + misc.h MON_H = \ mon.h \ @@ -353,9 +349,6 @@ WORDS_H = \ # Generated headers. -CONFIG_H = \ - config.h - DEFINES_H = \ defines.h @@ -406,8 +399,7 @@ BUILT_SRC_WO_CONFIG = \ hw.h hw.c BUILT_SRC = \ - $(BUILT_SRC_WO_CONFIG) \ - config.h + $(BUILT_SRC_WO_CONFIG) LIB_INLINE_SRC = \ psim.c \ @@ -505,9 +497,9 @@ psim.o: psim.c $(CPU_H) $(IDECODE_H) $(OPTIONS_H) $(TREE_H) $(BFD_H) bits.o: bits.c $(BASICS_H) -debug.o: debug.c $(CONFIG_H) $(BASICS_H) +debug.o: debug.c $(BASICS_H) -sim-endian.o: sim-endian.c $(CONFIG_H) $(BASICS_H) $(SIM_ENDIAN_N_H) +sim-endian.o: sim-endian.c $(BASICS_H) $(SIM_ENDIAN_N_H) os_emul.o: os_emul.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) $(EMUL_GENERIC_H) $(EMUL_NETBSD_H) $(EMUL_UNIX_H) $(EMUL_CHIRP_H) $(EMUL_BUGAPI_H) emul_generic.o: emul_generic.c $(EMUL_GENERIC_H) @@ -563,7 +555,7 @@ itable.o: itable.c $(ITABLE_H) mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H) -sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(CONFIG_H) +sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c # Rebuild options whenever something changes so the date/time is up to date. @@ -571,8 +563,8 @@ options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c defines.h: tmp-defines; @true -tmp-defines: config.h Makefile - $(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > tmp-defines.h +tmp-defines: Makefile + $(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < ../config.h > tmp-defines.h $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-defines.h defines.h $(SILENCE) touch $@ @@ -693,7 +685,7 @@ clean mostlyclean: rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG) distclean realclean: clean - rm -f TAGS Makefile config.cache config.status config.h defines.h stamp-h config.log + rm -f TAGS Makefile config.cache config.status defines.h stamp-h config.log maintainer-clean: distclean rm -f *~ *.log core *.core @@ -701,10 +693,6 @@ maintainer-clean: distclean Makefile: Makefile.in config.status CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status -config.h: stamp-h ; @true -stamp-h: config.in config.status - CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status - config.status: configure $(SHELL) ./config.status --recheck diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index b19be90ec33b..6dfc533a085b 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -285,9 +285,6 @@ if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then fi],[sim_xor_endian=""])dnl -AC_CONFIG_HEADER(config.h:config.in) - - AC_SUBST(sim_line_nr) AC_SUBST(sim_opcode) AC_SUBST(sim_switch) @@ -309,5 +306,4 @@ AC_SUBST(sim_model) AC_SUBST(sim_default_model) AC_SUBST(sim_model_issue) -AC_OUTPUT(Makefile, -[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) +AC_OUTPUT(Makefile) diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h deleted file mode 100644 index ab7a142b8994..000000000000 --- a/sim/ppc/defs.h +++ /dev/null @@ -1,53 +0,0 @@ -/* The configure generated header settings. - - Copyright 2002-2023 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* This file should be included by every .c file before any other header. */ - -#ifndef DEFS_H -#define DEFS_H - -/* Include gnulib's various configure tests. */ -#include "gnulib/config.h" - -/* This comes from gnulib. Export it until ansidecl.h handles it. */ -#define ATTRIBUTE_FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH - -/* 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 arch-specific sim's various configure tests. */ -#include "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 common sim's various configure tests. */ -#include "../config.h" - -#endif From patchwork Tue Jan 2 05:36:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83112 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50EA8385843E for ; Tue, 2 Jan 2024 06:40:18 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D7904385842B for ; Tue, 2 Jan 2024 06:36:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7904385842B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D7904385842B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177420; cv=none; b=rmb5Rp6De0Yz3RsZwAZ59xWSfntqXkWLUz3KPbJZAgQfZlF+NOLnUx0/8YaGcUsRiOQptXSDsJt7xhYFYWbIFQGz9m+FwvGcSUAD29zHX837bneM6tgc8sy89X+RqV2K7qdUoPwgc1+GK4w26IADbl6no8FfEJUGEPokJ1SbyBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177420; c=relaxed/simple; bh=+iktCAHeuV/jpXC0WlhRTkPoSzebR11fKD2aiWF+07M=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ZmJL3extjpCkDkAsp13JLMkAjNaf9Imj3wfh44O5wpOMj6/CcxHeb4tt7qvEwbId27eXYuoOoNYPPvGwZwWzFjcMGK9Ues/utomuoKm5NFOhX5/nRniqzBYOP3okZchlbxetWKpcnVwxB5XXvVMe0ur/xIIAp7B4j5NDzhoSiPk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id B08643408DD; Tue, 2 Jan 2024 06:36:58 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 09/10] sim: ppc: drop configure compiler checks Date: Tue, 2 Jan 2024 00:36:37 -0500 Message-ID: <20240102053639.28290-9-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Now that the ppc script only checks configure options and sets up variables in the Makefile from those, delete all the compile related logic to greatly simplify the configure script. --- sim/ppc/configure | 1113 +----------------------------------------- sim/ppc/configure.ac | 6 - 2 files changed, 1 insertion(+), 1118 deletions(-) diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 6dfc533a085b..a68d9727b904 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -2,12 +2,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) AC_CONFIG_MACRO_DIRS([../.. ../../config]) -AC_PROG_INSTALL -AC_PROG_CC - -dnl The sim shouldn't be checking $target and changing behavior. But it is, -dnl and until we clean that up, we need to expand --target for use below. -AC_CANONICAL_SYSTEM AC_ARG_ENABLE(sim-bitsize, [ --enable-sim-bitsize=n Specify target bitsize (32 or 64).], From patchwork Tue Jan 2 05:36:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 83109 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7769E38582A1 for ; Tue, 2 Jan 2024 06:38:56 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 16C5F385840F for ; Tue, 2 Jan 2024 06:37:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16C5F385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 16C5F385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177427; cv=none; b=W45JHKzfAbJmEgiSBEVPWodQu5++Hs13qXCBS7AXGkN/RlgLtEzbm45Cu6gu4jqbRoZrio7zOpdhYPOQYy9qNmvubFgsGmEQPDY8dLJNInaBPBm4ODU0928mcbBJE6rinBsQ+jzIMuleAqdG8vDDKLb5I88R33vqjfgMUj1jYuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704177427; c=relaxed/simple; bh=8OiQ+J8S+H8gaXxueEYUH88BI6CaawxHqhQSJf2xTzw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=gzozXmmVXOAHfHIhdVhjDXEwp+CauZc9RfBFJ1fwgoVliiEeXtALRHgxAcyEsw3sZYhAW/iiVhWHPifuLa+M1dpWl2GUTv4H/K8k4DXGFfEc7Xlk+Uax1DNaV9nLEMSOZuN9j3j2at/Cl0a530u9UUJuCErobg+iABl9tcUZH5U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id AEE49340813; Tue, 2 Jan 2024 06:37:00 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/submitted 10/10] sim: ppc: move defines.h generation to the top-level Date: Tue, 2 Jan 2024 00:36:38 -0500 Message-ID: <20240102053639.28290-10-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240102053639.28290-1-vapier@gentoo.org> References: <20240102053639.28290-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Since we rely on the top-level config.h now, the defines.h generation step should live here too. --- sim/Makefile.in | 19 +++++++++++++------ sim/ppc/Makefile.in | 10 ++-------- sim/ppc/local.mk | 9 +++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 71199fc72ede..2f638b093939 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -489,7 +489,7 @@ PACKAGE_SRC = pk_disklabel.c PACKAGE_OBJ = $(PACKAGE_SRC:.c=.o) -$(TARGETLIB): tmp-igen tmp-hw tmp-defines $(LIB_OBJ) $(GDB_OBJ) +$(TARGETLIB): tmp-igen tmp-hw defines.h $(LIB_OBJ) $(GDB_OBJ) $(ECHO_AR) $(AR) $(AR_FLAGS) $(TARGETLIB) $(LIB_OBJ) $(GDB_OBJ) $(ECHO_RANLIB) $(RANLIB) $(TARGETLIB) @@ -562,12 +562,6 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) config.status Makefile $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_opcode@"' '-DIGEN_FLAGS="$(IGEN_FLAGS)"' $(srcdir)/options.c -defines.h: tmp-defines; @true -tmp-defines: Makefile - $(ECHO_GEN) sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < ../config.h > tmp-defines.h - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-defines.h defines.h - $(SILENCE) touch $@ - # # Rules to create the built c source code files # @@ -685,7 +679,7 @@ clean mostlyclean: rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG) distclean realclean: clean - rm -f TAGS Makefile config.cache config.status defines.h stamp-h config.log + rm -f TAGS Makefile config.cache config.status stamp-h config.log maintainer-clean: distclean rm -f *~ *.log core *.core diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk index 8bcc7e7b9c39..e2d6197f5dd2 100644 --- a/sim/ppc/local.mk +++ b/sim/ppc/local.mk @@ -33,6 +33,15 @@ SIM_ALL_RECURSIVE_DEPS += common/libcommon.a noinst_PROGRAMS += %D%/run +SIM_ALL_RECURSIVE_DEPS += %D%/defines.h +%D%/defines.h: %D%/stamp-defines ; @true +%D%/stamp-defines: config.h Makefile + $(AM_V_GEN)sed -n -e '/^#define HAVE_/s/ 1$$/",/' -e '/^#define HAVE_/s//"HAVE_/p' < config.h > %D%/defines.hin + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/defines.hin %D%/defines.h + $(AM_V_at)touch $@ + +MOSTLYCLEANFILES += %D%/defines.h %D%/stamp-defines + %D%/spreg.c: @MAINT@ %D%/ppc-spr-table %D%/spreg-gen.py %D%/$(am__dirstamp) $(AM_V_GEN)$(srcdir)/%D%/spreg-gen.py --source $@.tmp $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(srcdir)/%D%/spreg.c