gcc-native-flags() proposal addition to toolchain-funcs.eclass
Meeting with bug: #409471 suggested that some ebuilds could benefit from
expanding -march=native to the actual flags the compiler use.
Cannot suggest where to use it at the moment, but implementation was
simple enough and possibly someone on this list could have a use for it.
issues so far:
1) "--param l2-cache-size=8192" become "--param=l2-cache-size=8192",
notice the space become an "=", this work and indeed I've encountered
broken packages that didn't compile with -param ... form
2) what to do if $CC is not gcc / how to check cc is gcc
3) there are redundant flags, they are kept for simplicity
4) array usage is not really needed, just being a port of a python
version it was natural this way ;-)
5) better name?
#409471 "dev-python/pypy-1.8-r1 CFLAGS=-march=native fails to compile"
https://bugs.gentoo.org/show_bug.cgi?id=409471
the attached file could be launched as is, it fake inherit some eclass
and calls the function with available gcc
thanks,
Francesco Riosa
06-22-2012, 04:45 PM
Marien Zwart
gcc-native-flags() proposal addition to toolchain-funcs.eclass
On wo, 2012-06-20 at 17:56 +0200, vivo75@gmail.com wrote:
> #409471 "dev-python/pypy-1.8-r1 CFLAGS=-march=native fails to
> compile"
> https://bugs.gentoo.org/show_bug.cgi?id=409471
Thanks, but currently I do not think we quite need this: I do not think
we should use a whitelist of known-working flags for pypy, and rather
than blacklisting known-broken flags I am optimistic about just getting
them fixed upstream reasonably quickly. And I hope we're done with these
for the time being, until another cpu or gcc version comes along. If
more bugs like this surface and we can't get support added by upstream
reasonably quickly I'll see about using this to fail early, though.
--
Marien Zwart
06-24-2012, 05:48 AM
Mike Frysinger
gcc-native-flags() proposal addition to toolchain-funcs.eclass
On Wednesday 20 June 2012 11:56:58 vivo75@gmail.com wrote:
> Meeting with bug: #409471 suggested that some ebuilds could benefit from
> expanding -march=native to the actual flags the compiler use.
i can't really see how. if packages can't handle certain flags, then fix those.
so NAK on adding anything like this to a common eclass.
-mike