From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 207AC3858D3C for ; Wed, 30 Mar 2022 12:46:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 207AC3858D3C Received: by mail-ot1-x330.google.com with SMTP id k25-20020a056830151900b005b25d8588dbso14826854otp.4 for ; Wed, 30 Mar 2022 05:46:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=3Wlj/7yhKvH1h0wG+hCfhem/Hd6KkOfahWqrJDM0GrA=; b=l3Q+2fwknT410NiOkiHMNRw5BAJe97WFbpkD1gWf5zwC73SYmXmrLmiWay+99Ha7gc HIJGypmefwRHi2nHgW+Dyu73/GCfQwsAT9uG10gAhAzL1MK/X8uJS24PPznnSQv9cTIk O87eYSYrN/BlvWpDGP8Ix8Ah1ChMhTfTQas1qqVRkpxoLMbyMX3xAcsTUh0Z/7BUntUd aBfRCO0Fs2IWRm6bKDmvHzQoYy+mfwTGZtsgPLFuGqiMRK88a0e22UGHHrmZj8mNLzWE LVVIFjtBfF+X2QU/LyYFwMBwHHuQC3CrMXyGiJqChwZcL3wRcDrHtwFGlN1Fr3T9B6kc U1cA== X-Gm-Message-State: AOAM5316H13652C5W9sdRnUyxnFkBdDOYvEmAPyG4eZ+vA6FcUoi/whc nsR/Xq9YOzNb/bydgFVyyKAZRfhHM8eRqw== X-Google-Smtp-Source: ABdhPJwTUZ/yZ2gr1yizBVcUVBVp+e27xMmiZl7lvbd2hrtVdraNmKsJrczdjL0a4Y6Ue4HjyZj3bg== X-Received: by 2002:a9d:4798:0:b0:5b2:3791:beb7 with SMTP id b24-20020a9d4798000000b005b23791beb7mr2961198otf.123.1648644393341; Wed, 30 Mar 2022 05:46:33 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:a6c0:ca7b:5b69:d952:46d0? ([2804:431:c7cb:a6c0:ca7b:5b69:d952:46d0]) by smtp.gmail.com with ESMTPSA id f21-20020a056830205500b005cdb59d5d34sm9534976otp.81.2022.03.30.05.46.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Mar 2022 05:46:32 -0700 (PDT) Message-ID: <0295bfe2-2f44-c15e-1628-acaf94fc407c@linaro.org> Date: Wed, 30 Mar 2022 09:46:30 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] Remove fno-unit-at-a-time make variable Content-Language: en-US To: Fangrui Song , libc-alpha@sourceware.org References: <20220330050729.2176630-1-maskray@google.com> From: Adhemerval Zanella In-Reply-To: <20220330050729.2176630-1-maskray@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2022 12:46:38 -0000 On 30/03/2022 02:07, Fangrui Song wrote: > 795985e4e751 in 2003 added -fno-unit-at-a-time to errlist.c and > siglist.c to "avoid reordering assembler output". -fno-toplevel-reorder > is a rough replacement for this legacy option > (https://sourceware.org/pipermail/gcc-patches/2006-January/186801.html). > > The reordering requirement does not seem to be needed any longer. We still need them for otherwise DEFINE_COMPAT_ERRLIST used on errlist-compat.c does not create _sys_errlist and _sys_siglist with expected sizes defined by glibc ABI. I am trying to fix without resorting to compiler options. > --- > config.make.in | 1 - > configure | 32 -------------------------------- > configure.ac | 19 ------------------- > stdio-common/Makefile | 2 -- > 4 files changed, 54 deletions(-) > > diff --git a/config.make.in b/config.make.in > index 6d43e691f7..ecde84a7da 100644 > --- a/config.make.in > +++ b/config.make.in > @@ -69,7 +69,6 @@ have-selinux = @have_selinux@ > have-libaudit = @have_libaudit@ > have-libcap = @have_libcap@ > have-cc-with-libunwind = @libc_cv_cc_with_libunwind@ > -fno-unit-at-a-time = @fno_unit_at_a_time@ > bind-now = @bindnow@ > have-hash-style = @libc_cv_hashstyle@ > use-default-link = @use_default_link@ > diff --git a/configure b/configure > index 2a3cb49b0b..f836874a58 100755 > --- a/configure > +++ b/configure > @@ -620,7 +620,6 @@ libc_cv_cc_loop_to_function > libc_cv_cc_submachine > libc_cv_cc_nofma > libc_cv_mtls_dialect_gnu2 > -fno_unit_at_a_time > libc_cv_has_glob_dat > libc_cv_hashstyle > libc_cv_fpie > @@ -6319,37 +6318,6 @@ fi > $as_echo "$libc_cv_has_glob_dat" >&6; } > > > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-toplevel-reorder -fno-section-anchors" >&5 > -$as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; } > -if ${libc_cv_fno_toplevel_reorder+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - cat > conftest.c < -int foo; > -EOF > -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder -fno-section-anchors > - conftest.c 1>&5' > - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 > - (eval $ac_try) 2>&5 > - ac_status=$? > - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > - test $ac_status = 0; }; } > -then > - libc_cv_fno_toplevel_reorder=yes > -else > - libc_cv_fno_toplevel_reorder=no > -fi > -rm -f conftest* > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fno_toplevel_reorder" >&5 > -$as_echo "$libc_cv_fno_toplevel_reorder" >&6; } > -if test $libc_cv_fno_toplevel_reorder = yes; then > - fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors" > -else > - fno_unit_at_a_time=-fno-unit-at-a-time > -fi > - > - > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mtls-dialect=gnu2" >&5 > $as_echo_n "checking for -mtls-dialect=gnu2... " >&6; } > if ${libc_cv_mtls_dialect_gnu2+:} false; then : > diff --git a/configure.ac b/configure.ac > index fa7d3c025b..ec1db36d46 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1478,25 +1478,6 @@ fi > rm -f conftest*]) > AC_SUBST(libc_cv_has_glob_dat) > > -AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl > -cat > conftest.c < -int foo; > -EOF > -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder -fno-section-anchors > - conftest.c 1>&AS_MESSAGE_LOG_FD]) > -then > - libc_cv_fno_toplevel_reorder=yes > -else > - libc_cv_fno_toplevel_reorder=no > -fi > -rm -f conftest*]) > -if test $libc_cv_fno_toplevel_reorder = yes; then > - fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors" > -else > - fno_unit_at_a_time=-fno-unit-at-a-time > -fi > -AC_SUBST(fno_unit_at_a_time) > - > AC_CACHE_CHECK([for -mtls-dialect=gnu2], libc_cv_mtls_dialect_gnu2, > [dnl > cat > conftest.c < diff --git a/stdio-common/Makefile b/stdio-common/Makefile > index 435cd8904f..dbaecbd76e 100644 > --- a/stdio-common/Makefile > +++ b/stdio-common/Makefile > @@ -333,8 +333,6 @@ CFLAGS-isoc99_vfscanf.c += -fexceptions > CFLAGS-isoc99_vscanf.c += -fexceptions > CFLAGS-isoc99_fscanf.c += -fexceptions > CFLAGS-isoc99_scanf.c += -fexceptions > -CFLAGS-errlist.c += $(fno-unit-at-a-time) > -CFLAGS-siglist.c += $(fno-unit-at-a-time) > > # scanf14a.c and scanf16a.c test a deprecated extension which is no > # longer visible under most conformance levels; see the source files