public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* non-portable construct in gcc configure script
@ 2003-05-16  1:07 Joe Buck
  2003-05-16  9:41 ` Eric Botcazou
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joe Buck @ 2003-05-16  1:07 UTC (permalink / raw)
  To: gcc

In the test labeled

AC_MSG_CHECKING(linker read-only and read-write section mixing)

gcc/configure.in in 3.3 uses "grep -A1".  This feature is not in Solaris's
grep.  It's not in the HP-UX grep either.

The result is that the configure output looks like


checking linker read-only and read-write section mixing... grep: illegal option -- A
grep: illegal option -- 1
Usage: grep -hblcnsviw pattern file . . .

on Solaris 2.8.  The failure appears harmless, but I'm not sure.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-05-16  1:07 non-portable construct in gcc configure script Joe Buck
@ 2003-05-16  9:41 ` Eric Botcazou
  2003-05-16 20:35 ` target/10663 (was Re: non-portable construct in gcc configure script) Kelley Cook
  2003-05-24 21:37 ` non-portable construct in gcc configure script Eric Botcazou
  2 siblings, 0 replies; 9+ messages in thread
From: Eric Botcazou @ 2003-05-16  9:41 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

> In the test labeled
>
> AC_MSG_CHECKING(linker read-only and read-write section mixing)
>
> gcc/configure.in in 3.3 uses "grep -A1".  This feature is not in Solaris's
> grep.  It's not in the HP-UX grep either.
>
> The result is that the configure output looks like
>
>
> checking linker read-only and read-write section mixing... grep: illegal
> option -- A grep: illegal option -- 1
> Usage: grep -hblcnsviw pattern file . . .
>
> on Solaris 2.8.

I filled PR target/10663 for it.

> The failure appears harmless, but I'm not sure.

I think it is.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* target/10663 (was Re: non-portable construct in gcc configure script)
  2003-05-16  1:07 non-portable construct in gcc configure script Joe Buck
  2003-05-16  9:41 ` Eric Botcazou
@ 2003-05-16 20:35 ` Kelley Cook
  2003-05-24 21:37 ` non-portable construct in gcc configure script Eric Botcazou
  2 siblings, 0 replies; 9+ messages in thread
From: Kelley Cook @ 2003-05-16 20:35 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc, gcc-gnats

Joe Buck wrote:
> In the test labeled
> 
> AC_MSG_CHECKING(linker read-only and read-write section mixing)
> 
> gcc/configure.in in 3.3 uses "grep -A1".  This feature is not in Solaris's
> grep.  It's not in the HP-UX grep either.
> 
> The result is that the configure output looks like
> 
> checking linker read-only and read-write section mixing... grep: illegal option -- A
> grep: illegal option -- 1
> Usage: grep -hblcnsviw pattern file . . .
> 
> on Solaris 2.8.  The failure appears harmless, but I'm not sure.

There is another non-portable feature in that exact same test.

I sent a patch for it a few weeks ago, if someone would like to review that
at the same time.

http://gcc.gnu.org/ml/gcc-patches/2003-04/msg02262.html

--- forward ----
Cygwin is not completing the "linker read-only and
read-write section mixing" configure test. It aborts with:

conftest1.s: Assembler messages:
conftest1.s:1: Warning: rest of line ignored; first ignored
character is `"'

It seems that Cygwin's "as" doesn't like double-quotes
surrounding it's section names.  This in itself may or may
not be a bug, but it that is not what this particular
conftest is testing.  Regardless, from what I can gather
from the gas docs not having the quotes should be OK on all
targets.
---- end ----

Kelley Cook


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-05-16  1:07 non-portable construct in gcc configure script Joe Buck
  2003-05-16  9:41 ` Eric Botcazou
  2003-05-16 20:35 ` target/10663 (was Re: non-portable construct in gcc configure script) Kelley Cook
@ 2003-05-24 21:37 ` Eric Botcazou
  2003-06-01 17:49   ` Zack Weinberg
  2 siblings, 1 reply; 9+ messages in thread
From: Eric Botcazou @ 2003-05-24 21:37 UTC (permalink / raw)
  To: Joe Buck; +Cc: gcc

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

> In the test labeled
>
> AC_MSG_CHECKING(linker read-only and read-write section mixing)
>
> gcc/configure.in in 3.3 uses "grep -A1".  This feature is not in Solaris's
> grep.  It's not in the HP-UX grep either.
>
> The result is that the configure output looks like
>
>
> checking linker read-only and read-write section mixing... grep: illegal
> option -- A grep: illegal option -- 1
> Usage: grep -hblcnsviw pattern file . . .
>
> on Solaris 2.8.  The failure appears harmless, but I'm not sure.

Does the attached patch cure it? The construct works on the 5 Solaris 
versions I have access to, but I can't directly test the configure check 
because it dies earlier with the native Sun tools.

-- 
Eric Botcazou

