toolchain.eclass contains: tc_version_is_at_least 3 && IUSE+=" doc gcj ... if in_iuse gcj ; then GCJ_DEPS=">=media-libs/libart_lgpl-2.1" ... DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )" fi 1. GCC <3.4 should not have any dependency on media-libs/libart_lgpl. 2. GCC 3.4.* and 4.0.* should have dependency on >=media-libs/libart_lgpl-2.1 inside "awt?" conditional, since relevant check for libart in libjava/configure.ac is inside 'if test "$use_gtk_awt" = yes' conditional. GCC 3.4 branch libjava/configure.in: # Test for Gtk stuff, if asked for. if test "$use_gtk_awt" = yes; then AM_PATH_GTK_2_0(2.2.0,,exit 1) AM_PATH_GLIB_2_0(2.2.0,,exit 1,gthread) dnl XXX Fix me when libart.m4 has the compile test fixed! enable_libarttest=no AM_PATH_LIBART(2.1.0,,exit 1) fi GCC 4.0 branch libjava/configure.ac: # Test for Gtk stuff, if asked for. if test "$use_gtk_awt" = yes; then ... PKG_CHECK_MODULES(LIBART, libart-2.0 >= 2.1) AC_SUBST(LIBART_CFLAGS) AC_SUBST(LIBART_LIBS) ... fi 3. GCC >=4.1 should not have any dependency on media-libs/libart_lgpl. 4. GCC 4.1.* has useless reference to $(LIBART_LIBS) in libjava/Makefile.am: lib_gnu_java_awt_peer_gtk_la_LIBADD = \ gnu-java-awt-peer-gtk.lo \ classpath/native/jni/gtk-peer/libgtkpeer.la \ $(GTK_LIBS) $(GLIB_LIBS) $(LIBART_LIBS) $(CAIRO_LIBS) $(PANGOFT2_LIBS) 5. GCC >=4.1 has useless check for libart in libjava/configure.ac: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61552 A workaround is to export e.g. LIBART_CFLAGS="unused" LIBART_LIBS="-lc".
GCC's libjava/configure contains very old versions of pkg-config macros (from pkg-config <0.16.0), which do not respect *_CFLAGS and *_LIBS environmental variables. My patch creates a custom libart-2.0.pc in temporary directory and exports PKG_CONFIG_PATH environmental variable.
Created attachment 379342 [details, diff] toolchain.eclass.patch Patch for bug #511832, bug #513576, bug #513578 and bug #513716.
Created attachment 389278 [details, diff] gcc_delete_libart_check.patch Please include this patch in patchsets for 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0 branches.
Created attachment 389282 [details, diff] gcc_delete_libart_check.patch
Comment on attachment 379342 [details, diff] toolchain.eclass.patch this bug is only about libart, so let's not conflate it with multilib
Comment on attachment 389282 [details, diff] gcc_delete_libart_check.patch looks straightforward enough. can you attach this to the upstream bug ? you probably also want to send it to the gcc-patches@ mailing list unless you want me to do it.
(In reply to SpanKY from comment #6) Please send it to that list.
Created attachment 389798 [details, diff] Patch for GCC 4.1.0 - 4.1.2
Created attachment 389800 [details, diff] Patch for GCC 4.2.0 - 4.2.4
Created attachment 389802 [details, diff] Patch for GCC 4.3.0 - 4.3.1
Created attachment 389804 [details, diff] Patch for GCC 4.3.2 - 4.3.6
Created attachment 389806 [details, diff] Patch for GCC 4.4.0 - 4.4.2
Created attachment 389808 [details, diff] Patch for GCC 4.4.3 - 4.4.4
Created attachment 389810 [details, diff] Patch for GCC 4.4.5 - 4.4.7
Created attachment 389812 [details, diff] Patch for GCC 4.5.0 - 4.8.1
Created attachment 389814 [details, diff] Patch for GCC 4.8.2 - 4.9.2
Created attachment 389816 [details, diff] Combined patch for current sys-devel/gcc::gentoo
Created attachment 404450 [details, diff] Combined patch for current sys-devel/gcc::gentoo
Let's close it as non-masked versions of gcc don't have gcj and related libraries.