diff mbox

PATCH RFA: Don't build libffi if --disable-libgcj (PR 46819)

Message ID mcrr5dqbll8.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Dec. 9, 2010, 10:57 p.m. UTC
PR 46819 points out that we currently build libffi if the java language
is enabled, the Go language is not enabled, and --disable-libgcj is
used.  This patch is a simple way to fix that: if --disable-libgcj is
used, it clears libgcj_saved.  That is what gcc/java/config-lang.in uses
to set the list of target libraries, so the effect is to not build any
of the java libraries.  This does not affect the message about which
directories are not supported.

Bootstrapped on x86_64-unknown-linux-gnu.  I also ran configure with the
following options and examined TARGET_CONFIGDIRS in the generated
Makefile.

--enable-languages=c

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libmudflap libssp libquadmath

--enable-languages=c,java [--enable-libgcj]

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libquadmath boehm-gc libffi zlib libjava

--enable-languages=c,java --disable-libgcj

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libquadmath

--enable-languages=c,go [--enable-libgcj] [--disable-libgcj]
--enable-languages=c,go,java --disable-libgcj

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libquadmath libffi libgo

--enable-languages=c,go,java [--enable-libgcj]

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libquadmath boehm-gc libffi zlib libjava libgo

--enable-languages=c,c++

TARGET_CONFIGDIRS =  libgcc libiberty libgomp libstdc++-v3 libmudflap libssp libquadmath


OK for mainline?

Ian


2010-12-09  Ian Lance Taylor  <iant@google.com>

	PR bootstrap/46819
	* configure.ac: For --disable-libgcj clear libgcj_saved.
	* configure: Rebuild.

Comments

Ralf Wildenhues Dec. 10, 2010, 6:11 a.m. UTC | #1
* Ian Lance Taylor wrote on Thu, Dec 09, 2010 at 11:57:55PM CET:
> PR 46819 points out that we currently build libffi if the java language
> is enabled, the Go language is not enabled, and --disable-libgcj is
> used.  This patch is a simple way to fix that: if --disable-libgcj is
> used, it clears libgcj_saved.  That is what gcc/java/config-lang.in uses
> to set the list of target libraries, so the effect is to not build any
> of the java libraries.  This does not affect the message about which
> directories are not supported.
> 
> Bootstrapped on x86_64-unknown-linux-gnu.  I also ran configure with the
> following options and examined TARGET_CONFIGDIRS in the generated
> Makefile.

> OK for mainline?

OK thanks.  There is also --without-libffi, but that is recognized by
libjava/configure only, not the top level.

This needs to be synced to src.

The selection system is starting to turn confusing enough that in the
longer term, we could think about a slightly more general dependency
selection mechanism.  I'd prefer not doing that in stage 3 though.

Thanks,
Ralf

> 2010-12-09  Ian Lance Taylor  <iant@google.com>
> 
> 	PR bootstrap/46819
> 	* configure.ac: For --disable-libgcj clear libgcj_saved.
> 	* configure: Rebuild.

> --- configure.ac	(revision 167668)
> +++ configure.ac	(working copy)
> @@ -485,6 +485,9 @@ no)
>    # Make sure we get it printed in the list of not supported target libs.
>    # Don't disable libffi, though, other languages use it.
>    noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
> +  # Clear libgcj_saved so that even if java is enabled libffi won't be
> +  # built.
> +  libgcj_saved=
>    ;;
>  esac
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 167668)
+++ configure.ac	(working copy)
@@ -485,6 +485,9 @@  no)
   # Make sure we get it printed in the list of not supported target libs.
   # Don't disable libffi, though, other languages use it.
   noconfigdirs="$noconfigdirs `echo ${libgcj} | sed -e 's/target-libffi//'`"
+  # Clear libgcj_saved so that even if java is enabled libffi won't be
+  # built.
+  libgcj_saved=
   ;;
 esac