public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
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
Date: Sun, 07 Sep 2003 17:33:00 -0000	[thread overview]
Message-ID: <20030907173303.GA26245@nevyn.them.org> (raw)
In-Reply-To: <m3n0dhtf3m.fsf@gossamer.airs.com>

On Sat, Sep 06, 2003 at 09:08:45PM -0700, Ian Lance Taylor wrote:
> Daniel Jacobowitz <drow@mvista.com> 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
<target>-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  <drow@mvista.com>

	* 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,

  reply	other threads:[~2003-09-07 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-03  4:10 Daniel Jacobowitz
2003-09-03  4:41 ` Ian Lance Taylor
2003-09-03 14:49   ` Daniel Jacobowitz
2003-09-03 15:31     ` DJ Delorie
2003-09-03 16:13       ` Ian Lance Taylor
2003-09-03 16:56         ` Daniel Jacobowitz
2003-09-04  5:40           ` Alexandre Oliva
2003-09-07  3:59             ` Daniel Jacobowitz
2003-09-07  4:08               ` Ian Lance Taylor
2003-09-07 17:33                 ` Daniel Jacobowitz [this message]
2003-09-03 16:12     ` Ian Lance Taylor
2003-09-04  5:37 ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030907173303.GA26245@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).