public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: libc-alpha@sourceware.org,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: [PATCH] Change fno-unit-at-a-time to fno-toplevel-reorder
Date: Sat, 16 Apr 2022 11:36:28 -0700	[thread overview]
Message-ID: <20220416183628.3522663-1-maskray@google.com> (raw)

-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


             reply	other threads:[~2022-04-16 18:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16 18:36 Fangrui Song [this message]
2022-05-01  7:10 ` Fāng-ruì Sòng
2022-05-04 18:34 ` Adhemerval Zanella
2022-05-11 18:57   ` Fangrui Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220416183628.3522663-1-maskray@google.com \
    --to=maskray@google.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).