aegypius / overlay

Gentoo overlay
http://aegypius.github.io/overlay/
31 stars 8 forks source link

dev-util/atom-shell - filter C{XX}FLAGS for -msahf #47

Closed phavx closed 9 years ago

phavx commented 9 years ago

Having -msahf in CFLAGS/CXXFLAGS makes the build fail for me, removing it makes it build, thus the ebuild should filter and strip this flag.

aegypius commented 9 years ago

I found this about the -msahf flag:

This option will enable GCC to use SAHF instruction in generated 64-bit code. Early Intel CPUs with Intel 64 lacked LAHF and SAHF instructions supported by AMD64 until introduction of Pentium 4 G1 step in December 2005. LAHF and SAHF are load and store instructions, respectively, for certain status flags. In 64-bit mode, SAHF instruction is used to optimize fmod, drem or remainder built-in functions: see Other Builtins for details. gcc.gnu.org docs

I think I may be able to remove it, but maybe you should report it to atom/atom-shell too to fix it upstream.

I am going to open a PR to attempt solve it on the atom-shell-9999 could you try this build on your setup when it's completed ?

phavx commented 9 years ago

Mh, for some reason, the "filter-flags -msahf" in the ebuild doesn't seem to work, yet when I remove it from make.conf, it works.

After changing the ebuild, it breaks with this: http://pastebin.com/jr71s4Q4

It seems it uses clang/llvm to build, but that doesn't know this flag. I'm not to deep into portage internals and am a little short on time to do heavy investigations, but my first guess is that 'filter-flags' only works for gcc, maybe?

aegypius commented 9 years ago

@phavx filter-flags should work with any ENVIRONMENT conservative build process. atom-shell use a python-over-ninja build type the environment variables must be lost in the process and rely on the original value of CFLAGS (host level definition). I think this is a matter to be discussed on atom/atom-shell repository. I will continue digging to try to workaround this