* 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread
* Re: non-portable construct in gcc configure script
@ 2003-06-04 8:51 Bonzini
2003-06-04 10:01 ` Eric Botcazou
0 siblings, 1 reply; 19+ messages in thread
From: Bonzini @ 2003-06-04 8:51 UTC (permalink / raw)
To: gcc, ebotcazou, zack, jbuck
> > 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.
A very crippled sed is HP/UX's; semicolons inside -e might not work
there. It is portable and simple to rewrite the command as
sed -e '/myfoosect/!d' -e N
|_ _ _ __
|_)(_)| ),'
------- '---
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-04 8:51 Bonzini
@ 2003-06-04 10:01 ` Eric Botcazou
2003-06-04 16:05 ` Zack Weinberg
0 siblings, 1 reply; 19+ messages in thread
From: Eric Botcazou @ 2003-06-04 10:01 UTC (permalink / raw)
To: Bonzini; +Cc: gcc, zack, jbuck
> A very crippled sed is HP/UX's; semicolons inside -e might not work
> there. It is portable and simple to rewrite the command as
>
> sed -e '/myfoosect/!d' -e N
Works fine on Solarises too.
Zack, would you approve the patch with this modification?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-04 10:01 ` Eric Botcazou
@ 2003-06-04 16:05 ` Zack Weinberg
2003-06-05 8:55 ` Eric Botcazou
0 siblings, 1 reply; 19+ messages in thread
From: Zack Weinberg @ 2003-06-04 16:05 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Bonzini, gcc, jbuck
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> A very crippled sed is HP/UX's; semicolons inside -e might not work
>> there. It is portable and simple to rewrite the command as
>>
>> sed -e '/myfoosect/!d' -e N
>
> Works fine on Solarises too.
>
> Zack, would you approve the patch with this modification?
Yes, go ahead.
zw
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-04 16:05 ` Zack Weinberg
@ 2003-06-05 8:55 ` Eric Botcazou
2003-06-05 16:49 ` Zack Weinberg
0 siblings, 1 reply; 19+ messages in thread
From: Eric Botcazou @ 2003-06-05 8:55 UTC (permalink / raw)
To: Zack Weinberg; +Cc: Bonzini, gcc, jbuck
> Yes, go ahead.
Thanks, it's now in.
Btw, it appears that this check is a can of worms, see Kelley's report and
patch: http://gcc.gnu.org/ml/gcc-patches/2003-04/msg02262.html
--
Eric Botcazou
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 8:55 ` Eric Botcazou
@ 2003-06-05 16:49 ` Zack Weinberg
2003-06-05 20:48 ` Eric Botcazou
0 siblings, 1 reply; 19+ messages in thread
From: Zack Weinberg @ 2003-06-05 16:49 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Bonzini, gcc, jbuck
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> Yes, go ahead.
>
> Thanks, it's now in.
>
> Btw, it appears that this check is a can of worms, see Kelley's report and
> patch: http://gcc.gnu.org/ml/gcc-patches/2003-04/msg02262.html
That change worries me. GAS may be happy to take .section with no
quotes, but how do we know all the assemblers out there are equally
content?
zw
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 16:49 ` Zack Weinberg
@ 2003-06-05 20:48 ` Eric Botcazou
2003-06-05 20:49 ` Zack Weinberg
0 siblings, 1 reply; 19+ messages in thread
From: Eric Botcazou @ 2003-06-05 20:48 UTC (permalink / raw)
To: Zack Weinberg; +Cc: Bonzini, gcc, jbuck
> That change worries me. GAS may be happy to take .section with no
> quotes, but how do we know all the assemblers out there are equally
> content?
I personally think that the question is rather: was this check ever intented
to work with anything else than GNU as and GNU ld?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 20:48 ` Eric Botcazou
@ 2003-06-05 20:49 ` Zack Weinberg
2003-06-05 21:02 ` Eric Botcazou
0 siblings, 1 reply; 19+ messages in thread
From: Zack Weinberg @ 2003-06-05 20:49 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Bonzini, gcc, jbuck
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> That change worries me. GAS may be happy to take .section with no
>> quotes, but how do we know all the assemblers out there are equally
>> content?
>
> I personally think that the question is rather: was this check ever intented
> to work with anything else than GNU as and GNU ld?
IIRC we cared about at least Solaris native ld.
zw
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 20:49 ` Zack Weinberg
@ 2003-06-05 21:02 ` Eric Botcazou
2003-06-05 21:49 ` Zack Weinberg
0 siblings, 1 reply; 19+ messages in thread
From: Eric Botcazou @ 2003-06-05 21:02 UTC (permalink / raw)
To: Zack Weinberg; +Cc: Bonzini, gcc, jbuck
> IIRC we cared about at least Solaris native ld.
... grep, only grep. The check passes "-shared" directly to ld, which makes
native ld choke on Solaris 2.5.1, 2.6 and 7. On 8 and 9, it's the assembler.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10663
--
Eric Botcazou
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 21:02 ` Eric Botcazou
@ 2003-06-05 21:49 ` Zack Weinberg
2003-06-07 7:46 ` Eric Botcazou
0 siblings, 1 reply; 19+ messages in thread
From: Zack Weinberg @ 2003-06-05 21:49 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Bonzini, gcc, jbuck
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> IIRC we cared about at least Solaris native ld.
>
> ... grep, only grep. The check passes "-shared" directly to ld, which makes
> native ld choke on Solaris 2.5.1, 2.6 and 7. On 8 and 9, it's the assembler.
> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10663
I was thinking of something else, but good point.
We know GAS accepts section names without quotes on all targets, we
know it *doesn't* accept section names with quotes on some targets,
and we don't know of any other assembler/linker pair that this test
succeeds for. Therefore Kelley's patch must be a net improvement.
Would you mind validating it and checking it in?
zw
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: non-portable construct in gcc configure script
2003-06-05 21:49 ` Zack Weinberg
@ 2003-06-07 7:46 ` Eric Botcazou
0 siblings, 0 replies; 19+ messages in thread
From: Eric Botcazou @ 2003-06-07 7:46 UTC (permalink / raw)
To: Zack Weinberg; +Cc: Bonzini, gcc, jbuck
> We know GAS accepts section names without quotes on all targets, we
> know it *doesn't* accept section names with quotes on some targets,
According to the GAS manual, on all non-ELF targets.
> and we don't know of any other assembler/linker pair that this test
> succeeds for. Therefore Kelley's patch must be a net improvement.
> Would you mind validating it and checking it in?
Done on mainline and 3.3 branch.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2003-06-07 7:34 UTC | newest]
Thread overview: 19+ 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
2003-06-04 8:51 Bonzini
2003-06-04 10:01 ` Eric Botcazou
2003-06-04 16:05 ` Zack Weinberg
2003-06-05 8:55 ` Eric Botcazou
2003-06-05 16:49 ` Zack Weinberg
2003-06-05 20:48 ` Eric Botcazou
2003-06-05 20:49 ` Zack Weinberg
2003-06-05 21:02 ` Eric Botcazou
2003-06-05 21:49 ` Zack Weinberg
2003-06-07 7:46 ` Eric Botcazou
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).