* [patch] Configure test failure - too many arguments
@ 2007-08-01 14:05 Brian Sidebotham
2007-08-01 15:17 ` Andreas Schwab
0 siblings, 1 reply; 15+ messages in thread
From: Brian Sidebotham @ 2007-08-01 14:05 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
Hi,
Please find attached a patch to remove the configure error:
gcc/configure: test: too many arguments
Which is caused by a sed statement error when checking the version
number of binutils.
I have tested by compiling from scratch with and without the patch, and
ensuring that the new sed command works for both the old version string
and the new version string of GAS. *note* I haven't done any regression
testing with this patch as I don't have regression testing setup yet -
but I don't see this adversley affecting anything.
Could someone please check and apply for me?
Changelog (${srcdir}/gcc/Changelog):
2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
* configure.ac (leb128): Modify sed statement to work with newly formatted
binutils version string.
* configure: Regenerate
Best Regards,
Brian Sidebotham.
[-- Attachment #2: leb128.diff --]
[-- Type: text/plain, Size: 576 bytes --]
--- gcc/gcc/configure.ac Mon Jul 30 10:18:27 2007
+++ gcc.patched/gcc/configure.ac Mon Jul 30 10:45:48 2007
@@ -2105,7 +2105,7 @@ L2:],
as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
if echo "$as_ver" | grep GNU > /dev/null; then
changequote(,)dnl
- as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
+ as_ver=`echo $as_ver | sed -e 's/GNU assembler \|GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/'`
as_major=`echo $as_ver | sed 's/\..*//'`
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
changequote([,])dnl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 14:05 [patch] Configure test failure - too many arguments Brian Sidebotham
@ 2007-08-01 15:17 ` Andreas Schwab
2007-08-01 15:51 ` Daniel Jacobowitz
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2007-08-01 15:17 UTC (permalink / raw)
To: micros; +Cc: GCC Patches
Brian Sidebotham <micros@valvers.com> writes:
> - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
> + as_ver=`echo $as_ver | sed -e 's/GNU assembler \|GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/'`
This is not portable. Alternation is not available in many sed
implementations (POSIX BREs don't have that).
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 15:17 ` Andreas Schwab
@ 2007-08-01 15:51 ` Daniel Jacobowitz
2007-08-01 16:19 ` Brian Sidebotham
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-08-01 15:51 UTC (permalink / raw)
To: Andreas Schwab; +Cc: micros, GCC Patches
On Wed, Aug 01, 2007 at 05:16:57PM +0200, Andreas Schwab wrote:
> Brian Sidebotham <micros@valvers.com> writes:
>
> > - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
> > + as_ver=`echo $as_ver | sed -e 's/GNU assembler \|GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/'`
>
> This is not portable. Alternation is not available in many sed
> implementations (POSIX BREs don't have that).
It's not right, either, I'm afraid. The contents of the parentheses
are set by the binutils --with-pkgversion configure option.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 15:51 ` Daniel Jacobowitz
@ 2007-08-01 16:19 ` Brian Sidebotham
2007-08-01 17:11 ` Daniel Jacobowitz
0 siblings, 1 reply; 15+ messages in thread
From: Brian Sidebotham @ 2007-08-01 16:19 UTC (permalink / raw)
To: Andreas Schwab, micros, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
Hi,
Sorry, I should have known better about the alternation. I have attached a patch
that works correctly on the current binutils format string, and the old default
string.
This can only work if --with-pkgversion doesn't include numerics, which sounds
unlikely. However, the original statement would never have worked with ANY
--with-pkgversion option - so this is at least an improvement.
If someone else can modify the sed statement to suit any --with-pkversion
option, please do. It's a bit beyond my sed skills to do that.
Thanks for taking the time to look at it.
Best Regards,
Brian Sidebotham.
So, better than the original, but still not right.
Daniel Jacobowitz wrote:
> On Wed, Aug 01, 2007 at 05:16:57PM +0200, Andreas Schwab wrote:
>> Brian Sidebotham <micros@valvers.com> writes:
>>
>>> - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
>>> + as_ver=`echo $as_ver | sed -e 's/GNU assembler \|GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/'`
>> This is not portable. Alternation is not available in many sed
>> implementations (POSIX BREs don't have that).
>
> It's not right, either, I'm afraid. The contents of the parentheses
> are set by the binutils --with-pkgversion configure option.
>
[-- Attachment #2: leb128.diff --]
[-- Type: text/plain, Size: 582 bytes --]
--- gcc/gcc/configure.ac Wed Aug 1 13:49:23 2007
+++ gcc.patched/gcc/configure.ac Wed Aug 1 16:53:33 2007
@@ -2105,7 +2105,7 @@ L2:],
as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
if echo "$as_ver" | grep GNU > /dev/null; then
changequote(,)dnl
- as_ver=`echo $as_ver | sed -e 's/GNU assembler \|GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/'`
+ as_ver=`echo $as_ver | sed -e 's/GNU assembler[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
as_major=`echo $as_ver | sed 's/\..*//'`
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
changequote([,])dnl
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 16:19 ` Brian Sidebotham
@ 2007-08-01 17:11 ` Daniel Jacobowitz
2007-08-01 17:43 ` Brian Sidebotham
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-08-01 17:11 UTC (permalink / raw)
To: Brian Sidebotham; +Cc: Andreas Schwab, GCC Patches
On Wed, Aug 01, 2007 at 05:19:39PM +0100, Brian Sidebotham wrote:
> This can only work if --with-pkgversion doesn't include numerics, which sounds
> unlikely. However, the original statement would never have worked with ANY
> --with-pkgversion option - so this is at least an improvement.
Ours always do (they say things like " (Sourcery G++ 4.1-74)"). If
you look a bit earlier in the file there is a very thorough test for
ld_ver. Does that work for gas, too?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 17:11 ` Daniel Jacobowitz
@ 2007-08-01 17:43 ` Brian Sidebotham
2007-08-07 17:39 ` Daniel Jacobowitz
0 siblings, 1 reply; 15+ messages in thread
From: Brian Sidebotham @ 2007-08-01 17:43 UTC (permalink / raw)
To: Brian Sidebotham, Andreas Schwab, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
Daniel Jacobowitz wrote:
> On Wed, Aug 01, 2007 at 05:19:39PM +0100, Brian Sidebotham wrote:
>> This can only work if --with-pkgversion doesn't include numerics, which sounds
>> unlikely. However, the original statement would never have worked with ANY
>> --with-pkgversion option - so this is at least an improvement.
>
> Ours always do (they say things like " (Sourcery G++ 4.1-74)"). If
> you look a bit earlier in the file there is a very thorough test for
> ld_ver. Does that work for gas, too?
>
Hi Daniel,
Thank you for guiding me through this. I didn't think to look for another case
in the configure file. The ld_ver sed expression does work okay on the
assembler. I have performed tests with the following strings:
GNU assembler (GNU Binutils) 2.17.50.20070730
GNU assembler (GNU Binutils) 2.17
GNU assembler (Sourcery G++ 4.1-74) 2.17.50.20070730
All create the correct major and minor version numbers. I re-compiled gcc to
make sure nothing else is broken with this patche applied and everything builds
okay. I still have not setup regression testing with dejagnu, so that has not
been done for this patch. Please let me know if I must do that next.
I have attached the patch. I have repeated the changelog below.
Changelog:
2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
* configure.ac (leb128): Modify sed statement to work with any binutils
version string.
* configure: Regenerate
Best Regards,
Brian Sidebotham.
[-- Attachment #2: leb128.diff --]
[-- Type: text/plain, Size: 1187 bytes --]
--- gcc/gcc/configure.ac Wed Aug 1 18:21:21 2007
+++ gcc.patched/gcc/configure.ac Wed Aug 1 18:09:10 2007
@@ -2105,9 +2105,16 @@ L2:],
as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
if echo "$as_ver" | grep GNU > /dev/null; then
changequote(,)dnl
- as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
- as_major=`echo $as_ver | sed 's/\..*//'`
- as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
+ as_vers=`echo $as_ver | sed -n \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'`
+ as_major=`expr "$as_vers" : '\([0-9]*\)'`
+ as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'`
changequote([,])dnl
if test $as_major -eq 2 && test $as_minor -lt 11
then :
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-01 17:43 ` Brian Sidebotham
@ 2007-08-07 17:39 ` Daniel Jacobowitz
2007-08-16 19:17 ` Alexandre Oliva
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-08-07 17:39 UTC (permalink / raw)
To: Brian Sidebotham; +Cc: Andreas Schwab, GCC Patches
On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
> All create the correct major and minor version numbers. I re-compiled gcc to
> make sure nothing else is broken with this patche applied and everything builds
> okay. I still have not setup regression testing with dejagnu, so that has not
> been done for this patch. Please let me know if I must do that next.
>
> I have attached the patch. I have repeated the changelog below.
>
> Changelog:
>
> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
>
> * configure.ac (leb128): Modify sed statement to work with any binutils
> version string.
> * configure: Regenerate
This looks fine to me. Could someone approve it - Paolo, perhaps you?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-07 17:39 ` Daniel Jacobowitz
@ 2007-08-16 19:17 ` Alexandre Oliva
2007-08-21 14:18 ` Brian Sidebotham
2007-09-02 16:48 ` Matthias Klose
0 siblings, 2 replies; 15+ messages in thread
From: Alexandre Oliva @ 2007-08-16 19:17 UTC (permalink / raw)
To: Brian Sidebotham; +Cc: Andreas Schwab, GCC Patches
On Aug 7, 2007, Daniel Jacobowitz <drow@false.org> wrote:
> On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
>> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
>> * configure.ac (leb128): Modify sed statement to work with any binutils
>> version string.
>> * configure: Regenerate
> This looks fine to me. Could someone approve it - Paolo, perhaps you?
The patch is ok, thanks.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-16 19:17 ` Alexandre Oliva
@ 2007-08-21 14:18 ` Brian Sidebotham
2007-08-23 16:16 ` NightStrike
2007-09-02 16:48 ` Matthias Klose
1 sibling, 1 reply; 15+ messages in thread
From: Brian Sidebotham @ 2007-08-21 14:18 UTC (permalink / raw)
To: GCC Patches
Alexandre Oliva wrote:
> On Aug 7, 2007, Daniel Jacobowitz <drow@false.org> wrote:
>
>> On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
>
>>> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
>
>>> * configure.ac (leb128): Modify sed statement to work with any binutils
>>> version string.
>>> * configure: Regenerate
>
>> This looks fine to me. Could someone approve it - Paolo, perhaps you?
>
> The patch is ok, thanks.
>
Hi,
Could someone please apply this for me, thanks.
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00066.html
Best Regards,
Brian Sidebotham.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-21 14:18 ` Brian Sidebotham
@ 2007-08-23 16:16 ` NightStrike
2007-08-23 18:31 ` Daniel Jacobowitz
0 siblings, 1 reply; 15+ messages in thread
From: NightStrike @ 2007-08-23 16:16 UTC (permalink / raw)
To: micros; +Cc: GCC Patches
On 8/21/07, Brian Sidebotham <micros@valvers.com> wrote:
>
> Hi,
>
> Could someone please apply this for me, thanks.
>
> http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00066.html
>
> Best Regards,
>
> Brian Sidebotham.
>
Is this fixed yet?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-23 16:16 ` NightStrike
@ 2007-08-23 18:31 ` Daniel Jacobowitz
2007-08-24 13:10 ` NightStrike
0 siblings, 1 reply; 15+ messages in thread
From: Daniel Jacobowitz @ 2007-08-23 18:31 UTC (permalink / raw)
To: NightStrike; +Cc: micros, GCC Patches
On Thu, Aug 23, 2007 at 11:56:13AM -0400, NightStrike wrote:
> Is this fixed yet?
I've just checked it in.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-23 18:31 ` Daniel Jacobowitz
@ 2007-08-24 13:10 ` NightStrike
0 siblings, 0 replies; 15+ messages in thread
From: NightStrike @ 2007-08-24 13:10 UTC (permalink / raw)
To: NightStrike, micros, GCC Patches
Thanks!
On 8/23/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Aug 23, 2007 at 11:56:13AM -0400, NightStrike wrote:
> > Is this fixed yet?
>
> I've just checked it in.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-08-16 19:17 ` Alexandre Oliva
2007-08-21 14:18 ` Brian Sidebotham
@ 2007-09-02 16:48 ` Matthias Klose
2007-09-21 16:04 ` Richard Guenther
1 sibling, 1 reply; 15+ messages in thread
From: Matthias Klose @ 2007-09-02 16:48 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: GCC Patches, Daniel Jacobowitz
Alexandre Oliva writes:
> On Aug 7, 2007, Daniel Jacobowitz <drow@false.org> wrote:
>
> > On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
>
> >> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
>
> >> * configure.ac (leb128): Modify sed statement to work with any binutils
> >> version string.
> >> * configure: Regenerate
>
> > This looks fine to me. Could someone approve it - Paolo, perhaps you?
>
> The patch is ok, thanks.
ok for the 4.2 and 4.1 branch as well? Finally we did end up with the
same patch as proposed (http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00846.html)
Matthias
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-09-02 16:48 ` Matthias Klose
@ 2007-09-21 16:04 ` Richard Guenther
2007-09-23 19:36 ` Mark Mitchell
0 siblings, 1 reply; 15+ messages in thread
From: Richard Guenther @ 2007-09-21 16:04 UTC (permalink / raw)
To: Matthias Klose
Cc: Alexandre Oliva, GCC Patches, Daniel Jacobowitz, Mark Mitchell
On 9/2/07, Matthias Klose <doko@cs.tu-berlin.de> wrote:
> Alexandre Oliva writes:
> > On Aug 7, 2007, Daniel Jacobowitz <drow@false.org> wrote:
> >
> > > On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
> >
> > >> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
> >
> > >> * configure.ac (leb128): Modify sed statement to work with any binutils
> > >> version string.
> > >> * configure: Regenerate
> >
> > > This looks fine to me. Could someone approve it - Paolo, perhaps you?
> >
> > The patch is ok, thanks.
>
> ok for the 4.2 and 4.1 branch as well? Finally we did end up with the
> same patch as proposed (http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00846.html)
Ping!
Richard.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] Configure test failure - too many arguments
2007-09-21 16:04 ` Richard Guenther
@ 2007-09-23 19:36 ` Mark Mitchell
0 siblings, 0 replies; 15+ messages in thread
From: Mark Mitchell @ 2007-09-23 19:36 UTC (permalink / raw)
To: Richard Guenther
Cc: Matthias Klose, Alexandre Oliva, GCC Patches, Daniel Jacobowitz
Richard Guenther wrote:
> On 9/2/07, Matthias Klose <doko@cs.tu-berlin.de> wrote:
>> Alexandre Oliva writes:
>>> On Aug 7, 2007, Daniel Jacobowitz <drow@false.org> wrote:
>>>
>>>> On Wed, Aug 01, 2007 at 06:43:46PM +0100, Brian Sidebotham wrote:
>>>>> 2007-08-01 Brian Sidebotham <brian.sidebotham@gmail.com>
>>>>> * configure.ac (leb128): Modify sed statement to work with any binutils
>>>>> version string.
>>>>> * configure: Regenerate
>>>> This looks fine to me. Could someone approve it - Paolo, perhaps you?
>>> The patch is ok, thanks.
>> ok for the 4.2 and 4.1 branch as well? Finally we did end up with the
>> same patch as proposed (http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00846.html)
>
> Ping!
This is OK for the 4.2 branch, even before the 4.2.2 release.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-09-23 19:00 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 14:05 [patch] Configure test failure - too many arguments Brian Sidebotham
2007-08-01 15:17 ` Andreas Schwab
2007-08-01 15:51 ` Daniel Jacobowitz
2007-08-01 16:19 ` Brian Sidebotham
2007-08-01 17:11 ` Daniel Jacobowitz
2007-08-01 17:43 ` Brian Sidebotham
2007-08-07 17:39 ` Daniel Jacobowitz
2007-08-16 19:17 ` Alexandre Oliva
2007-08-21 14:18 ` Brian Sidebotham
2007-08-23 16:16 ` NightStrike
2007-08-23 18:31 ` Daniel Jacobowitz
2007-08-24 13:10 ` NightStrike
2007-09-02 16:48 ` Matthias Klose
2007-09-21 16:04 ` Richard Guenther
2007-09-23 19:36 ` Mark Mitchell
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).