This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 3.3 configure grep usage?


> I am finally trying to get gcc 3.3 to work on OpenServer.
> I ran into my first teeny problem. configure, while trying
> to check "linker read-only and read-write section mixing"
> uses an option "-A1" to grep. At least our grep doesn't
> grok that option. What's it do? Can the test be written
> another way?
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 myslef posted on the dev list.

Kean


Index: ChangeLog
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.16114.2.418
diff -u -r1.16114.2.418 ChangeLog
--- ChangeLog	8 Apr 2003 06:41:15 -0000	1.16114.2.418
+++ ChangeLog	8 Apr 2003 08:04:35 -0000
@@ -1,3 +1,7 @@
+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.
+
 2003-04-07  Matt Kraai  <kraai at alumni dot cmu dot edu>
 
 	* doc/install.texi: Use @command and @samp for single- and
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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]