Makefile.in (stamp-as, [...]): Remove.

2007-04-12  Paolo Bonzini  <bonzini@gnu.org>
            Charles Wilson  <libtool@cwilson.fastmail.fm>

	* Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove.
	(libgcc.mvars): Don't depend on them.
	* configure.ac (as, collect-ld, nm): Create from exec-tool.in.
	* exec-tool.in: New.


Co-Authored-By: Charles Wilson <libtool@cwilson.fastmail.fm>

From-SVN: r123775
This commit is contained in:
Paolo Bonzini 2007-04-13 07:04:39 +00:00 committed by Paolo Bonzini
parent 41a14c0644
commit be0fe523e7
5 changed files with 111 additions and 55 deletions

View File

@ -1,3 +1,11 @@
2007-04-12 Paolo Bonzini <bonzini@gnu.org>
Charles Wilson <libtool@cwilson.fastmail.fm>
* Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove.
(libgcc.mvars): Don't depend on them.
* configure.ac (as, collect-ld, nm): Create from exec-tool.in.
* exec-tool.in: New.
2007-04-12 Brooks Moses <brooks.moses@codesourcery.com>
* doc/invoke.text (--help): Document --help=common.

View File

@ -1466,60 +1466,6 @@ cpp$(exeext): $(GCC_OBJS) cppspec.o version.o intl.o prefix.o \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCC_OBJS) cppspec.o \
intl.o prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
# Create links to binutils, especially for in-tree builds, to make -B.
# use them. We need hard links so that directories can be shuffled
# during toplevel bootstrap.
# Go through an additional indirection, because the file we create
# can be either `sometool' (if it is a script) or `sometool$(exeext)'
# (if it is a hard link).
stamp-as: $(ORIGINAL_AS_FOR_TARGET)
@echo creating as; \
case "$(ORIGINAL_AS_FOR_TARGET)" in \
./as) ;; \
../*) \
rm -f as$(exeext); \
echo $(LN) $< as$(exeext); \
$(LN) $< as$(exeext) || cp $< as$(exeext) ;; \
*) \
rm -f as; \
echo '#!$(SHELL)' > as; \
echo 'exec $(ORIGINAL_AS_FOR_TARGET) "$$@"' >> as ; \
chmod +x as ;; \
esac
echo timestamp > $@
stamp-collect-ld: $(ORIGINAL_LD_FOR_TARGET)
@echo creating collect-ld; \
case "$(ORIGINAL_LD_FOR_TARGET)" in \
./collect-ld) ;; \
../*) \
rm -f collect-ld$(exeext); \
echo $(LN) $< collect-ld$(exeext); \
$(LN) $< collect-ld$(exeext) || cp $< collect-ld$(exeext) ;; \
*) \
rm -f collect-ld$(exeext); \
echo '#!$(SHELL)' > collect-ld; \
echo 'exec $(ORIGINAL_LD_FOR_TARGET) "$$@"' >> collect-ld ; \
chmod +x collect-ld ;; \
esac
echo timestamp > $@
stamp-nm: $(ORIGINAL_NM_FOR_TARGET)
@echo creating nm; \
case "$(ORIGINAL_NM_FOR_TARGET)" in \
./nm) ;; \
../*) \
rm -f nm$(exeext); \
echo $(LN) $< nm$(exeext); \
$(LN) $< nm$(exeext) || cp $< nm$(exeext) ;; \
*) \
rm -f nm$(exeext); \
echo '#!$(SHELL)' > nm; \
echo 'exec $(ORIGINAL_NM_FOR_TARGET) "$$@"' >> nm ; \
chmod +x nm ;; \
esac
echo timestamp > $@
# Dump a specs file to make -B./ read these specs over installed ones.
$(SPECS): xgcc$(exeext)
$(GCC_FOR_TARGET) -dumpspecs > tmp-specs
@ -1567,7 +1513,7 @@ libgcc-support: libgcc.mvars stmp-int-hdrs $(STMP_FIXPROTO) $(TCONFIG_H) \
$(LIB2ADD_ST) $(LIB2ADDEH) $(srcdir)/emutls.c gcov-iov.h $(SFP_MACHINE)
libgcc.mvars: config.status Makefile $(LIB2ADD) $(LIB2ADD_ST) specs \
xgcc$(exeext) stamp-as stamp-collect-ld stamp-nm
xgcc$(exeext)
: > tmp-libgcc.mvars
echo LIB1ASMFUNCS = '$(LIB1ASMFUNCS)' >> tmp-libgcc.mvars
echo LIB1ASMSRC = '$(LIB1ASMSRC)' >> tmp-libgcc.mvars

25
gcc/configure vendored
View File

@ -13349,6 +13349,11 @@ fi
ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
case "$ORIGINAL_AS_FOR_TARGET" in
./as | ./as$build_exeext) ;;
*) ac_config_files="$ac_config_files as:exec-tool.in"
;;
esac
echo "$as_me:$LINENO: checking what assembler to use" >&5
echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6
@ -13465,6 +13470,11 @@ fi
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
case "$ORIGINAL_LD_FOR_TARGET" in
./collect-ld | ./collect-ld$build_exeext) ;;
*) ac_config_files="$ac_config_files collect-ld:exec-tool.in"
;;
esac
echo "$as_me:$LINENO: checking what linker to use" >&5
echo $ECHO_N "checking what linker to use... $ECHO_C" >&6
@ -13569,6 +13579,12 @@ fi
ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
case "$ORIGINAL_NM_FOR_TARGET" in
./nm | ./nm$build_exeext) ;;
*) ac_config_files="$ac_config_files nm:exec-tool.in"
;;
esac
# Figure out what objdump we will be using.
if test "${gcc_cv_objdump+set}" = set; then
@ -17526,6 +17542,9 @@ for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;;
"collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;;
"nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;;
"$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;;
@ -18020,6 +18039,12 @@ s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
rm -f $tmp/out
fi
# Run the commands associated with the file.
case $ac_file in
as ) chmod +x as ;;
collect-ld ) chmod +x collect-ld ;;
nm ) chmod +x nm ;;
esac
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

View File

@ -1884,6 +1884,10 @@ fi])
ORIGINAL_AS_FOR_TARGET=$gcc_cv_as
AC_SUBST(ORIGINAL_AS_FOR_TARGET)
case "$ORIGINAL_AS_FOR_TARGET" in
./as | ./as$build_exeext) ;;
*) AC_CONFIG_FILES(as:exec-tool.in, [chmod +x as]) ;;
esac
AC_MSG_CHECKING(what assembler to use)
if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then
@ -1935,6 +1939,10 @@ fi])
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
AC_SUBST(ORIGINAL_LD_FOR_TARGET)
case "$ORIGINAL_LD_FOR_TARGET" in
./collect-ld | ./collect-ld$build_exeext) ;;
*) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;;
esac
AC_MSG_CHECKING(what linker to use)
if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then
@ -1992,6 +2000,11 @@ fi
ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm
AC_SUBST(ORIGINAL_NM_FOR_TARGET)
case "$ORIGINAL_NM_FOR_TARGET" in
./nm | ./nm$build_exeext) ;;
*) AC_CONFIG_FILES(nm:exec-tool.in, [chmod +x nm]) ;;
esac
# Figure out what objdump we will be using.
AS_VAR_SET_IF(gcc_cv_objdump,, [

64
gcc/exec-tool.in Normal file
View File

@ -0,0 +1,64 @@
#! /bin/sh
# Copyright (C) 2007 Free Software Foundation, Inc.
# This file is part of GCC.
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston MA 02110-1301, USA.
# Invoke as, ld or nm from the build tree.
ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"
exeext=@host_exeext@
invoked=`basename "$0"`
case "$invoked" in
as)
original=$ORIGINAL_AS_FOR_TARGET
prog=as-new$exeext
dir=gas
;;
collect-ld)
original=$ORIGINAL_LD_FOR_TARGET
prog=ld-new$exeext
dir=ld
;;
nm)
original=$ORIGINAL_NM_FOR_TARGET
prog=nm-new$exeext
dir=binutils
;;
esac
case "$original" in
../*)
# compute absolute path of the location of this script
tdir=`dirname "$0"`
scriptdir=`cd "$tdir" && pwd`
if test -x $scriptdir/../$dir/$prog; then
exec $scriptdir/../$dir/$prog ${1+"$@"}
else
exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
fi
;;
*)
exec "$original" ${1+"$@"}
;;
esac