Hi Danny,

Unfortunately, there's not a good answer to this because -march=native is inherently impure. Is there any reason you can't tell users "Find out what -march=native means on your system and then fill in nixpkgs.config.extra_cflags with the result?" or some such (Note that config.extra_cflags doesn't currently exist AFAIK, but could)?

~Shea

On 02/07/2013 07:36 AM, Danny Wilson wrote:
With help of the gentoo wiki ( http://en.gentoo-wiki.com/wiki/Hardware_CFLAGS )
I found this produces a nice GCC option list:

echo "" | gcc -O3 -march=native -mtune=native -v -E - 2>&1 |grep cc1 |sed -r 's/.*? - -(.*)$/-\1/'



7 februari 2013 12:37
I'd like some packages to be optimized for my server CPU. GCC has
-march=native for this, but that would not generate a cpu specific nixos
hash.

Is there a nix _expression_ available which adds something like this:
gcc -march=native -Q --help=target |grep enabled

to CFLAGS and correctly hashing it?



_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev




_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev


_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to