Commit 71186e73 authored by John Ericson's avatar John Ericson
Browse files

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

parent 9884a3b1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ let version = "4.5.4";
    crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt");

    crossConfigureFlags =
      "--target=${targetPlatform.config}" +
      withArch +
      withCpu +
      withAbi +
@@ -231,6 +230,8 @@ stdenv.mkDerivation ({
    ++ (optionals langVhdl [gnat])
    ;

  # TODO(@Ericson2314): Always pass "--target" and always prefix.
  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
  configureFlags = "
    ${if enableMultilib then "" else "--disable-multilib"}
    ${if enableShared then "" else "--disable-shared"}
@@ -313,7 +314,6 @@ stdenv.mkDerivation ({
      ${if langAda then " --enable-libada" else ""}
      ${if targetplatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
      ${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
      --target=${targetPlatform.config}
    '';
  };
 
+2 −2
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ let version = "4.8.5";
        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 +
@@ -317,6 +316,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 " +
@@ -436,7 +437,6 @@ stdenv.mkDerivation ({
        )
      }
      ${if langAda then " --enable-libada" else ""}
      --target=${targetPlatform.config}
      ${xwithArch}
      ${xwithCpu}
      ${xwithAbi}
+2 −2
Original line number Diff line number Diff line
@@ -136,7 +136,6 @@ let version = "4.9.4";
        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 +
@@ -317,6 +316,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 " +
@@ -434,7 +435,6 @@ stdenv.mkDerivation ({
        )
      }
      ${if langAda then " --enable-libada" else ""}
      --target=${targetPlatform.config}
      ${xwithArch}
      ${xwithCpu}
      ${xwithAbi}
+2 −4
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ let version = "5.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 +
@@ -334,6 +333,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 " +
@@ -451,9 +452,6 @@ stdenv.mkDerivation ({
        )
      }
      ${if langAda then " --enable-libada" else ""}
      --build=${buildPlatform.config}
      --host=${hostPlatform.config}
      --target=${targetPlatform.config}
      ${xwithArch}
      ${xwithCpu}
      ${xwithAbi}
+2 −2
Original line number Diff line number Diff line
@@ -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}
Loading