From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by sourceware.org (Postfix) with ESMTPS id D56ED3858D28 for ; Sun, 1 May 2022 07:10:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D56ED3858D28 Received: by mail-yb1-xb2e.google.com with SMTP id i38so21279956ybj.13 for ; Sun, 01 May 2022 00:10:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=vUuXBwEhI2da9QI96foo6Da1X2XjJFQsL/RkOD6lxwA=; b=mWqlehxVHY648ReUEgaf0lBG7bh/L9wcY23Oj7OghGnWCmSml23JBL87dnw3x4HFl7 FjDObtPkUf6irmKGeCE96RKNidVkVE/eY+Egq5s97QSv7gUtkMtLu3/bQBktbut56lHb ijajrsmCuTi5DL/yj51zQBvfbYsL1pTT+jpRzVOG7NBa25HNy4vZBooZy6SisSAto/NQ aQP4NSu9h4As0fRNbM/Zige/eEOIO2hg82P2L8mL/q/r7LLSbbGcnYI5BXgVOKvoNIuK Bk0UGehBFHmoxz0EPhKHDGQN2xs6850KOxZDnv9QBGZkW5oE05wdlVIcXNb2amN63G57 RHsA== X-Gm-Message-State: AOAM5334/R9MNHHCqg6uod2DcG77jEPstvpbMfywabg2WeE9kyRnb9DW iAIs/eSLDJ4R8KwT0NMmauhDR28f37LYKNrgkxZhpLSGw2RIAw== X-Google-Smtp-Source: ABdhPJzi8Z6UWZ4jwmLwG7HUnMxrXVehEoV82Q/G+3epVrw2iSZVekyNfUAM1buADTVrqX2ckM3YIowueate0kKKve4= X-Received: by 2002:a25:20d4:0:b0:645:d55b:f0df with SMTP id g203-20020a2520d4000000b00645d55bf0dfmr5998649ybg.537.1651389014977; Sun, 01 May 2022 00:10:14 -0700 (PDT) MIME-Version: 1.0 References: <20220416183628.3522663-1-maskray@google.com> In-Reply-To: <20220416183628.3522663-1-maskray@google.com> From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Sun, 1 May 2022 00:10:03 -0700 Message-ID: Subject: Re: [PATCH] Change fno-unit-at-a-time to fno-toplevel-reorder To: libc-alpha@sourceware.org, Adhemerval Zanella Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-24.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: Sun, 01 May 2022 07:10:22 -0000 On Sat, Apr 16, 2022 at 11:36 AM Fangrui Song wrote: > > -fno-toplevel-reorder is a rough replacement for the legacy option > -fno-unit-at-a-time > (https://sourceware.org/pipermail/gcc-patches/2006-January/186801.html). > glibc currently requires GCC>=6.2 which assuredly has > -fno-toplevel-reorder -fno-section-anchors. Clang will use the else > branch as it does not implement -fno-toplevel-reorder. > --- > config.make.in | 2 +- > configure | 6 +++--- > configure.ac | 6 +++--- > stdio-common/Makefile | 4 ++-- > 4 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/config.make.in b/config.make.in > index bf728c71c0..65e1f46da4 100644 > --- a/config.make.in > +++ b/config.make.in > @@ -68,7 +68,7 @@ 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@ > +fno-toplevel-reorder = @fno_toplevel_reorder@ > bind-now = @bindnow@ > have-hash-style = @libc_cv_hashstyle@ > use-default-link = @use_default_link@ > diff --git a/configure b/configure > index d2f413d05d..4c7b159b13 100755 > --- a/configure > +++ b/configure > @@ -620,7 +620,7 @@ libc_cv_cc_loop_to_function > libc_cv_cc_submachine > libc_cv_cc_nofma > libc_cv_mtls_dialect_gnu2 > -fno_unit_at_a_time > +fno_toplevel_reorder > libc_cv_has_glob_dat > libc_cv_hashstyle > libc_cv_fpie > @@ -6305,9 +6305,9 @@ 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" > + fno_toplevel_reorder="-fno-toplevel-reorder -fno-section-anchors" > else > - fno_unit_at_a_time=-fno-unit-at-a-time > + fno_toplevel_reorder= > fi > > > diff --git a/configure.ac b/configure.ac > index b6a747dece..bdff5981c1 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1460,11 +1460,11 @@ else > fi > rm -f conftest*]) > if test $libc_cv_fno_toplevel_reorder = yes; then > - fno_unit_at_a_time="-fno-toplevel-reorder -fno-section-anchors" > + fno_toplevel_reorder="-fno-toplevel-reorder -fno-section-anchors" > else > - fno_unit_at_a_time=-fno-unit-at-a-time > + fno_toplevel_reorder= > fi > -AC_SUBST(fno_unit_at_a_time) > +AC_SUBST(fno_toplevel_reorder) > > AC_CACHE_CHECK([for -mtls-dialect=gnu2], libc_cv_mtls_dialect_gnu2, > [dnl > diff --git a/stdio-common/Makefile b/stdio-common/Makefile > index 435cd8904f..6de2dd84ce 100644 > --- a/stdio-common/Makefile > +++ b/stdio-common/Makefile > @@ -333,8 +333,8 @@ 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) > +CFLAGS-errlist.c += $(fno-toplevel-reorder) > +CFLAGS-siglist.c += $(fno-toplevel-reorder) > > # scanf14a.c and scanf16a.c test a deprecated extension which is no > # longer visible under most conformance levels; see the source files > -- > 2.36.0.rc0.470.gd361397f0d-goog > Ping