gcc: Use configurePlatforms to control --build, --host, and --target
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user