compilation for particular x86_64 architecture

This commit is contained in:
volth
2019-04-21 17:06:50 +00:00
parent f454785bb4
commit 5ad79dc4bb
16 changed files with 92 additions and 76 deletions

View File

@@ -18,17 +18,11 @@ stdenv.mkDerivation rec {
];
configurePhase = let
marchflags =
if stdenv.isi686 then "-march=i686" else
if stdenv.isx86_64 then "-march=nocona -mtune=generic" else
"";
in
''
configurePhase = ''
sed -i GNUmakefile \
-e 's|-march=native|${marchflags} -fPIC|g' \
-e 's|-march=native|-fPIC|g' \
-e '/^CXXFLAGS =/s|-g ||'
'';
'';
enableParallelBuilding = true;