| Summary: | gcc-3.4.6-r2 doesn't compile with march=native | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Sérgio Almeida <mephx.x> |
| Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | minor | CC: | leio |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Sérgio Almeida
2009-04-15 15:22:29 UTC
-march=native was not supported by gcc 3.x. Though, perhaps filtering that out should be possible by the ebuild/eclass. (In reply to comment #3) > Though, perhaps filtering that out should be possible > by the ebuild/eclass. > Hello, That would be the purpose of this bug. Cheers, Sérgio The core issue here is that gcc is built with currently selected gcc first - everything is fine with -march=native, but then it compiles again with itself again for proper bootstrapping, and honors the CFLAGS there too, and that doesn't accept -march=native as it's gcc3.x, not gcc-4.2 or so when =native was introduced. So this will happen with any flags that you have set in your make.conf that work fine for you usually due to gcc4.3 supporting them, but fail when compiling some older gcc, as that older gcc will try to recompile itself as part of the process with the provided CFLAGS. Given that this isn't limited to just -march=native, I'm not sure what the toolchain guys could do here. For example gcc-4.1 won't compile with -march=geode in CFLAGS, while the typical system gcc-4.3 is quite happy with it. Or many of the other flags that are new after gcc-3.4 I guess we can quickly run it through them to decide if there's something useful possible here (if even some kind of a warning) or not. we do have tests that catch invalid flags for the compiler being used (see the bashrc in the amd64 profile for eg.), but we have no way of knowing what flags the bootstrapped compiler will accept until it's built, at which point you're getting an error anyways. we can't strip march=native or replace it with something sane because we don't know what sane is for your hardware. i always forget to change -march=core2 to -march=nocona when i build 4.1 so i'm right there with you, but there's not much we can do. *** This bug has been marked as a duplicate of bug 219281 *** |