compilation for particular x86_64 architecture
This commit is contained in:
@@ -19,10 +19,7 @@ stdenv.mkDerivation rec {
|
||||
CPPFLAGS = with stdenv; ""
|
||||
+ (lib.optionalString (!isi686 && !isx86_64) "-DNOJIT ")
|
||||
+ "-Dunix";
|
||||
CXXFLAGS = with stdenv; ""
|
||||
+ (lib.optionalString isi686 "-march=i686 -mtune=generic ")
|
||||
+ (lib.optionalString isx86_64 "-march=nocona -mtune=generic ")
|
||||
+ "-O3 -DNDEBUG";
|
||||
CXXFLAGS = "-O3 -DNDEBUG";
|
||||
in ''
|
||||
buildFlagsArray=( "CPPFLAGS=${CPPFLAGS}" "CXXFLAGS=${CXXFLAGS}" )
|
||||
'';
|
||||
|
||||
@@ -11,10 +11,8 @@ let
|
||||
sha256="0868lynb45lm79yvx5f10lj5h6bfv0yck8whcls2j080vmk3n7rk";
|
||||
};
|
||||
|
||||
compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-mtune=generic" "-DNDEBUG" ]
|
||||
compileFlags = stdenv.lib.concatStringsSep " " ([ "-O3" "-DNDEBUG" ]
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform.isUnix) "-Dunix -pthread"
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform.isi686) "-march=i686"
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform.isx86_64) "-march=nocona"
|
||||
++ stdenv.lib.optional (!stdenv.hostPlatform.isx86) "-DNOJIT");
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
|
||||
Reference in New Issue
Block a user