From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 4EBF13835680 for ; Fri, 22 Jul 2022 03:08:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4EBF13835680 Received: by mail-pj1-x102c.google.com with SMTP id ku18so3278615pjb.2 for ; Thu, 21 Jul 2022 20:08:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=+Gf6+pS+Ar8RaLjr2D3pf5EP3mK6Rq/LYG1PmpF5kvY=; b=e8pTTwrc38IYhNkBEnziKWlhO1rzS92rsbng1B8DhdpHTwiYEsTQSNP6nbtD1ILF+a R8I2fWnC3TC3NYfgqkJdlcz3ubuV9pN1arrFgj4KgfMZvLrC0SLzSze0BKpTO1XJFB6/ xBCIe9mj1iCW+kWN11qOaq2LP8pjGzWBNdpb615gzsOFkjOnZaOfapZtuESu8y7gSaBk 2PpsT4iZ5NSd0xUi5uQYyyi1XKd5UN2vfjk0MXXrXjhatfsIMmCbbqvXKU2oUcToc35e pX/z+mKmsmIWzQcbypuF5VwuZcr1gQ8HTcoKEdJFZ5zFYqmP4wBMip81Ooi9h6K5p0DA epAw== X-Gm-Message-State: AJIora9q5kWJp8R7X+7TFySTWwdRWS9Om91SVfGFEZb0C9pn2JDbODss e7zpylurc81NfnIN2We672wlCGaqp10= X-Google-Smtp-Source: AGRyM1sY4yMow7dwVjmZG9FItPQ80nhxpJ9vvstDcPnUChdSQblsOU311gGJnLs5Q0J2HjtTmQXXEA== X-Received: by 2002:a17:90b:380e:b0:1f0:4424:d53d with SMTP id mq14-20020a17090b380e00b001f04424d53dmr14894037pjb.85.1658459307003; Thu, 21 Jul 2022 20:08:27 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:228b:3e46:62b1:44c4]) by smtp.gmail.com with ESMTPSA id r27-20020aa7989b000000b0052859441ad3sm2511440pfl.214.2022.07.21.20.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 20:08:26 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 1FE7A1140248; Fri, 22 Jul 2022 12:38:24 +0930 (ACST) Date: Fri, 22 Jul 2022 12:38:24 +0930 From: Alan Modra To: binutils@sourceware.org Subject: PR17122, OSX 10.9 build failure Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3035.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2022 03:08:34 -0000 sbrk hasn't been used in binutils/ or ld/ for quite some time (so the PR was fixed a while ago). Tidy up configury. PR 17122 binutils/ * configure.ac: Don't check for sbrk. * sysdep.h (sbrk): Don't supply fallback declaration. * config.in: Regenerate. * configure: Regenerate. ld/ * configure.ac: Don't check for sbrk. * config.in: Regenerate. * configure: Regenerate. diff --git a/binutils/config.in b/binutils/config.in index 81bd143140e..131f09b4212 100644 --- a/binutils/config.in +++ b/binutils/config.in @@ -47,10 +47,6 @@ /* Is the prototype for getopt in in the expected format? */ #undef HAVE_DECL_GETOPT -/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. - */ -#undef HAVE_DECL_SBRK - /* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. */ #undef HAVE_DECL_STPCPY @@ -107,9 +103,6 @@ /* Define to 1 if msgpack is available. */ #undef HAVE_MSGPACK -/* Define to 1 if you have the `sbrk' function. */ -#undef HAVE_SBRK - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/binutils/configure b/binutils/configure index dffb75c5a71..ddb3020b3c9 100755 --- a/binutils/configure +++ b/binutils/configure @@ -13352,7 +13352,7 @@ $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt -for ac_func in getc_unlocked mkdtemp mkstemp sbrk utimensat utimes +for ac_func in getc_unlocked mkdtemp mkstemp utimensat utimes do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13678,16 +13678,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" -if test "x$ac_cv_have_decl_sbrk" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SBRK $ac_have_decl -_ACEOF ac_fn_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default" if test "x$ac_cv_have_decl_stpcpy" = xyes; then : ac_have_decl=1 diff --git a/binutils/configure.ac b/binutils/configure.ac index e204a201a0a..50dac4ee8f4 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -186,7 +186,7 @@ AC_CHECK_HEADERS(fcntl.h inttypes.h stdint.h sys/file.h \ sys/stat.h sys/time.h sys/types.h unistd.h) AC_HEADER_SYS_WAIT AC_FUNC_MMAP -AC_CHECK_FUNCS(getc_unlocked mkdtemp mkstemp sbrk utimensat utimes) +AC_CHECK_FUNCS(getc_unlocked mkdtemp mkstemp utimensat utimes) AC_MSG_CHECKING([for mbstate_t]) AC_TRY_COMPILE([#include ], @@ -266,7 +266,7 @@ if test $bu_cv_header_utime_h = yes; then AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does define struct utimbuf?]) fi -AC_CHECK_DECLS([asprintf, environ, getc_unlocked, sbrk, stpcpy, strnlen]) +AC_CHECK_DECLS([asprintf, environ, getc_unlocked, stpcpy, strnlen]) # Link in zlib if we can. This allows us to read compressed debug # sections. This is used only by readelf.c (objdump uses bfd for diff --git a/binutils/sysdep.h b/binutils/sysdep.h index ef3093ee9de..f2991c7e7ac 100644 --- a/binutils/sysdep.h +++ b/binutils/sysdep.h @@ -58,12 +58,6 @@ extern char *stpcpy (char *, const char *); #endif -#ifdef HAVE_SBRK -#if !HAVE_DECL_SBRK -extern char *sbrk (); -#endif -#endif - #if !HAVE_DECL_ENVIRON extern char **environ; #endif diff --git a/ld/config.in b/ld/config.in index d4c1fc420b5..0ccd79d59cd 100644 --- a/ld/config.in +++ b/ld/config.in @@ -75,10 +75,6 @@ /* Is the prototype for getopt in in the expected format? */ #undef HAVE_DECL_GETOPT -/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't. - */ -#undef HAVE_DECL_SBRK - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -127,9 +123,6 @@ /* Define to 1 if you have the `realpath' function. */ #undef HAVE_REALPATH -/* Define to 1 if you have the `sbrk' function. */ -#undef HAVE_SBRK - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/ld/configure b/ld/configure index fbbcb5246bb..1c2b64870b1 100755 --- a/ld/configure +++ b/ld/configure @@ -16700,7 +16700,7 @@ fi done -for ac_func in close glob lseek mkstemp open realpath sbrk waitpid +for ac_func in close glob lseek mkstemp open realpath waitpid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -16741,16 +16741,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ENVIRON $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" -if test "x$ac_cv_have_decl_sbrk" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SBRK $ac_have_decl -_ACEOF diff --git a/ld/configure.ac b/ld/configure.ac index 4331d6b1302..eb55904c090 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -366,11 +366,11 @@ AC_SUBST(NATIVE_LIB_DIRS) AC_CHECK_HEADERS(fcntl.h elf-hints.h limits.h inttypes.h stdint.h \ sys/file.h sys/mman.h sys/param.h sys/stat.h sys/time.h \ sys/types.h unistd.h) -AC_CHECK_FUNCS(close glob lseek mkstemp open realpath sbrk waitpid) +AC_CHECK_FUNCS(close glob lseek mkstemp open realpath waitpid) BFD_BINARY_FOPEN -AC_CHECK_DECLS([asprintf, environ, sbrk]) +AC_CHECK_DECLS([asprintf, environ]) AC_FUNC_MMAP -- Alan Modra Australia Development Lab, IBM