1 msgRe: Why do I get: cannot declare variable 'sc' ...
2 msgWhy do I get: cannot declare variable ‘sc’ to b...
6 msgCompiler options for PowerPC
2 msgHow to change CR/LF to LF when compile gcc-4.1....
4 msgoperator new[] and operator delete[]
1 msgWhy am I seeing these warnings from system head...
3 msg-Bgroup?
3 msgGCC-3.3.6 and MIPS instruction 'EHB'
3 msgcr5-6 registers on i386
1 msgRe: WELCOME to gcc
25 msgRobust detection of endianness at compile time.
1 msgMESAJINIZ VAR

configure warning - test: too many arguments
\ NightStrike (28 Jul 2007)
. \ Ian Lance Taylor (30 Jul 2007)
. \ Brian Sidebotham (30 Jul 2007)

1 msgProblem in loading DLL
3 msgright shift : strange behavior
2 msgTDF_DETAILS
6 msgInitialization of a static member of a template...
1 msgRe: dlopen() crash -gcc 3.4.6 20060404
1 msgRebuild GCC 4.2
3 msgUnrolling loops
Subject:Re: configure warning - test: too many arguments
Group:Gcc-help
From:Brian Sidebotham
Date:30 Jul 2007



NightStrike wrote:
> Whenever I do a make all-gcc, I get the following warning a portion of
> the way through the process:
>
> /cygdrive/m/build/gcc-core/gcc/gcc/configure: line 14040: test: too
> many arguments
>
> Any pointers as to where to start to troubleshoot that?

The place to start troubleshooting that is ${srcdir}/gcc/configure: line
14040

Looking at this, the shell script is trying to determine the version
number of Binutils GAS by running the assembler and capturing the output
of the --version option.

It took me a while to find out exaclty what was wrong a few weeks back
when I was looking at this because I'm pretty new to shell scripts.
However, running the sed command outside of the shell script enabled me
to see that the problem lies with the fact that Binutils has changed the
format of its version string.

It used to be
GNU assembler x.xx...
but now it is
GNU assembler (GNU Binutils) x.xx...

So, where the shell script was meant to be picking up two integers for
the major and minor parts of the version, it was actually getting a
string of GNU assembler (GNU Binutils) x.xx...

Here is the output of the original sed statement from configure (arm.txt
contains the first line of the output of as --version)

b@CAD3 /c/gcc/binutils/install/bin
$ sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/' < arm.txt
GNU assembler (GNU Binutils) 2.17.50.20070730

There is no match, what we're looking for is the output from the
following modified statement:

b@CAD3 /c/gcc/binutils/install/bin
$ sed -e 's/GNU assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/' < arm.txt
2.17.50.20070730

Here is the combined statement to look for the old type, and the new
type of version string:

b@CAD3 /c/gcc/binutils/install/bin
$ sed -e 's/GNU assembler \|GNU assembler (GNU Binutils)
\([0-9.][0-9.]*\).*/\1
/' < arm.txt
2.17.50.20070730

Attached is a patch for ${srcdir}/gcc/configure.ac - you'll have to run
autoconf to regenerate ${srcdir}/gcc/configure, or you can manually add
the change to the configure file.

The test actually defaults on this error to the correct setting, i.e.
the new version string formatting means that the check assumes the
assembler is current enough, which of course, it is.

Best Regards,

Brian Sidebotham.


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



© 2004-2008 readlist.com