From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17031 invoked by alias); 7 Sep 2003 17:33:05 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17002 invoked from network); 7 Sep 2003 17:33:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 7 Sep 2003 17:33:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 19w3PL-000532-Ug; Sun, 07 Sep 2003 13:33:03 -0400 Date: Sun, 07 Sep 2003 17:33:00 -0000 From: Daniel Jacobowitz To: binutils@sources.redhat.com, gcc@gcc.gnu.org, gdb@sources.redhat.com Cc: aoliva@redhat.com, dj@redhat.com Subject: Re: [toplevel] Gas install name problem from autoconf 2.5x Message-ID: <20030907173303.GA26245@nevyn.them.org> Mail-Followup-To: binutils@sources.redhat.com, gcc@gcc.gnu.org, gdb@sources.redhat.com, aoliva@redhat.com, dj@redhat.com References: <20030903041031.GA29143@nevyn.them.org> <20030903144928.GA7255@nevyn.them.org> <200309031531.h83FV7w03522@greed.delorie.com> <20030903165610.GA25603@nevyn.them.org> <20030907035909.GA10111@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00096.txt.bz2 On Sat, Sep 06, 2003 at 09:08:45PM -0700, Ian Lance Taylor wrote: > Daniel Jacobowitz writes: > > > I would like to explicitly pass --program-transform-name from the > > toplevel to subdirectories, when configure implicitly generates it. > > How does that sound? > > While that would fix one problem, I suspect there will be other > problems. > > The new autoconf simply behaves differently with respect to command > line options. I suspect that trying to finesse this behaviour will > lead to trouble. Better to adjust the command line options depending > on the version of autoconf used in the subdirectory, or convert all > the configure scripts at once. Converting all the configure scripts at once isn't going to happen. And adjusting the command lines isn't going to solve the problem, either. Consider that a lot of people are used to explicitly specifying --host/--build/--target. They'll now get gas installed as -gas and gcc installed as gcc. Plus, you can't even use the new-style arguments to configure, because the top level hasn't been converted; you must still give it the old-style arguments or it'll draw the wrong conclusions. Oh, and I just noticed: ./configure i686-linux will now produce i686-linux-gas and gcc too. Nothing we can do about that unless we want to manufacture appropriate arguments from whole cloth for each configure type. The only other difference besides this one and the cross-compilation mode one that I've been able to find is: 2.13: if test $host != $build; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi 2.57: test -n "$host_alias" && ac_tool_prefix=$host_alias- But in both cases it will fall back to unprefixed versions if those aren't found, so I don't expect this to be a big problem. And I do expect all configure scripts to be converted, at some point, before any new major releases from these repositories. Anyway, actions, words, all that. Here is a patch to compute program-transform-name in the top level and pass it down. This patch preserves the 2.13 behavior, because at the moment that's easier; then, in a few more months when the bulk of the affected directories have been converted, we can either remove it or update it to the 2.5x behavior. Just rebuilding the toplevel configure script with 2.5x will change the behavior for all subdirectories consistently, converted or not. Thoughts? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2003-09-07 Daniel Jacobowitz * configure.in: Pass a computed --program-transform-name to subconfigures. Index: configure.in =================================================================== RCS file: /big/fsf/rsync/src-cvs/src/configure.in,v retrieving revision 1.184 diff -u -p -r1.184 configure.in --- configure.in 4 Sep 2003 12:33:44 -0000 1.184 +++ configure.in 7 Sep 2003 17:28:14 -0000 @@ -1766,7 +1766,9 @@ AC_SUBST_FILE(serialization_dependencies # Base args. Strip norecursion, cache-file, srcdir, host, build, # target and nonopt. These are the ones we might not want to pass -# down to subconfigures. +# down to subconfigures. Also strip program-prefix, program-suffix, +# and program-transform-name, so that we can pass down a consistent +# program-transform-name. cat <<\EOF_SED > conftestsed s/ --no[[^ ]]* / / s/ --c[[a-z-]]*[[= ]][[^ ]]* / / @@ -1774,16 +1776,34 @@ s/ --sr[[a-z-]]*[[= ]][[^ ]]* / / s/ --ho[[a-z-]]*[[= ]][[^ ]]* / / s/ --bu[[a-z-]]*[[= ]][[^ ]]* / / s/ --t[[a-z-]]*[[= ]][[^ ]]* / / +s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]* / / s/ -cache-file[[= ]][[^ ]]* / / s/ -srcdir[[= ]][[^ ]]* / / s/ -host[[= ]][[^ ]]* / / s/ -build[[= ]][[^ ]]* / / s/ -target[[= ]][[^ ]]* / / +s/ -program-prefix[[= ]][[^ ]]* / / +s/ -program-suffix[[= ]][[^ ]]* / / +s/ -program-transform-name[[= ]][[^ ]]* / / s/ [[^' -][^ ]*] / / s/^ *//;s/ *$// s,\\,\\\\,g; s,\$,$$,g EOF_SED baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed` +rm -f conftestsed + +# Add in --program-transform-name, after --program-prefix and +# --program-suffix have been applied to it. +cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED +gcc_transform_name="${program_transform_name}" +# Autoconf expects s,x,x, as the default. If we want subdirectory configure +# scripts to obey this transformation, we need to modify it slightly. +if test "${gcc_transform_name}" = s,x,x,; then + gcc_transform_name=s,y,y, +fi +baseargs="$baseargs --program-transform-name=`echo ${gcc_transform_name} | sed -f conftestsed`" rm -f conftestsed # For the build-side libraries, we just need to pretend we're native,