From patchwork Thu Jan 20 21:25:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 79770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0E5CAB6EED for ; Fri, 21 Jan 2011 08:26:02 +1100 (EST) Received: (qmail 4233 invoked by alias); 20 Jan 2011 21:26:01 -0000 Received: (qmail 4190 invoked by uid 22791); 20 Jan 2011 21:25:58 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_GC, TW_IB, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Jan 2011 21:25:51 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0KLPlic011652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Jan 2011 16:25:47 -0500 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0KLPjoS024153 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Jan 2011 16:25:47 -0500 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p0KLPjXf030209; Thu, 20 Jan 2011 19:25:45 -0200 Received: from livre.localdomain (aoliva@localhost [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0KLPivx000953; Thu, 20 Jan 2011 19:25:44 -0200 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p0KLPgMC000951; Thu, 20 Jan 2011 19:25:42 -0200 From: Alexandre Oliva To: Ralf Wildenhues Cc: gcc-patches@gcc.gnu.org Subject: Re: [PR libgcj/44341] introduce --with-target-{gmp,mpfr,...} References: <20110117190458.GA25425@gmx.de> <20110120180335.GB21455@gmx.de> Date: Thu, 20 Jan 2011 19:25:42 -0200 In-Reply-To: <20110120180335.GB21455@gmx.de> (Ralf Wildenhues's message of "Thu, 20 Jan 2011 19:03:35 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Jan 20, 2011, Ralf Wildenhues wrote: > I didn't intend to claim that anything else was missing. Oh. It looked like you were saying some handling of flags for the target was missing from the patch. If that wasn't so, well, sorry, I still can't quite understand what it was that you were saying, but if you don't have objections (please confirm), I'll go ahead with the patch below. > I claimed that the fact that there was nothing else missing would make > my much-shorter and more general patch quite almost eligible. > What am I missing? Consider --target=sh-linux-gnu --with-sysroot --with-gmp=/opt/host/gmp With gmp for the host in /opt/host/gmp, and gmp for the target in the sysroot (so no flags needed). With your proposed approach, --with-gmp=/opt/host/gmp would still be passed to libgcj, and it would attempt to use gmp for the host. With the patch I posted, --with-gmp would not be passed to libgcj, because we're building a cross compiler, and the compiler would find gmp for the target in the sysroot. for ChangeLog from Alexandre Oliva PR libgcj/44341 * configure.ac: Remap --with-target-* to --with-* for target libraries. Fix alignment of help messages. * config/cloog.m4: Likewise. * configure: Rebuilt. for gcc/ChangeLog from Alexandre Oliva PR libgcj/44341 * doc/install.texi: Document --with-target* options. Index: configure.ac =================================================================== --- configure.ac.orig 2011-01-19 19:58:20.685898557 -0200 +++ configure.ac 2011-01-20 15:18:30.131006796 -0200 @@ -385,7 +385,7 @@ case "${ENABLE_GOLD}" in esac AC_ARG_ENABLE(ld, -[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]], +[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]], ENABLE_LD=$enableval, ENABLE_LD=yes) @@ -1334,12 +1334,14 @@ have_gmp=no # Specify a location for mpc # check for this first so it ends up on the link line before mpfr. -AC_ARG_WITH(mpc, [ --with-mpc=PATH specify prefix directory for installed MPC package. +AC_ARG_WITH(mpc, [ --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib]) AC_ARG_WITH(mpc-include, [ --with-mpc-include=PATH specify directory for installed MPC include files]) -AC_ARG_WITH(mpc-lib, [ --with-mpc-lib=PATH specify directory for the installed MPC library]) +AC_ARG_WITH(mpc-lib, [ --with-mpc-lib=PATH specify directory for the installed MPC library]) +AC_ARG_WITH(target-mpc, + [ --with-target-mpc* same as above, but for target rather than host]) if test "x$with_mpc" != x; then gmplibs="-L$with_mpc/lib $gmplibs" @@ -1373,6 +1375,8 @@ AC_ARG_WITH(mpfr, [ --with-mpfr=PATH AC_ARG_WITH(mpfr-include, [ --with-mpfr-include=PATH specify directory for installed MPFR include files]) AC_ARG_WITH(mpfr-lib, [ --with-mpfr-lib=PATH specify directory for the installed MPFR library]) +AC_ARG_WITH(target-mpfr, + [ --with-target-mpfr* same as above, but for target rather than host]) if test "x$with_mpfr" != x; then gmplibs="-L$with_mpfr/lib $gmplibs" @@ -1405,6 +1409,8 @@ AC_ARG_WITH(gmp, [ --with-gmp=PATH plus --with-gmp-lib=PATH/lib]) AC_ARG_WITH(gmp-include, [ --with-gmp-include=PATH specify directory for installed GMP include files]) AC_ARG_WITH(gmp-lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library]) +AC_ARG_WITH(target-gmp, + [ --with-target-gmp* same as above, but for target rather than host]) if test "x$with_gmp" != x; then @@ -1558,7 +1564,7 @@ AC_SUBST(stage1_ldflags) # Libraries to use for stage1 or when not bootstrapping. AC_ARG_WITH(stage1-libs, -[ -with-stage1-libs=LIBS Libraries for stage1], +[ --with-stage1-libs=LIBS Libraries for stage1], [if test "$withval" = "no" -o "$withval" = "yes"; then stage1_libs= else @@ -1570,7 +1576,7 @@ AC_SUBST(stage1_libs) # Libraries to use for stage2 and later builds. This defaults to the # argument passed to --with-host-libstdcxx. AC_ARG_WITH(boot-libs, -[ --with-boot-libs=LIBS Libraries for stage2 and later], +[ --with-boot-libs=LIBS Libraries for stage2 and later], [if test "$withval" = "no" -o "$withval" = "yes"; then poststage1_libs= else @@ -1605,6 +1611,8 @@ AC_ARG_WITH(ppl, [ --with-ppl=PATH plus --with-ppl-lib=PATH/lib]) AC_ARG_WITH(ppl-include, [ --with-ppl-include=PATH Specify directory for installed PPL include files]) AC_ARG_WITH(ppl-lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library]) +AC_ARG_WITH(target-ppl, + [ --with-target-ppl* same as above, but for target rather than host]) case $with_ppl in no) @@ -2674,7 +2682,7 @@ esac AC_MSG_CHECKING(for default BUILD_CONFIG) AC_ARG_WITH([build-config], - [--with-build-config='NAME NAME2...' + [ --with-build-config='NAME NAME2...' Use config/NAME.mk build configuration], [case $with_build_config in yes) with_build_config= ;; @@ -2815,6 +2823,7 @@ AC_SUBST_FILE(serialization_dependencies # Also strip program-prefix, program-suffix, and program-transform-name, # so that we can pass down a consistent program-transform-name. baseargs= +tbaseargs= keep_next=no skip_next=no eval "set -- $ac_configure_args" @@ -2830,6 +2839,7 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" keep_next=no continue fi @@ -2851,11 +2861,51 @@ do ;; esac + skip_targ=no + case $ac_arg in + --with-target-* | --without-target-*) + ;; + +changequote(,) + --with-* | --without-*) + libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'` + + case $libopt in + *[-_]include) + lib=`echo "$libopt" | sed 's,[-_]include$,,'` + ;; + *[-_]lib) + lib=`echo "$libopt" | sed 's,[-_]lib$,,'` + ;; + *) + lib=$libopt + ;; + esac +changequote([,]) + + case $lib in + mpc | mpfr | gmp | ppl | cloog) + # If we're processing --with-$lib, --with-$lib-include or + # --with-$lib-lib, for one of the libs above, and target is + # different from host, or options such as --with-target-$lib, + # --with-target-$lib-include or --with-target-$lib-lib were + # passed to configure, don't pass the current argument to any + # target library's configure. + if test x$is_cross_compiler = xyes || + eval test "X\${with_target_${lib}+set}\${with_target_${lib}_include+set}\${with_target_${lib}_lib+set}" != X; then + skip_targ=yes + fi + ;; + esac + ;; + esac + case "$ac_arg" in --cache-file=/dev/null | \ -cache-file=/dev/null ) # Handled here to avoid the test to skip args below. baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" # Assert: $separate_arg should always be no. keep_next=$separate_arg ;; @@ -2879,6 +2929,21 @@ do skip_next=$separate_arg continue ;; + --enable-target-* | \ + --disable-target-* | \ + --with-target-* | \ + --without-target-*) + # A target option. Add it, but edit out "-target" from the + # argument passed to configure the target library. + case $ac_arg in + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + baseargs="$baseargs '$ac_arg'" + ac_targ=`echo "$ac_arg" | sed 's,-target,,'` + tbaseargs="$tbaseargs '$ac_targ'" + keep_next=$separate_arg + ;; -*) # An option. Add it. case $ac_arg in @@ -2886,6 +2951,9 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + if test X"$skip_targ" = Xno; then + tbaseargs="$tbaseargs '$ac_arg'" + fi keep_next=$separate_arg ;; *) @@ -2912,10 +2980,13 @@ EOF_SED gcc_transform_name=`cat conftestsed.out` rm -f conftestsed.out baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" +tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'" if test "$silent" = yes; then baseargs="$baseargs --silent" + tbaseargs="$tbaseargs --silent" fi baseargs="$baseargs --disable-option-checking" +tbaseargs="$tbaseargs --disable-option-checking" # Record and document user additions to sub configure arguments. AC_ARG_VAR([build_configargs], @@ -2944,7 +3015,7 @@ esac # This seems to be due to autoconf 2.5x stupidity. host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}" -target_configargs="$target_configargs ${baseargs}" +target_configargs="$target_configargs ${tbaseargs}" # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built @@ -3315,7 +3386,7 @@ AC_SUBST(COMPILER_NM_FOR_TARGET) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful +[ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) Index: configure =================================================================== --- configure.orig 2011-01-20 15:17:27.527990763 -0200 +++ configure 2011-01-20 15:18:30.298004171 -0200 @@ -750,14 +750,17 @@ enable_build_with_cxx with_mpc with_mpc_include with_mpc_lib +with_target_mpc with_mpfr_dir with_mpfr with_mpfr_include with_mpfr_lib +with_target_mpfr with_gmp_dir with_gmp with_gmp_include with_gmp_lib +with_target_gmp with_host_libstdcxx with_stage1_ldflags with_stage1_libs @@ -766,10 +769,12 @@ with_boot_ldflags with_ppl with_ppl_include with_ppl_lib +with_target_ppl enable_ppl_version_check with_cloog with_cloog_include with_cloog_lib +with_target_cloog enable_cloog_backend enable_cloog_version_check enable_lto @@ -1454,7 +1459,7 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-gold[=ARG] build gold [ARG={default,yes,no}] - --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-ld[=ARG] build ld [ARG={default,yes,no}] --disable-libquadmath do not build libquadmath directory --disable-libquadmath-support disable libquadmath support for Fortran @@ -1477,7 +1482,7 @@ Optional Features: force sequential configuration of sub-packages for the host, target or build machine, or all sub-packages - --enable-maintainer-mode enable make rules and dependencies not useful + --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-stage1-checking[=all] choose additional checking for stage1 of the compiler @@ -1487,12 +1492,13 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build-libsubdir=DIR Directory where to find libraries for build system - --with-mpc=PATH specify prefix directory for installed MPC package. + --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib --with-mpc-include=PATH specify directory for installed MPC include files - --with-mpc-lib=PATH specify directory for the installed MPC library + --with-mpc-lib=PATH specify directory for the installed MPC library + --with-target-mpc* same as above, but for target rather than host --with-mpfr-dir=PATH this option has been REMOVED --with-mpfr=PATH specify prefix directory for installed MPFR package. Equivalent to --with-mpfr-include=PATH/include @@ -1500,23 +1506,26 @@ Optional Packages: --with-mpfr-include=PATH specify directory for installed MPFR include files --with-mpfr-lib=PATH specify directory for the installed MPFR library + --with-target-mpfr* same as above, but for target rather than host --with-gmp-dir=PATH this option has been REMOVED --with-gmp=PATH specify prefix directory for the installed GMP package. Equivalent to --with-gmp-include=PATH/include plus --with-gmp-lib=PATH/lib --with-gmp-include=PATH specify directory for installed GMP include files --with-gmp-lib=PATH specify directory for the installed GMP library + --with-target-gmp* same as above, but for target rather than host --with-host-libstdcxx=L Use linker arguments L to link with libstdc++ when linking with PPL --with-stage1-ldflags=FLAGS Linker flags for stage1 - -with-stage1-libs=LIBS Libraries for stage1 - --with-boot-libs=LIBS Libraries for stage2 and later + --with-stage1-libs=LIBS Libraries for stage1 + --with-boot-libs=LIBS Libraries for stage2 and later --with-boot-ldflags=FLAGS Linker flags for stage2 and later --with-ppl=PATH Specify prefix directory for the installed PPL package Equivalent to --with-ppl-include=PATH/include plus --with-ppl-lib=PATH/lib --with-ppl-include=PATH Specify directory for installed PPL include files --with-ppl-lib=PATH Specify the directory for the installed PPL library + --with-target-ppl* same as above, but for target rather than host --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package. Equivalent to --with-cloog-include=PATH/include plus @@ -1525,11 +1534,12 @@ Optional Packages: Specify directory for installed CLooG include files --with-cloog-lib=PATH Specify the directory for the installed CLooG library + --with-target-cloog* same as above, but for target rather than host --with-build-sysroot=SYSROOT use sysroot as the system root during the build --with-debug-prefix-map='A=B C=D ...' map A to B, C to D ... in debug information ---with-build-config='NAME NAME2...' + --with-build-config='NAME NAME2...' Use config/NAME.mk build configuration --with-build-time-tools=PATH use given path to find target tools during the build @@ -5218,6 +5228,12 @@ if test "${with_mpc_lib+set}" = set; the fi +# Check whether --with-target-mpc was given. +if test "${with_target_mpc+set}" = set; then : + withval=$with_target_mpc; +fi + + if test "x$with_mpc" != x; then gmplibs="-L$with_mpc/lib $gmplibs" gmpinc="-I$with_mpc/include $gmpinc" @@ -5267,6 +5283,12 @@ if test "${with_mpfr_lib+set}" = set; th fi +# Check whether --with-target-mpfr was given. +if test "${with_target_mpfr+set}" = set; then : + withval=$with_target_mpfr; +fi + + if test "x$with_mpfr" != x; then gmplibs="-L$with_mpfr/lib $gmplibs" gmpinc="-I$with_mpfr/include $gmpinc" @@ -5316,6 +5338,12 @@ if test "${with_gmp_lib+set}" = set; the fi +# Check whether --with-target-gmp was given. +if test "${with_target_gmp+set}" = set; then : + withval=$with_target_gmp; +fi + + if test "x$with_gmp" != x; then gmplibs="-L$with_gmp/lib $gmplibs" @@ -5675,6 +5703,12 @@ if test "${with_ppl_lib+set}" = set; the fi +# Check whether --with-target-ppl was given. +if test "${with_target_ppl+set}" = set; then : + withval=$with_target_ppl; +fi + + case $with_ppl in no) ppllibs= @@ -5764,6 +5798,12 @@ if test "${with_cloog_lib+set}" = set; t fi +# Check whether --with-target-cloog was given. +if test "${with_target_cloog+set}" = set; then : + withval=$with_target_cloog; +fi + + # Check whether --enable-cloog-backend was given. if test "${enable_cloog_backend+set}" = set; then : enableval=$enable_cloog_backend; if test "x${enableval}" = "xisl"; then @@ -7304,6 +7344,7 @@ serialization_dependencies=serdep.tmp # Also strip program-prefix, program-suffix, and program-transform-name, # so that we can pass down a consistent program-transform-name. baseargs= +tbaseargs= keep_next=no skip_next=no eval "set -- $ac_configure_args" @@ -7319,6 +7360,7 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" keep_next=no continue fi @@ -7340,11 +7382,51 @@ do ;; esac + skip_targ=no + case $ac_arg in + --with-target-* | --without-target-*) + ;; + + + --with-* | --without-*) + libopt=`echo "$ac_arg" | sed -e 's,^--[^-_]*[-_],,' -e 's,=.*$,,'` + + case $libopt in + *[-_]include) + lib=`echo "$libopt" | sed 's,[-_]include$,,'` + ;; + *[-_]lib) + lib=`echo "$libopt" | sed 's,[-_]lib$,,'` + ;; + *) + lib=$libopt + ;; + esac + + + case $lib in + mpc | mpfr | gmp | ppl | cloog) + # If we're processing --with-$lib, --with-$lib-include or + # --with-$lib-lib, for one of the libs above, and target is + # different from host, or options such as --with-target-$lib, + # --with-target-$lib-include or --with-target-$lib-lib were + # passed to configure, don't pass the current argument to any + # target library's configure. + if test x$is_cross_compiler = xyes || + eval test "X\${with_target_${lib}+set}\${with_target_${lib}_include+set}\${with_target_${lib}_lib+set}" != X; then + skip_targ=yes + fi + ;; + esac + ;; + esac + case "$ac_arg" in --cache-file=/dev/null | \ -cache-file=/dev/null ) # Handled here to avoid the test to skip args below. baseargs="$baseargs '$ac_arg'" + tbaseargs="$tbaseargs '$ac_arg'" # Assert: $separate_arg should always be no. keep_next=$separate_arg ;; @@ -7368,6 +7450,21 @@ do skip_next=$separate_arg continue ;; + --enable-target-* | \ + --disable-target-* | \ + --with-target-* | \ + --without-target-*) + # A target option. Add it, but edit out "-target" from the + # argument passed to configure the target library. + case $ac_arg in + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + baseargs="$baseargs '$ac_arg'" + ac_targ=`echo "$ac_arg" | sed 's,-target,,'` + tbaseargs="$tbaseargs '$ac_targ'" + keep_next=$separate_arg + ;; -*) # An option. Add it. case $ac_arg in @@ -7375,6 +7472,9 @@ do ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac baseargs="$baseargs '$ac_arg'" + if test X"$skip_targ" = Xno; then + tbaseargs="$tbaseargs '$ac_arg'" + fi keep_next=$separate_arg ;; *) @@ -7401,10 +7501,13 @@ EOF_SED gcc_transform_name=`cat conftestsed.out` rm -f conftestsed.out baseargs="$baseargs --program-transform-name='${gcc_transform_name}'" +tbaseargs="$tbaseargs --program-transform-name='${gcc_transform_name}'" if test "$silent" = yes; then baseargs="$baseargs --silent" + tbaseargs="$tbaseargs --silent" fi baseargs="$baseargs --disable-option-checking" +tbaseargs="$tbaseargs --disable-option-checking" # Record and document user additions to sub configure arguments. @@ -7430,7 +7533,7 @@ esac # This seems to be due to autoconf 2.5x stupidity. host_configargs="$host_configargs --cache-file=./config.cache ${extra_host_args} ${baseargs}" -target_configargs="$target_configargs ${baseargs}" +target_configargs="$target_configargs ${tbaseargs}" # Passing a --with-cross-host argument lets the target libraries know # whether they are being built with a cross-compiler or being built Index: config/cloog.m4 =================================================================== --- config/cloog.m4.orig 2011-01-16 10:29:55.054969196 -0200 +++ config/cloog.m4 2011-01-20 15:18:30.327003715 -0200 @@ -36,6 +36,10 @@ AC_DEFUN([CLOOG_INIT_FLAGS], [AS_HELP_STRING( [--with-cloog-lib=PATH], [Specify the directory for the installed CLooG library])]) + AC_ARG_WITH([target-cloog], + [AS_HELP_STRING( + [--with-target-cloog*], + [same as above, but for target rather than host])]) AC_ARG_ENABLE(cloog-backend, [AS_HELP_STRING( Index: gcc/doc/install.texi =================================================================== --- gcc/doc/install.texi.orig 2011-01-20 15:19:04.995458821 -0200 +++ gcc/doc/install.texi 2011-01-20 15:39:37.021558680 -0200 @@ -312,6 +312,13 @@ and @option{--with-gmp-include}. Altern distribution is found in a subdirectory of your GCC sources named @file{gmp}, it will be built together with GCC@. +The Java run-time also requires GMP. If you are building a cross +compiler for Java, libgcj will require a build of GMP for the target. +If it is not in the target compiler's search path, the +@option{--with-target-gmp} configure option (or +@option{--with-target-gmp-include} and @option{--with-target-gmp-lib}) +tell libgcj where to find it. + @item MPFR Library version 2.4.2 (or later) Necessary to build GCC@. It can be downloaded from @@ -1597,6 +1604,33 @@ you can explicitly specify the directory shorthand assumptions are not correct, you can use the explicit include and lib options directly. +@item --with-target-gmp=@var{pathname} +@itemx --with-target-gmp-include=@var{pathname} +@itemx --with-target-gmp-lib=@var{pathname} +@itemx --with-target-mpfr=@var{pathname} +@itemx --with-target-mpfr-include=@var{pathname} +@itemx --with-target-mpfr-lib=@var{pathname} +@itemx --with-target-mpc=@var{pathname} +@itemx --with-target-mpc-include=@var{pathname} +@itemx --with-target-mpc-lib=@var{pathname} +@itemx --with-target-ppl=@var{pathname} +@itemx --with-target-ppl-include=@var{pathname} +@itemx --with-target-ppl-lib=@var{pathname} +@itemx --with-target-cloog=@var{pathname} +@itemx --with-target-cloog-include=@var{pathname} +@itemx --with-target-cloog-lib=@var{pathname} +The @option{--with-target-*} options are target variants of the +corresponding @option{--with-*} host options. They are transformed to +@option{--with-*} when configuring target libraries, overriding the +options for the host. When building a native compiler, the host options +are passed on to target libraries as well, unless overridden, but when +building a cross compiler, the host options are excluded from the target +library configuration. For example, @samp{libjava} requires GMP: if you +have it where the compiler wouldn't find by itself, a single +@option{--with-gmp} flag will do for both host and target, but if you +want to or have to use a different GMP with the target libraries (say, +it's a cross compiler you're building), use @option{--with-target-gmp}. + @item --with-host-libstdcxx=@var{linker-args} If you are linking with a static copy of PPL, you can use this option to specify how the linker should find the standard C++ library used