Merge commit '93cd0685c5ac4d8f21d8586d3e5c45cd7394fab9' into gcc-modernize-builder

This commit is contained in:
John Ericson
2017-12-07 01:49:31 -05:00
3957 changed files with 75662 additions and 53190 deletions

View File

@@ -87,7 +87,6 @@ let version = "4.5.4";
withMode;
crossConfigureFlags =
"--target=${targetPlatform.config}" +
platformFlags +
# Ensure that -print-prog-name is able to find the correct programs.
" --with-as=${binutils}/bin/${targetPlatform.config}-as" +
@@ -243,6 +242,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"}
@@ -281,11 +282,9 @@ stdenv.mkDerivation ({
if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" 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 targetPlatform == hostPlatform then platformFlags else ""}
" + optionalString
(hostPlatform != buildPlatform)
(platformFlags + " --target=${targetPlatform.config}");
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -363,7 +362,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));
@@ -470,7 +469,7 @@ stdenv.mkDerivation ({
'';
meta = {
homepage = "http://ghdl.free.fr/";
homepage = http://ghdl.free.fr/;
license = stdenv.lib.licenses.gpl2Plus;
description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
maintainers = with stdenv.lib.maintainers; [viric];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, noSysDirs
{ stdenv, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin
@@ -72,7 +72,14 @@ let version = "4.8.5";
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch;
++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch
++ [(fetchpatch {
name = "libc_name_p.diff"; # needed to build with gcc6
url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=ec1cc0263f1";
sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
excludes = [ "gcc/cp/ChangeLog" ];
})]
;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -123,8 +130,6 @@ let version = "4.8.5";
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" +
@@ -201,7 +206,7 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
outputs = [ "out" "lib" "doc" ];
outputs = [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
@@ -293,6 +298,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 " +
@@ -343,12 +350,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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;
@@ -437,7 +442,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -73,8 +73,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
@@ -125,8 +124,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" +
@@ -301,6 +298,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 " +
@@ -349,12 +348,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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;
@@ -443,7 +440,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -129,8 +129,6 @@ let version = "5.4.0";
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" +
@@ -315,6 +313,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 " +
@@ -364,16 +364,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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 + ''
--build=${buildPlatform.config}
--host=${hostPlatform.config}
--target=${targetPlatform.config}
'');
";
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
@@ -462,7 +456,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -1,25 +0,0 @@
From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 3 Jan 2017 05:36:40 +0000
Subject: [PATCH] * config/darwin-driver.c (darwin_driver_init):
Const-correctness fixes for first_period and second_period variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4
---
diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
index 0c4f0cd..e3ed79d 100644
--- a/gcc/config/darwin-driver.c
+++ b/gcc/config/darwin-driver.c
@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
if (vers_string != NULL)
{
char *asm_major = NULL;
- char *first_period = strchr(vers_string, '.');
+ const char *first_period = strchr(vers_string, '.');
if (first_period != NULL)
{
- char *second_period = strchr(first_period+1, '.');
+ const char *second_period = strchr(first_period+1, '.');
if (second_period != NULL)
asm_major = xstrndup (vers_string, second_period-vers_string);
else

View File

@@ -59,7 +59,7 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "6.3.0";
let version = "6.4.0";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
@@ -73,8 +73,7 @@ let version = "6.3.0";
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
# target libraries and tools.
++ optional langAda ../gnat-cflags.patch
++ optional langFortran ../gfortran-driving.patch
++ optional hostPlatform.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0
++ optional langFortran ../gfortran-driving.patch;
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -125,8 +124,6 @@ let version = "6.3.0";
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" +
@@ -196,8 +193,8 @@ stdenv.mkDerivation ({
builder = ../builder.sh;
src = fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
sha256 = "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph";
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5";
};
inherit patches;
@@ -210,6 +207,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -297,6 +307,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 " +
@@ -346,12 +358,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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;
@@ -440,7 +450,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -125,8 +125,6 @@ let version = "7.1.0";
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" +
@@ -211,6 +209,19 @@ stdenv.mkDerivation ({
hardeningDisable = [ "format" ];
# This should kill all the stdinc frameworks that gcc and friends like to
# insert into default search paths.
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
substituteInPlace gcc/config/darwin-c.c \
--replace 'if (stdinc)' 'if (0)'
substituteInPlace libgcc/config/t-slibgcc-darwin \
--replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)"
substituteInPlace libgfortran/configure \
--replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname"
'';
postPatch =
if (hostPlatform.isHurd
|| (libcCross != null # e.g., building `gcc.crossDrv'
@@ -298,6 +309,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 " +
@@ -347,12 +360,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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;
@@ -441,7 +452,7 @@ stdenv.mkDerivation ({
# On GNU/Hurd glibc refers to Mach & Hurd
# headers.
++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
++ optionals (libcCross != null && libcCross ? propagatedBuildInputs)
libcCross.propagatedBuildInputs
));

View File

@@ -125,8 +125,6 @@ let version = "7-20170409";
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" +
@@ -298,6 +296,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 " +
@@ -347,12 +347,10 @@ stdenv.mkDerivation ({
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
${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;
@@ -441,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
));