From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 42D6A3858423; Sat, 5 Nov 2022 03:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42D6A3858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667619933; bh=GddIZMot/3DTJjUkzkg1SL2V7s7QCTpaldGrpX0dlNY=; h=From:To:Subject:Date:From; b=E+ggXlBcgvNuarYR5JRKrjHERmEHkyQL0fpPbmHxxutSPb1YnazfVd7vyIVGg88Vv 6kDBHP0BadUaYNgO3wgYSe6CxtaIGdr9ZiH9e5aU1J+0FfhwMLvxJeLCvsyhuhk7TB EjFy8tfS3Ndejni1FzCawyTDK4bxSN/TKrb9N5vY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: ppc: drop unused /dev/zero logic X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 1b2af6a41e68e6deac7c54183131e01cf34584b5 X-Git-Newrev: 0fa7ad4eb4f76e24fabf6a15197f078a3ba60d80 Message-Id: <20221105034533.42D6A3858423@sourceware.org> Date: Sat, 5 Nov 2022 03:45:33 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0fa7ad4eb4f7= 6e24fabf6a15197f078a3ba60d80 commit 0fa7ad4eb4f76e24fabf6a15197f078a3ba60d80 Author: Mike Frysinger Date: Sat Nov 5 10:02:58 2022 +0700 sim: ppc: drop unused /dev/zero logic =20 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. Diff: --- 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 6575f962c9d..72dc479d191 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -74,7 +74,6 @@ FLOAT_CFLAGS =3D @sim_float@ MONITOR_CFLAGS =3D @sim_monitor@ MODEL_CFLAGS =3D @sim_model@ @sim_default_model@ @sim_model_issue@ TERMIO_CFLAGS =3D @sim_termio@ -DEVZERO_CFLAGS =3D @sim_devzero@ CONFIG_CFLAGS =3D \ $(SMP_CFLAGS) \ $(XOR_ENDIAN_CFLAGS) \ @@ -84,8 +83,7 @@ CONFIG_CFLAGS =3D \ $(FLOAT_CFLAGS) \ $(MONITOR_CFLAGS) \ $(MODEL_CFLAGS) \ - $(TERMIO_CFLAGS) \ - $(DEVZERO_CFLAGS) + $(TERMIO_CFLAGS) SIM_FPU_CFLAGS =3D -DHAVE_COMMON_FPU -I../common -I${srcdir}/../common =20 STD_CFLAGS =3D $(CFLAGS) $(WERROR_CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS= ) $(WARN_CFLAGS) $(INCLUDES) $(INCGNU) $(SIM_FPU_CFLAGS) diff --git a/sim/ppc/configure b/sim/ppc/configure index c231e514190..df95a6febf6 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -621,7 +621,6 @@ ac_includes_default=3D"\ =20 ac_subst_vars=3D'LTLIBOBJS LIBOBJS -sim_devzero sim_termio sim_model_issue sim_default_model @@ -4157,53 +4156,6 @@ _ACEOF fi =20 =20 -sim_devzero=3D"" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/zero" >&5 -$as_echo_n "checking for /dev/zero... " >&6; } -if ${ac_cv_devzero+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" =3D yes; then : - ac_cv_devzero=3Dno -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -main () { - char buf[2048]; - int i; - int fd =3D open ("/dev/zero", O_RDONLY); - if (fd < 0) - return 1; - for (i =3D 0; i < sizeof (buf); i++) - buf[i] =3D 1; - if (read (fd, buf, sizeof (buf)) !=3D sizeof (buf)) - return 1; - for (i =3D 0; i < sizeof (buf); i++) - if (buf[i]) - return 1; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_devzero=3Dyes -else - ac_cv_devzero=3Dno -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_devzero" >&5 -$as_echo "$ac_cv_devzero" >&6; } -if test $ac_cv_devzero =3D yes; then - sim_devzero=3D"-DHAVE_DEVZERO" -else - sim_devzero=3D"" -fi - # Since we run commands on the build system, we have to create a # separate config header for the build system if build !=3D host. if test x$host =3D x$build; then @@ -4257,7 +4209,6 @@ fi =20 =20 =20 - =20 =20 ac_config_files=3D"$ac_config_files Makefile" diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 3054202dea2..542e8a105fb 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -490,33 +490,6 @@ fi =20 AC_CHECK_TYPES(long long) =20 -dnl Figure out if /dev/zero exists or not -sim_devzero=3D"" -AC_MSG_CHECKING(for /dev/zero) -AC_CACHE_VAL(ac_cv_devzero, -[AC_TRY_RUN([#include -main () { - char buf[2048]; - int i; - int fd =3D open ("/dev/zero", O_RDONLY); - if (fd < 0) - return 1; - for (i =3D 0; i < sizeof (buf); i++) - buf[i] =3D 1; - if (read (fd, buf, sizeof (buf)) !=3D sizeof (buf)) - return 1; - for (i =3D 0; i < sizeof (buf); i++) - if (buf[i]) - return 1; - return 0; -}],[ac_cv_devzero=3Dyes],[ac_cv_devzero=3Dno],[ac_cv_devzero=3Dno])]) -AC_MSG_RESULT($ac_cv_devzero) -if test $ac_cv_devzero =3D yes; then - sim_devzero=3D"-DHAVE_DEVZERO" -else - sim_devzero=3D"" -fi - # Since we run commands on the build system, we have to create a # separate config header for the build system if build !=3D host. if test x$host =3D 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) =20 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 8e1c2629940..a696db1b623 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 }; =20 int i;