[-- Attachment #2: pr10663-1.diff --]
[-- Type: text/x-diff, Size: 732 bytes --]

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	24 May 2003 20:04:38 -0000
@@ -2319,7 +2319,10 @@
      && $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`
+			 | 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-05-24 21:37 ` non-portable construct in gcc configure script Eric Botcazou
@ 2003-06-01 17:49   ` Zack Weinberg
  2003-06-01 19:13     ` Eric Botcazou
  0 siblings, 1 reply; 9+ messages in thread
From: Zack Weinberg @ 2003-06-01 17:49 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Joe Buck, gcc

Eric Botcazou <ebotcazou@libertysurf.fr> writes:

>
> Does the attached patch cure it? The construct works on the 5 Solaris 
> versions I have access to, but I can't directly test the configure check 
> because it dies earlier with the native Sun tools.

That looks like a sensible way to do it.

> -			 | grep -A1 myfoosect`
> +			 | sed -n '/.*myfoosect.*/{
> +						  N
> +						  p
> +						  }'`

Suggest  '/myfoosect/{; N; p; }'

zw

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-06-01 17:49   ` Zack Weinberg
@ 2003-06-01 19:13     ` Eric Botcazou
  2003-06-01 19:51       ` Zack Weinberg
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Botcazou @ 2003-06-01 19:13 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: Joe Buck, gcc

> That looks like a sensible way to do it.

Thanks for your answer!

> > -			 | grep -A1 myfoosect`
> > +			 | sed -n '/.*myfoosect.*/{
> > +						  N
> > +						  p
> > +						  }'`
>
> Suggest  '/myfoosect/{; N; p; }'

Yes, the '.*' are clearly superfluous. But the ';' as separator doesn't work 
with Solaris sed so I resorted to what the Solaris manual says (and which 
works with GNU sed too).

I've already posted a patch, not yet reviewed:
http://gcc.gnu.org/ml/gcc-patches/2003-05/msg02277.html

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-06-01 19:13     ` Eric Botcazou
@ 2003-06-01 19:51       ` Zack Weinberg
  2003-06-02 10:23         ` Eric Botcazou
  0 siblings, 1 reply; 9+ messages in thread
From: Zack Weinberg @ 2003-06-01 19:51 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Joe Buck, gcc

Eric Botcazou <ebotcazou@libertysurf.fr> writes:

>> That looks like a sensible way to do it.
>
> Thanks for your answer!
>
>> > -			 | grep -A1 myfoosect`
>> > +			 | sed -n '/.*myfoosect.*/{
>> > +						  N
>> > +						  p
>> > +						  }'`
>>
>> Suggest  '/myfoosect/{; N; p; }'
>
> Yes, the '.*' are clearly superfluous. But the ';' as separator doesn't work 
> with Solaris sed so I resorted to what the Solaris manual says (and which 
> works with GNU sed too).

Odd, ; as separator works fine for me with /usr/bin/sed on Solaris 8.
However, this is tangential.

> I've already posted a patch, not yet reviewed:
> http://gcc.gnu.org/ml/gcc-patches/2003-05/msg02277.html

I'll approve that patch.

zw

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-06-01 19:51       ` Zack Weinberg
@ 2003-06-02 10:23         ` Eric Botcazou
  2003-06-02 16:19           ` Zack Weinberg
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Botcazou @ 2003-06-02 10:23 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: Joe Buck, gcc

> Odd, ; as separator works fine for me with /usr/bin/sed on Solaris 8.
> However, this is tangential.

Hum, you're right, your construct works on Solaris 2.5.1, 2.6 and 9 too.
I probably messed up the expression within the curly brackets.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: non-portable construct in gcc configure script
  2003-06-02 10:23         ` Eric Botcazou
@ 2003-06-02 16:19           ` Zack Weinberg
  0 siblings, 0 replies; 9+ messages in thread
From: Zack Weinberg @ 2003-06-02 16:19 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: Joe Buck, gcc

Eric Botcazou <ebotcazou@libertysurf.fr> writes:

>> Odd, ; as separator works fine for me with /usr/bin/sed on Solaris 8.
>> However, this is tangential.
>
> Hum, you're right, your construct works on Solaris 2.5.1, 2.6 and 9 too.
> I probably messed up the expression within the curly brackets.

You might've left off the semicolon immediately after the opening
curly brace, which is counterintuitive but necessary.

zw

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-06-02 15:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-16  1:07 non-portable construct in gcc configure script Joe Buck
2003-05-16  9:41 ` Eric Botcazou
2003-05-16 20:35 ` target/10663 (was Re: non-portable construct in gcc configure script) Kelley Cook
2003-05-24 21:37 ` non-portable construct in gcc configure script Eric Botcazou
2003-06-01 17:49   ` Zack Weinberg
2003-06-01 19:13     ` Eric Botcazou
2003-06-01 19:51       ` Zack Weinberg
2003-06-02 10:23         ` Eric Botcazou
2003-06-02 16:19           ` Zack Weinberg

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).