@@ -2,23 +2,22 @@
22, langC ? true, langCC ? true, langFortran ? false
33, langObjC ? targetPlatform.isDarwin
44, langObjCpp ? targetPlatform.isDarwin
5−, langJava ? false
65, langGo ? false
76, profiledCompiler ? false
87, staticCompiler ? false
98, enableShared ? true
109, texinfo ? null
11−, perl ? null # optional, for texi2pod (then pod2man); required for Java
10+, perl ? null # optional, for texi2pod (then pod2man)
1211, gmp, mpfr, libmpc, gettext, which
1312, libelf # optional, for link-time optimizations (LTO)
1413, isl ? null # optional, for the Graphite optimization framework.
15−, zlib ? null, boehmgc ? null
16−, zip ? null, unzip ? null, pkgconfig ? null
14+, zlib ? null
15+, pkgconfig ? null
1716, gtk2 ? null, libart_lgpl ? null
1817, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
1918, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
2019, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
21−, x11Support ? langJava
20+, x11Support ? false
2221, enableMultilib ? false
2322, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
2423, name ? "gcc"
@@ -33,10 +32,6 @@
3332, buildPackages
3433}:
3534
36−assert langJava -> zip != null && unzip != null
37− && zlib != null && boehmgc != null
38− && perl != null; # for `--enable-java-home'
39−
4035# LTO needs libelf and zlib.
4136assert libelf != null -> zlib != null;
4237
@@ -65,29 +60,11 @@ let version = "8.1.0";
6560 }) */
6661 ++ optional langFortran ../gfortran-driving.patch;
6762
68− javaEcj = fetchurl {
69− # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
70− # `configure' time.
71−
72− # XXX: Eventually we might want to take it from upstream.
73− url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
74− sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
75− };
76−
77− # Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
78− # binary distribution here to allow the whole chain to be bootstrapped.
79− javaAntlr = fetchurl {
80− url = http://www.antlr.org/download/antlr-4.4-complete.jar;
81− sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
82− };
83−
8463 xlibs = [
8564 libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
8665 xproto renderproto xextproto inputproto randrproto
8766 ];
8867
89− javaAwtGtk = langJava && x11Support;
90−
9168 /* Platform flags */
9269 platformFlags = let
9370 gccArch = targetPlatform.platform.gcc.arch or null;
@@ -277,13 +254,12 @@ stdenv.mkDerivation ({
277254
278255 # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
279256 crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
280− inherit noSysDirs staticCompiler langJava
257+ inherit noSysDirs staticCompiler
281258 libcCross crossMingw;
282259
283260 depsBuildBuild = [ buildPackages.stdenv.cc ];
284261 nativeBuildInputs = [ texinfo which gettext ]
285− ++ (optional (perl != null) perl)
286− ++ (optional javaAwtGtk pkgconfig);
262+ ++ (optional (perl != null) perl);
287263
288264 # For building runtime libs
289265 depsBuildTarget =
@@ -298,8 +274,6 @@ stdenv.mkDerivation ({
298274 targetPackages.stdenv.cc.bintools # For linking code at run-time
299275 ] ++ (optional (isl != null) isl)
300276 ++ (optional (zlib != null) zlib)
301− ++ (optionals langJava [ boehmgc zip unzip ])
302− ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
303277 ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
304278
305279 # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@@ -351,7 +325,6 @@ stdenv.mkDerivation ({
351325 ( optional langC "c"
352326 ++ optional langCC "c++"
353327 ++ optional langFortran "fortran"
354− ++ optional langJava "java"
355328 ++ optional langGo "go"
356329 ++ optional langObjC "objc"
357330 ++ optional langObjCpp "obj-c++"
@@ -372,19 +345,6 @@ stdenv.mkDerivation ({
372345 # Optional features
373346 optional (isl != null) "--with-isl=${isl}" ++
374347
375− # Java options
376− optionals langJava [
377− "--with-ecj-jar=${javaEcj}"
378−
379− # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
380− # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
381− "--enable-java-home"
382− "--with-java-home=\${prefix}/lib/jvm/jre"
383− ] ++
384− optional javaAwtGtk "--enable-java-awt=gtk" ++
385− optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++
386−
387−
388348 platformFlags ++
389349 optional (targetPlatform != hostPlatform) crossConfigureFlags ++
390350 optional (!bootstrap) "--disable-bootstrap" ++
@@ -421,11 +381,6 @@ stdenv.mkDerivation ({
421381 # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
422382 # library headers and binaries, regarless of the language being compiled.
423383 #
424− # Note: When building the Java AWT GTK+ peer, the build system doesn't honor
425− # `--with-gmp' et al., e.g., when building
426− # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
427− # them to $CPATH and $LIBRARY_PATH in this case.
428− #
429384 # Likewise, the LTO code doesn't find zlib.
430385 #
431386 # Cross-compiling, we need gcc not to read ./specs in order to build the g++
@@ -434,9 +389,6 @@ stdenv.mkDerivation ({
434389
435390 CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
436391 ++ optional (zlib != null) zlib
437− ++ optional langJava boehmgc
438− ++ optionals javaAwtGtk xlibs
439− ++ optionals javaAwtGtk [ gmp mpfr ]
440392 ++ optional (libpthread != null) libpthread
441393 ++ optional (libpthreadCross != null) libpthreadCross
442394
@@ -448,9 +400,6 @@ stdenv.mkDerivation ({
448400
449401 LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
450402 ++ optional (zlib != null) zlib
451− ++ optional langJava boehmgc
452− ++ optionals javaAwtGtk xlibs
453− ++ optionals javaAwtGtk [ gmp mpfr ]
454403 ++ optional (libpthread != null) libpthread)
455404 );
456405
@@ -491,8 +440,8 @@ stdenv.mkDerivation ({
491440
492441 longDescription = ''
493442 The GNU Compiler Collection includes compiler front ends for C, C++,
494− Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
495− as libraries for these languages (libstdc++, libgcj, libgomp,...).
443+ Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
444+ libraries for these languages (libstdc++, libgomp,...).
496445
497446 GCC development is a part of the GNU Project, aiming to improve the
498447 compiler used in the GNU system including the GNU/Linux variant.