Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
To: Charles Wilson <cwilson@fastmail.fm>
Cc: Charles Wilson <libtool@cwilson.fastmail.fm>,
	  Steve Ellcey <sje@cup.hp.com>,
	  dave.korn@artimi.com,  binutils@sourceware.org,
	  gcc-patches@gcc.gnu.org,  gdb-patches@gcc.gnu.org,
	  newlib@sourceware.org,  Ralf.Wildenhues@gmx.de,
	 aoliva@redhat.com,   fxcoudert@gmail.com,  schwab@suse.de
Subject: Re: Final(?) patch to update libtool in GCC and src trees
Date: Thu, 12 Apr 2007 07:03:00 -0000	[thread overview]
Message-ID: <461DD98E.50901@lu.unisi.ch> (raw)
In-Reply-To: <461DD341.2010000@fastmail.fm>


> It's a little unorthodox (and assumes a lot about libtool's 
> implementation) but we COULD:
> 
> (1) hardlink/copy ${ORIGINAL_AS_FOR_TARGET--without-$exeext} .
> (2) hardlink/copy ${ORIGINAL_AS_FOR_TARGET--with_$exeext} .
> (3) mkdir .libs
> (4) hardlink/copy ${ORIGINAL_AS_FOR_TARGET--with-/.libs/-inserted} .libs/

Another possibility (and I would be grateful if you would test this) is 
to confine all this stuff into a script, something like this (I'll call 
it exec-tool.in):

#! /bin/sh

ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"

invoked=`basename "$0"`
case "$invoked" in
   as)
     original=$ORIGINAL_AS_FOR_TARGET
     prog=as-new
     dir=gas
     ;;
   collect-ld)
     original=$ORIGINAL_LD_FOR_TARGET
     prog=ld-new
     dir=ld
     ;;
   nm)
     original=$ORIGINAL_NM_FOR_TARGET
     prog=nm-new
     dir=binutils
     ;;
esac

case "$original" in
   ../*)
     if test -x ../$dir/$prog; then
       exec ../$dir/$prog ${1+"$@"}
     else
       exec ../prev-$dir/$prog ${1+"$@"}
     fi
     ;;
   *)
     exec "$original" ${1+"$@"}
     ;;
esac



Then, you *can* use symlinks.  So in configure.ac you can simply do

AC_CONFIG_FILES(exec-tool.sh:exec-tool.in, [chmod +x exec-tool.sh])
case "$ORIGINAL_AS_FOR_TARGET" in
   ./as) ;;
   *) AC_CONFIG_LINKS(as:exec-tool.sh) ;;
esac
case "$ORIGINAL_LD_FOR_TARGET" in
   ./collect-ld) ;;
   *) AC_CONFIG_LINKS(collect-ld:exec-tool.sh) ;;
esac
case "$ORIGINAL_NM_FOR_TARGET" in
   ./nm) ;;
   *) AC_CONFIG_LINKS(nm:exec-tool.sh) ;;
esac

and drop all the as/collect-ld/nm rules from Makefile.in.

Paolo


  reply	other threads:[~2007-04-12  7:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 18:25 Steve Ellcey
2007-04-10 18:42 ` Andrew Pinski
2007-04-10 20:04   ` Steve Ellcey
2007-04-10 20:02 ` Dave Korn
2007-04-10 20:07   ` Steve Ellcey
2007-04-10 20:58     ` Dave Korn
2007-04-11  1:13     ` Dave Korn
2007-04-11  7:36       ` Paolo Bonzini
2007-04-11  8:47         ` Andreas Schwab
2007-04-11  8:51           ` Paolo Bonzini
2007-04-11  8:57             ` Ralf Wildenhues
2007-04-11  8:59               ` Paolo Bonzini
2007-04-11  9:23                 ` Dave Korn
2007-04-11  9:25                   ` Paolo Bonzini
2007-04-11 10:00                     ` Dave Korn
2007-04-11 10:19                       ` Paolo Bonzini
2007-04-11 21:41                         ` Christopher Faylor
2007-04-12 10:42                           ` Dave Korn
2007-04-11  2:38     ` Charles Wilson
2007-04-12  6:36       ` Charles Wilson
2007-04-12  7:03         ` Paolo Bonzini [this message]
2007-04-12 15:13         ` Steve Ellcey
2007-04-12 18:02           ` Charles Wilson
2007-04-13  7:18 ` Paolo Bonzini
2007-04-13 17:27   ` Steve Ellcey
2007-04-13 18:05     ` Daniel Jacobowitz
2007-04-13 18:18       ` Paolo Bonzini
2007-04-13 18:27         ` Steve Ellcey
2007-04-13 18:38           ` Paolo Bonzini
2007-04-13 18:44             ` Steve Ellcey
2007-04-13 20:19           ` Charles Wilson
2007-04-13 18:24     ` Paolo Bonzini

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=461DD98E.50901@lu.unisi.ch \
    --to=paolo.bonzini@lu.unisi.ch \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=aoliva@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=bonzini@gnu.org \
    --cc=cwilson@fastmail.fm \
    --cc=dave.korn@artimi.com \
    --cc=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@gcc.gnu.org \
    --cc=libtool@cwilson.fastmail.fm \
    --cc=newlib@sourceware.org \
    --cc=schwab@suse.de \
    --cc=sje@cup.hp.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