This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR target/10663
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Cc: DJ Delorie <dj at redhat dot com>
- Date: Wed, 28 May 2003 09:08:57 +0200
- Subject: [PATCH] Fix PR target/10663
Hi,
This patch aims at fixing PR target/10663, which deals with three configure
problems on Sparc boxes introduced back in December by:
2002-11-26 Jakub Jelinek <jakub@redhat.com>
[...]
* configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does
when linking read-only and read-write sections together.
* configure, config.in: Rebuilt.
[...]
(1) On Solaris 8 and 9, the Sun assembler chokes on the files it is fed with,
(2) On Solaris 2.5.1, 2.6 and 7, the Sun linker chokes on the '-shared'
option it is passed,
(3) On Solaris+binutils, the Sun grep chokes on the '-A1' option it is
passed.
This check is obviously GNU-specific so I didn't bother tweaking (1) and (2)
and redirected everything to /dev/null. As for (3), I replaced the GNUism by
a more portable sed invocation.
Tested on Solaris 2.5.1, 2.6, 7, 8 and 9. I think that the bugs can be
qualified as regressions from GCC 3.2.x since the configure output is clean
for the latter so I'm requesting approval for mainline and 3.3 branch.
--
Eric Botcazou
2003-05-28 Eric Botcazou <ebotcazou@libertysurf.fr>
* configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Redirect
assembler and linker output to /dev/null.
Use a 'sed' construct instead of 'grep -A1'.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.627.2.8
diff -u -r1.627.2.8 configure.in
--- configure.in 12 May 2003 18:49:18 -0000 1.627.2.8
+++ configure.in 27 May 2003 14:29:38 -0000
@@ -2313,13 +2313,16 @@
echo '.byte 1' >> conftest2.s
echo '.section "myfoosect", "a"' > conftest3.s
echo '.byte 0' >> conftest3.s
- if $gcc_cv_as -o conftest1.o conftest1.s \
- && $gcc_cv_as -o conftest2.o conftest2.s \
- && $gcc_cv_as -o conftest3.o conftest3.s \
+ if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \
+ && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \
+ && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \
&& $gcc_cv_ld -shared -o conftest1.so conftest1.o \
- conftest2.o conftest3.o; then
+ conftest2.o conftest3.o > /dev/null 2>&1; then
gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
- | grep -A1 myfoosect`
+ | sed -n '/myfoosect/{
+ N
+ p
+ }'`
if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
gcc_cv_ld_ro_rw_mix=read-only