This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: configure.in to use sed not grep -A1; search /usr/ccs/bin/elf
- From: "Kean Johnston" <jkj at sco dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 9 Apr 2003 12:12:51 -0700
- Subject: Patch: configure.in to use sed not grep -A1; search /usr/ccs/bin/elf
- Organization: The SCO Group
This is a repeat-posting. I am reposting not because I haven't
heard anything, but because the subject line in my original
post didn't indicate that there was a patch, nor what it did.
I appologise for the bad addressing.
Here's the original message ...
Sorry, I answered my own question. Get 1 line of additional
context. The way the test is being used, I submit the following
patch as a more portable alternative, and this includes the
patch I mentioned about checking for /usr/ccs/bin/elf before
/usr/ccs/bin. Note that this patch also preserves, merely
for the sake of cosmetics, the value of "unknown" in
$gcc_cv_ld_ro_rw_mix, which is used in an AC_MSG_RESULT.
PS I am not subscribed to the patches list. This was in response to
a question I myself posted on the dev list.
Kean
2003-04-08 Kean Johnston <jkj at sco dot com>
* configure.in: Use sed address ranges rather than grep -A1;
Search for as and ld in /usr/ccs/bin/elf before /usr/ccs/bin.
Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure.in,v
retrieving revision 1.627.2.7
diff -u -r1.627.2.7 configure.in
--- configure.in 4 Apr 2003 09:17:46 -0000 1.627.2.7
+++ configure.in 8 Apr 2003 08:04:35 -0000
@@ -1356,6 +1356,7 @@
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
+ /usr/ccs/bin/elf \
/usr/ccs/bin \
/udk/usr/ccs/bin \
/bsd43/usr/lib/cmplrs/cc \
@@ -1452,6 +1453,7 @@
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
+ /usr/ccs/bin/elf \
/usr/ccs/bin \
/udk/usr/ccs/bin \
/bsd43/usr/lib/cmplrs/cc \
@@ -2318,10 +2320,10 @@
&& $gcc_cv_as -o conftest3.o conftest3.s \
&& $gcc_cv_ld -shared -o conftest1.so conftest1.o \
conftest2.o conftest3.o; then
- gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
- | grep -A1 myfoosect`
- 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
+ can_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
+ | sed -n '/myfoosect/,/CONTENTS/p'`
+ if test -n "$can_ld_ro_rw_mix"; then
+ if echo "$can_ld_ro_rw_mix" | grep READONLY > /dev/null; then
gcc_cv_ld_ro_rw_mix=read-only
else
gcc_cv_ld_ro_rw_mix=read-write