3
0
Fork 0
forked from mirrors/nixpkgs

Add support for the new Go frontend to GCC 4.6.0.

This isn't as useful as it could be, since gcc-wrapper doesn't know about
the gccgo binary so there is no gccgo wrapper script. Since changing
gcc-wrapper would lead to a nearly full rebuild, I thing the change to
gcc-wrapper should go into stdenv-updates.

svn path=/nixpkgs/trunk/; revision=26668
This commit is contained in:
Shea Levy 2011-04-02 15:21:36 +00:00
parent 50b8829ce9
commit ea7a559290
5 changed files with 30 additions and 10 deletions

View file

@ -21,16 +21,18 @@ options["g++"]="langCC"
options["fortran"]="langFortran"
options["java"]="langJava"
options["ada"]="langAda"
options["go"]="langGo"
cat > "$out"<<EOF
/* Automatically generated by \`$(basename $0)', do not edit.
For GCC ${version}. */
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }:
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
langGo }:
assert version == "${version}";
EOF
for component in core g++ fortran java ada
for component in core g++ fortran java ada go
do
dir="ftp.gnu.org/gnu/gcc/gcc-${version}"
file="gcc-${component}-${version}.tar.bz2"

View file

@ -8,6 +8,7 @@ mkdir $NIX_FIXINC_DUMMY
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
# Thing.
export CPP="gcc -E"
export CXXCPP="gcc -E"
if test "$staticCompiler" = "1"; then
EXTRA_LDFLAGS="-static"

View file

@ -3,6 +3,7 @@
, langJava ? false
, langAda ? false
, langVhdl ? false
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
@ -137,7 +138,7 @@ stdenv.mkDerivation ({
src = (import ./sources.nix) {
inherit fetchurl optional version;
inherit langC langCC langFortran langJava langAda;
inherit langC langCC langFortran langJava langAda langGo;
};
patches =
@ -256,6 +257,7 @@ stdenv.mkDerivation ({
++ optional langTreelang "treelang"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
++ optional langGo "go"
)
)
}
@ -309,6 +311,7 @@ stdenv.mkDerivation ({
++ optional langTreelang "treelang"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
++ optional langGo "go"
)
)
}
@ -372,7 +375,7 @@ stdenv.mkDerivation ({
else null;
passthru = { inherit langC langCC langAda langFortran langTreelang langVhdl
enableMultilib version; };
langGo enableMultilib version; };
enableParallelBuilding = true;

View file

@ -1,26 +1,31 @@
/* Automatically generated by `update-gcc.sh', do not edit.
For GCC 4.6.0. */
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }:
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
langGo }:
assert version == "4.6.0";
optional /* langC */ true (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
sha256 = "1hfgn36hs6jpaflhirmhavwjqzwa35fjl9i661j0lwp3dmbr2c9m";
sha256 = "353191576de3720a643026262a5d198a7f2cf956b0e608a953571a0dcdb0cfc1";
}) ++
optional langCC (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
sha256 = "0ga5vdyc1n0f60gph28zc08n05kxadm77q7kg9fgsfr0vvnjzsf2";
sha256 = "c2e92fedde203bfd5c7af3e0736a537d166011601f09781f300ed8c07cdb453d";
}) ++
optional langFortran (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
sha256 = "1b09411jazcz0pq6plsmhgbb6mkz1l4d8j9p0iz56a4v5ccvn4jn";
sha256 = "5612bb192b9b28537e043749d4080d7f56b3d68355d36bf0059f7d25432009ac";
}) ++
optional langJava (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
sha256 = "15y8w9lvxg33kmiwcwwyj68w0ngay1fmshcirml7z3dlgjqm7lbd";
sha256 = "6dd153b17cb48d7f68cd91415d5df0ea59c091919e73c6639d63bcbe69e2c897";
}) ++
optional langAda (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
sha256 = "1z207n5nxvzdfh26l5jyx13fam51hy0vwyan40jjavdh8pi1x81m";
sha256 = "35a01ee245b06d2525205679be8187a154e546e85e166a0474edef6e8b3d40fc";
}) ++
optional langGo (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-go-${version}.tar.bz2";
sha256 = "40fd5aef37a87ed1ebd1c4ae357bfae76c7351185be8dc79dbafe2b516ef9e35";
}) ++
[]

View file

@ -1918,6 +1918,15 @@ let
inherit fetchurl stdenv;
});
gccgo = gccgo46;
gccgo46 = wrapGCC (gcc46_real.gcc.override {
name = "gccgo";
langCC = true; #required for go
langC = true;
langGo = true;
});
ghdl = wrapGCC (import ../development/compilers/gcc-4.3 {
inherit stdenv fetchurl texinfo gmp mpfr noSysDirs gnat;
name = "ghdl";