From patchwork Sat Nov 5 03:56:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 59984 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 588533858418 for ; Sat, 5 Nov 2022 03:56:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 588533858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667620615; bh=vPs8f/BXg2XBlN1Tf+afzl1o7l2UQlIs0/rq9gI3DC0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=M1bpf7H9wWFZw0t7h9k7apClm3nYABQQMbsczvRqJNLdVjkFEqP+mdzlWHQ2VhZic jCEJZsIcK2IzHJULFpbC5qZfRlo54sqtF9fpFk4qTv3LxZQ05nBJfPZX0U21He1Mlt IlHJj5E4K5DKpdQIPHktci+Ha3LH3WrtqdWHkNdw= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 42B1B3858D38 for ; Sat, 5 Nov 2022 03:56:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 42B1B3858D38 Received: by smtp.gentoo.org (Postfix, from userid 559) id D556A3407E0; Sat, 5 Nov 2022 03:56:29 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: ppc: drop unused /dev/zero logic Date: Sat, 5 Nov 2022 10:56:23 +0700 Message-Id: <20221105035623.17239-1-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Nothing in the tree checks this option, or has checked for decades. The pre-cvs-import ChangeLog suggests this was added & removed back then, but can't be sure as that history doesn't exist in the VCS. --- sim/ppc/Makefile.in | 4 +--- sim/ppc/configure | 49 -------------------------------------------- sim/ppc/configure.ac | 28 ------------------------- sim/ppc/options.c | 4 ---- 4 files changed, 1 insertion(+), 84 deletions(-) diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index 6575f962c9dd..72dc479d1912 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -74,7 +74,6 @@ FLOAT_CFLAGS = @sim_float@ MONITOR_CFLAGS = @sim_monitor@ MODEL_CFLAGS = @sim_model@ @sim_default_model@ @sim_model_issue@ TERMIO_CFLAGS = @sim_termio@ -DEVZERO_CFLAGS = @sim_devzero@ CONFIG_CFLAGS = \ $(SMP_CFLAGS) \ $(XOR_ENDIAN_CFLAGS) \ @@ -84,8 +83,7 @@ CONFIG_CFLAGS = \ $(FLOAT_CFLAGS) \ $(MONITOR_CFLAGS) \ $(MODEL_CFLAGS) \ - $(TERMIO_CFLAGS) \ - $(DEVZERO_CFLAGS) + $(TERMIO_CFLAGS) SIM_FPU_CFLAGS = -DHAVE_COMMON_FPU -I../common -I${srcdir}/../common STD_CFLAGS = $(CFLAGS) $(WERROR_CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(INCGNU) $(SIM_FPU_CFLAGS) diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 3054202dea20..542e8a105fbb 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -490,33 +490,6 @@ fi AC_CHECK_TYPES(long long) -dnl Figure out if /dev/zero exists or not -sim_devzero="" -AC_MSG_CHECKING(for /dev/zero) -AC_CACHE_VAL(ac_cv_devzero, -[AC_TRY_RUN([#include -main () { - char buf[2048]; - int i; - int fd = open ("/dev/zero", O_RDONLY); - if (fd < 0) - return 1; - for (i = 0; i < sizeof (buf); i++) - buf[i] = 1; - if (read (fd, buf, sizeof (buf)) != sizeof (buf)) - return 1; - for (i = 0; i < sizeof (buf); i++) - if (buf[i]) - return 1; - return 0; -}],[ac_cv_devzero=yes],[ac_cv_devzero=no],[ac_cv_devzero=no])]) -AC_MSG_RESULT($ac_cv_devzero) -if test $ac_cv_devzero = yes; then - sim_devzero="-DHAVE_DEVZERO" -else - sim_devzero="" -fi - # Since we run commands on the build system, we have to create a # separate config header for the build system if build != host. if test x$host = x$build; then @@ -570,7 +543,6 @@ AC_SUBST(sim_model) AC_SUBST(sim_default_model) AC_SUBST(sim_model_issue) AC_SUBST(sim_termio) -AC_SUBST(sim_devzero) AC_OUTPUT(Makefile, [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) diff --git a/sim/ppc/options.c b/sim/ppc/options.c index 8e1c2629940a..a696db1b623e 100644 --- a/sim/ppc/options.c +++ b/sim/ppc/options.c @@ -198,10 +198,6 @@ print_options (void) #ifdef HAVE_TERMIO_STRUCTURE "HAVE_TERMIO_STRUCTURE", #endif - -#ifdef HAVE_DEVZERO - "HAVE_DEVZERO", -#endif }; int i;