Merge pull request #39924 from Synthetica9/gcc7-nojava-fix
gcc7: Removed java as a target language
This commit is contained in:
commit
cbe21ac614
@ -2,23 +2,16 @@
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
, langJava ? false
|
||||
, langGo ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk2 ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, zlib ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
@ -33,10 +26,6 @@
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null
|
||||
&& perl != null; # for `--enable-java-home'
|
||||
|
||||
# LTO needs libelf and zlib.
|
||||
assert libelf != null -> zlib != null;
|
||||
|
||||
@ -70,29 +59,6 @@ let version = "7.3.0";
|
||||
})
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Platform flags */
|
||||
platformFlags = let
|
||||
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||
@ -178,9 +144,6 @@ let version = "7.3.0";
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = crossNameAddon + "${name}${if stripped then "" else "-debug"}-${version}";
|
||||
|
||||
@ -282,13 +245,12 @@ stdenv.mkDerivation ({
|
||||
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
inherit noSysDirs staticCompiler
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
++ (optional (perl != null) perl);
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
@ -303,8 +265,6 @@ stdenv.mkDerivation ({
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
@ -356,7 +316,6 @@ stdenv.mkDerivation ({
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langGo "go"
|
||||
++ optional langObjC "objc"
|
||||
++ optional langObjCpp "obj-c++"
|
||||
@ -377,19 +336,6 @@ stdenv.mkDerivation ({
|
||||
# Optional features
|
||||
optional (isl != null) "--with-isl=${isl}" ++
|
||||
|
||||
# Java options
|
||||
optionals langJava [
|
||||
"--with-ecj-jar=${javaEcj}"
|
||||
|
||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
@ -428,11 +374,6 @@ stdenv.mkDerivation ({
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
|
||||
# library headers and binaries, regarless of the language being compiled.
|
||||
#
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
|
||||
# `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
|
||||
# them to $CPATH and $LIBRARY_PATH in this case.
|
||||
#
|
||||
# Likewise, the LTO code doesn't find zlib.
|
||||
#
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
|
||||
@ -441,9 +382,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread
|
||||
++ optional (libpthreadCross != null) libpthreadCross
|
||||
|
||||
@ -455,9 +393,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread)
|
||||
);
|
||||
|
||||
@ -498,8 +433,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
|
||||
libraries for these languages (libstdc++, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
|
@ -2,23 +2,16 @@
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? targetPlatform.isDarwin
|
||||
, langObjCpp ? targetPlatform.isDarwin
|
||||
, langJava ? false
|
||||
, langGo ? false
|
||||
, profiledCompiler ? false
|
||||
, staticCompiler ? false
|
||||
, enableShared ? true
|
||||
, texinfo ? null
|
||||
, perl ? null # optional, for texi2pod (then pod2man); required for Java
|
||||
, perl ? null # optional, for texi2pod (then pod2man)
|
||||
, gmp, mpfr, libmpc, gettext, which
|
||||
, libelf # optional, for link-time optimizations (LTO)
|
||||
, isl ? null # optional, for the Graphite optimization framework.
|
||||
, zlib ? null, boehmgc ? null
|
||||
, zip ? null, unzip ? null, pkgconfig ? null
|
||||
, gtk2 ? null, libart_lgpl ? null
|
||||
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
|
||||
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
|
||||
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
|
||||
, x11Support ? langJava
|
||||
, zlib ? null
|
||||
, enableMultilib ? false
|
||||
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
|
||||
, name ? "gcc"
|
||||
@ -34,10 +27,6 @@
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert langJava -> zip != null && unzip != null
|
||||
&& zlib != null && boehmgc != null
|
||||
&& perl != null; # for `--enable-java-home'
|
||||
|
||||
# LTO needs libelf and zlib.
|
||||
assert libelf != null -> zlib != null;
|
||||
|
||||
@ -63,29 +52,6 @@ let version = "7-20170409";
|
||||
++ optional noSysDirs ../no-sys-dirs.patch
|
||||
++ optional langFortran ../gfortran-driving.patch;
|
||||
|
||||
javaEcj = fetchurl {
|
||||
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
|
||||
# `configure' time.
|
||||
|
||||
# XXX: Eventually we might want to take it from upstream.
|
||||
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
|
||||
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
|
||||
};
|
||||
|
||||
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
|
||||
# binary distribution here to allow the whole chain to be bootstrapped.
|
||||
javaAntlr = fetchurl {
|
||||
url = http://www.antlr.org/download/antlr-4.4-complete.jar;
|
||||
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
|
||||
};
|
||||
|
||||
xlibs = [
|
||||
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
|
||||
xproto renderproto xextproto inputproto randrproto
|
||||
];
|
||||
|
||||
javaAwtGtk = langJava && x11Support;
|
||||
|
||||
/* Platform flags */
|
||||
platformFlags = let
|
||||
gccArch = targetPlatform.platform.gcc.arch or null;
|
||||
@ -166,9 +132,6 @@ let version = "7-20170409";
|
||||
|
||||
in
|
||||
|
||||
# We need all these X libraries when building AWT with GTK+.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
|
||||
|
||||
@ -245,13 +208,12 @@ stdenv.mkDerivation ({
|
||||
|
||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
|
||||
inherit noSysDirs staticCompiler langJava
|
||||
inherit noSysDirs staticCompiler
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
++ (optional javaAwtGtk pkgconfig);
|
||||
++ (optional (perl != null) perl);
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
@ -266,8 +228,6 @@ stdenv.mkDerivation ({
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
++ (optionals langJava [ boehmgc zip unzip ])
|
||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
|
||||
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
@ -319,7 +279,6 @@ stdenv.mkDerivation ({
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "fortran"
|
||||
++ optional langJava "java"
|
||||
++ optional langGo "go"
|
||||
++ optional langObjC "objc"
|
||||
++ optional langObjCpp "obj-c++"
|
||||
@ -340,18 +299,6 @@ stdenv.mkDerivation ({
|
||||
# Optional features
|
||||
optional (isl != null) "--with-isl=${isl}" ++
|
||||
|
||||
# Java options
|
||||
optionals langJava [
|
||||
"--with-ecj-jar=${javaEcj}"
|
||||
|
||||
# Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
|
||||
# <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
|
||||
"--enable-java-home"
|
||||
"--with-java-home=\${prefix}/lib/jvm/jre"
|
||||
] ++
|
||||
optional javaAwtGtk "--enable-java-awt=gtk" ++
|
||||
optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
|
||||
|
||||
platformFlags ++
|
||||
optional (targetPlatform != hostPlatform) crossConfigureFlags ++
|
||||
optional (!bootstrap) "--disable-bootstrap" ++
|
||||
@ -388,11 +335,6 @@ stdenv.mkDerivation ({
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
|
||||
# library headers and binaries, regarless of the language being compiled.
|
||||
#
|
||||
# Note: When building the Java AWT GTK+ peer, the build system doesn't honor
|
||||
# `--with-gmp' et al., e.g., when building
|
||||
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
|
||||
# them to $CPATH and $LIBRARY_PATH in this case.
|
||||
#
|
||||
# Likewise, the LTO code doesn't find zlib.
|
||||
#
|
||||
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
|
||||
@ -401,9 +343,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread
|
||||
++ optional (libpthreadCross != null) libpthreadCross
|
||||
|
||||
@ -415,9 +354,6 @@ stdenv.mkDerivation ({
|
||||
|
||||
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional langJava boehmgc
|
||||
++ optionals javaAwtGtk xlibs
|
||||
++ optionals javaAwtGtk [ gmp mpfr ]
|
||||
++ optional (libpthread != null) libpthread)
|
||||
);
|
||||
|
||||
@ -458,8 +394,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
longDescription = ''
|
||||
The GNU Compiler Collection includes compiler front ends for C, C++,
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
|
||||
as libraries for these languages (libstdc++, libgcj, libgomp,...).
|
||||
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
|
||||
libraries for these languages (libstdc++, libgomp,...).
|
||||
|
||||
GCC development is a part of the GNU Project, aiming to improve the
|
||||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
|
Loading…
Reference in New Issue
Block a user