FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 06-20-2012, 03:56 PM
"vivo75@gmail.com"
 
Default 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.


# @FUNCTION: gcc-native-flags
# @USAGE: [CC compiler]
# @RETURN: 1st march 2nd mtune >=3rd flags
gcc-native-flags()

gcc-native-flags can take an argument, the compiler to use, then return
something in the form:

-march=corei7-avx -mtune=generic -mcx16 [...] --param=l2-cache-size=8192

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
 
Old 06-22-2012, 04:45 PM
Marien Zwart
 
Default 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
 
Old 06-24-2012, 05:48 AM
Mike Frysinger
 
Default 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
 

Thread Tools




All times are GMT. The time now is 02:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org