Merge commit '71186e73455a4e06e96a31da34b76f84e545ba1f' into gcc-simplify-flags

This commit is contained in:
John Ericson
2017-12-05 17:09:41 -05:00
3957 changed files with 75666 additions and 53192 deletions
@@ -72,8 +72,7 @@ let version = "4.9.4";
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
# The NXConstStr.patch can be removed at 4.9.4
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch;
;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -124,8 +123,6 @@ let version = "4.9.4";
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
" --with-ld=${binutils}/bin/${targetPlatform.config}-ld" +
@@ -300,6 +297,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 " +
@@ -351,12 +350,10 @@ stdenv.mkDerivation ({
else ""}
${if langAda then " --enable-libada" else ""}
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
${platformFlags}
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -442,7 +439,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs);
LIBRARY_PATH = makeLibraryPath ([]