Launchpad has imported 3 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51020.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-11-08T01:54:20+00:00 Colin Watson wrote:

This is a reduced test case from a cmake test failure manifesting on
Ubuntu ARM (https://bugs.launchpad.net/bugs/887377):

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.6.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr 
--program-suffix=-4.6 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin 
--enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 
--with-tune=generic --enable-checking=release --build=i686-linux-gnu 
--host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.2 (Ubuntu/Linaro 4.6.2-2ubuntu1)
$ cat specs
*asm_cpu_spec:
 %{mcpu=generic-*:-march=%*;   :%{mcpu=*:-mcpu=%*} %{march=*:-march=%*}}
$ gcc -specs=specs ---
gcc: fatal error: no input files
compilation terminated.
$ gcc ---
gcc: error: unrecognized option ‘---’
gcc: fatal error: no input files
compilation terminated.

cmake (which I'm not responsible for; I'm just trying to build it) has a
facility to try to work out whether compiler options are valid, and
apparently looks for "unrecognized option" on stderr.  I'm not exactly a
fan of matching human-readable error output like this, but this spec
line currently has the side-effect of validating all switches, and I
don't think that can possibly be its intent.

This spec line was added in this commit:

  http://gcc.gnu.org/viewcvs?view=revision&revision=178731

I think the `validate_switches' function should only mark matching
switches as valid if `len' is non-zero.

Reply at: https://bugs.launchpad.net/gcc/+bug/887377/comments/3

------------------------------------------------------------------------
On 2011-11-08T02:05:33+00:00 Colin Watson wrote:

Looking more closely, I wonder if the problem here is that `starred'
isn't getting reset.  This construction is effectively a switch
statement, isn't it?  I can't see why the presence of an
`mcpu=generic-*` case ought to imply that the default case should be
treated as starred.  Perhaps `starred' should be reset upon encountering
a ';' character?

Reply at: https://bugs.launchpad.net/gcc/+bug/887377/comments/4

------------------------------------------------------------------------
On 2011-11-08T03:03:58+00:00 Joseph-codesourcery wrote:

Note that in 4.7 all options will be validated by the .opt machinery 
(producing "gcc: error: unrecognized command line option '---'") by the 
driver and only options passing that (and -Wno-* options) will then go 
through the specs validation as well.  This may break things depending on 
the exact error message; it may also make this bug less significant 
because fewer cases will be left to be caught by the check against specs.

Reply at: https://bugs.launchpad.net/gcc/+bug/887377/comments/5


** Changed in: gcc
       Status: Unknown => New

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/887377

Title:
  cmake fails TryCompile test on precise/armel due to incorrect gcc
  option parsing

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/887377/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to