From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix _sys_errlist and _sys_siglist compat symbols on ppc{,64} with GCC 4.2+
Date: Fri, 11 Apr 2008 17:13:00 -0000 [thread overview]
Message-ID: <20080411172218.GC3726@sunsite.mff.cuni.cz> (raw)
Hi!
When not using -fno-unit-at-a-time, -fno-toplevel-reorder actually does
reorder variables if -fsection-anchors (the default on ppc/ppc64),
which breaks the compatibility _sys_errlist and _sys_siglist symbols
- they all get the size of the @@ symver. Adding -fno-section-anchors
fixes this. -fno-section-anchors has been added to gcc trunk only
a month after -fno-toplevel-reorder and both appeared together in
GCC 4.2, so I think it is safe to check for both options at once.
2008-04-11 Jakub Jelinek <jakub@redhat.com>
* configure.in: Check for -fno-section-anchors in addition to
-fno-toplevel-reorder.
* configure: Rebuilt.
--- libc/configure.in.jj 2008-02-01 10:54:28.000000000 +0100
+++ libc/configure.in 2008-04-11 19:01:25.000000000 +0200
@@ -1614,11 +1614,11 @@ EOF
AC_SUBST(libc_cv_hashstyle)
fi
-AC_CACHE_CHECK(for -fno-toplevel-reorder, libc_cv_fno_toplevel_reorder, [dnl
+AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
cat > conftest.c <<EOF
int foo;
EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder
+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
@@ -1627,7 +1627,7 @@ else
fi
rm -f conftest*])
if test $libc_cv_fno_toplevel_reorder = yes; then
- fno_unit_at_a_time=-fno-toplevel-reorder
+ fno_unit_at_a_time=-fno-toplevel-reorder -fno-section-anchors
else
fno_unit_at_a_time=-fno-unit-at-a-time
fi
--- libc/configure.jj 2008-02-01 10:54:28.000000000 +0100
+++ libc/configure 2008-04-11 19:01:55.000000000 +0200
@@ -6411,15 +6411,15 @@ echo "${ECHO_T}$libc_cv_hashstyle" >&6;
fi
-{ echo "$as_me:$LINENO: checking for -fno-toplevel-reorder" >&5
-echo $ECHO_N "checking for -fno-toplevel-reorder... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
+echo $ECHO_N "checking for -fno-toplevel-reorder -fno-section-anchors... $ECHO_C" >&6; }
if test "${libc_cv_fno_toplevel_reorder+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.c <<EOF
int foo;
EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fno-toplevel-reorder -fno-section-anchors
conftest.c 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
@@ -6436,7 +6436,7 @@ fi
{ echo "$as_me:$LINENO: result: $libc_cv_fno_toplevel_reorder" >&5
echo "${ECHO_T}$libc_cv_fno_toplevel_reorder" >&6; }
if test $libc_cv_fno_toplevel_reorder = yes; then
- fno_unit_at_a_time=-fno-toplevel-reorder
+ fno_unit_at_a_time=-fno-toplevel-reorder -fno-section-anchors
else
fno_unit_at_a_time=-fno-unit-at-a-time
fi
Jakub
reply other threads:[~2008-04-11 17:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080411172218.GC3726@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/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).