gcc-snapshot: Removed java as a target language

This commit is contained in:
Patrick Hilhorst 2018-05-03 19:42:42 +02:00
parent 719810d474
commit 0a4622cfe9

View File

@ -2,23 +2,16 @@
, langC ? true, langCC ? true, langFortran ? false , langC ? true, langCC ? true, langFortran ? false
, langObjC ? targetPlatform.isDarwin , langObjC ? targetPlatform.isDarwin
, langObjCpp ? targetPlatform.isDarwin , langObjCpp ? targetPlatform.isDarwin
, langJava ? false
, langGo ? false , langGo ? false
, profiledCompiler ? false , profiledCompiler ? false
, staticCompiler ? false , staticCompiler ? false
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework. , isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? 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
, enableMultilib ? false , enableMultilib ? false
, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
@ -34,10 +27,6 @@
, buildPackages , buildPackages
}: }:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
# LTO needs libelf and zlib. # LTO needs libelf and zlib.
assert libelf != null -> zlib != null; assert libelf != null -> zlib != null;
@ -63,29 +52,6 @@ let version = "7-20170409";
++ optional noSysDirs ../no-sys-dirs.patch ++ optional noSysDirs ../no-sys-dirs.patch
++ optional langFortran ../gfortran-driving.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 */ /* Platform flags */
platformFlags = let platformFlags = let
gccArch = targetPlatform.platform.gcc.arch or null; gccArch = targetPlatform.platform.gcc.arch or null;
@ -166,9 +132,6 @@ let version = "7-20170409";
in in
# We need all these X libraries when building AWT with GTK+.
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon; 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, # TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
crossStageStatic = targetPlatform == hostPlatform || crossStageStatic; crossStageStatic = targetPlatform == hostPlatform || crossStageStatic;
inherit noSysDirs staticCompiler langJava inherit noSysDirs staticCompiler
libcCross crossMingw; libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ] nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl) ++ (optional (perl != null) perl);
++ (optional javaAwtGtk pkgconfig);
# For building runtime libs # For building runtime libs
depsBuildTarget = depsBuildTarget =
@ -266,8 +228,6 @@ stdenv.mkDerivation ({
targetPackages.stdenv.cc.bintools # For linking code at run-time targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl) ] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools])
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
@ -319,7 +279,6 @@ stdenv.mkDerivation ({
( optional langC "c" ( optional langC "c"
++ optional langCC "c++" ++ optional langCC "c++"
++ optional langFortran "fortran" ++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langGo "go" ++ optional langGo "go"
++ optional langObjC "objc" ++ optional langObjC "objc"
++ optional langObjCpp "obj-c++" ++ optional langObjCpp "obj-c++"
@ -340,18 +299,6 @@ stdenv.mkDerivation ({
# Optional features # Optional features
optional (isl != null) "--with-isl=${isl}" ++ 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 ++ platformFlags ++
optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++
optional (!bootstrap) "--disable-bootstrap" ++ optional (!bootstrap) "--disable-bootstrap" ++
@ -388,11 +335,6 @@ stdenv.mkDerivation ({
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled. # 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. # Likewise, the LTO code doesn't find zlib.
# #
# Cross-compiling, we need gcc not to read ./specs in order to build the g++ # 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" ([] CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread ++ optional (libpthread != null) libpthread
++ optional (libpthreadCross != null) libpthreadCross ++ optional (libpthreadCross != null) libpthreadCross
@ -415,9 +354,6 @@ stdenv.mkDerivation ({
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([] LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
++ optional (zlib != null) zlib ++ optional (zlib != null) zlib
++ optional langJava boehmgc
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ]
++ optional (libpthread != null) libpthread) ++ optional (libpthread != null) libpthread)
); );
@ -458,8 +394,8 @@ stdenv.mkDerivation ({
longDescription = '' longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++, The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
as libraries for these languages (libstdc++, libgcj, libgomp,...). libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant. compiler used in the GNU system including the GNU/Linux variant.