public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Roland McGrath <roland@hack.frob.com>
Cc: <libc-ports@sourceware.org>
Subject: Re: [PATCH roland/arm-preconfigure] Clean up ARM preconfigure.
Date: Mon, 11 Mar 2013 23:57:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1303112356430.21125@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20130309021710.0C2E52C070@topped-with-meat.com>

On Fri, 8 Mar 2013, Roland McGrath wrote:

> > It's to avoid undefined references to unwinding functions at 
> > configure-test time that would cause problems for -nostdlib link tests, so 
> > it's set in the preconfigure script and then removed again in 
> > sysdeps/unix/sysv/linux/arm/configure.in; it's not relevant to the build 
> > itself.
> 
> Please add some comments to both files explaining the situation.

I have applied this patch to add such comments.

diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index 9db0b1b..8536181 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,12 @@
+2013-03-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/preconfigure.in: Add comment about
+	-fno-unwind-tables addition to CFLAGS.
+	* sysdeps/arm/preconfigure: Regenerated.
+	* sysdeps/unix/sysv/linux/arm/configure.in: Add comment about
+	-fno-unwind-tables removal from CFLAGS.
+	* sysdeps/unix/sysv/linux/arm/configure: Regenerated.
+
 2013-03-11  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/arm/bits/setjmp.h: Test [!__ASSEMBLER__] rather than [!_ASM].
diff --git a/ports/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure
index 0042aaf..7ba1749 100644
--- a/ports/sysdeps/arm/preconfigure
+++ b/ports/sysdeps/arm/preconfigure
@@ -5,6 +5,11 @@ case "$machine" in
 arm*)
   case $config_os in
   linux-gnueabi*)
+    # If the compiler enables unwind tables by default, this causes
+    # problems with undefined symbols in -nostdlib link tests.  To
+    # avoid this, add -fno-unwind-tables here and remove it in
+    # sysdeps/unix/sysv/linux/arm/configure.in after those tests have
+    # been run.
     if  "${CFLAGS+set}" != "set" ; then
       CFLAGS="-g -O2"
     fi
diff --git a/ports/sysdeps/arm/preconfigure.in b/ports/sysdeps/arm/preconfigure.in
index f3272f1..99f2128 100644
--- a/ports/sysdeps/arm/preconfigure.in
+++ b/ports/sysdeps/arm/preconfigure.in
@@ -5,6 +5,11 @@ case "$machine" in
 arm*)
   case $config_os in
   linux-gnueabi*)
+    # If the compiler enables unwind tables by default, this causes
+    # problems with undefined symbols in -nostdlib link tests.  To
+    # avoid this, add -fno-unwind-tables here and remove it in
+    # sysdeps/unix/sysv/linux/arm/configure.in after those tests have
+    # been run.
     if [ "${CFLAGS+set}" != "set" ]; then
       CFLAGS="-g -O2"
     fi
diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure b/ports/sysdeps/unix/sysv/linux/arm/configure
index cb94cc5..f66b158 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/configure
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure
@@ -2,4 +2,5 @@
  # Local configure fragment for sysdeps/unix/sysv/linux/arm.
 
 libc_cv_gcc_unwind_find_fde=no
+# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in.
 CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure.in b/ports/sysdeps/unix/sysv/linux/arm/configure.in
index 3e67dee..8fffe94 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure.in
@@ -2,4 +2,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/unix/sysv/linux/arm.
 
 libc_cv_gcc_unwind_find_fde=no
+# Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.in.
 CFLAGS=${CFLAGS% -fno-unwind-tables}

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2013-03-11 23:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 22:52 Roland McGrath
2013-03-09  1:32 ` Joseph S. Myers
2013-03-09  2:17   ` Roland McGrath
2013-03-11 23:57     ` Joseph S. Myers [this message]
2013-03-12  0:07       ` Roland McGrath

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=Pine.LNX.4.64.1303112356430.21125@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    --cc=roland@hack.frob.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).