gcc: Use configurePlatforms to control --build, --host, and --target

This commit is contained in:
John Ericson
2017-08-18 13:54:09 -04:00
parent 9884a3b17a
commit 71186e7345
7 changed files with 14 additions and 16 deletions

View File

@@ -136,7 +136,6 @@ let version = "6.4.0";
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
in
"--target=${targetPlatform.config}" +
withArch +
withCpu +
withAbi +
@@ -326,6 +325,8 @@ stdenv.mkDerivation ({
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = "
${if hostPlatform.isSunOS then
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
@@ -443,7 +444,6 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
--target=${targetPlatform.config}
${xwithArch}
${xwithCpu}
${xwithAbi}