re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared)

2008-04-02  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35752
	* Makefile.in (objdir): Set it here.
	* configure.ac: Not here.  Find dynamic linker characteristics.
	* exec-tool.in: Use them.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r133832
This commit is contained in:
Paolo Bonzini 2008-04-02 10:07:58 +00:00 committed by Paolo Bonzini
parent bf1e48d172
commit da0f638158
6 changed files with 6049 additions and 26 deletions

View File

@ -1,3 +1,12 @@
2008-04-02 Paolo Bonzini <bonzini@gnu.org>
PR bootstrap/35752
* Makefile.in (objdir): Set it here.
* configure.ac: Not here. Find dynamic linker characteristics.
* exec-tool.in: Use them.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2008-04-02 Paolo Bonzini <bonzini@gnu.org>
* expr.c (expand_var): Delete it.

View File

@ -79,9 +79,8 @@ abs_docdir = @abs_srcdir@/doc
# Top build directory for this package, relative to here.
top_builddir = .
# objdir is set by configure.
# It's normally the absolute path to the current directory.
objdir = @objdir@
# The absolute path to the current directory.
objdir := $(shell pwd)
host_subdir=@host_subdir@
build_subdir=@build_subdir@
@ -122,9 +121,6 @@ vpath %.texi $(gcc_docdir)/include
# For ada/Make-lang.in; overridden in, for example, config/pa/x-ada.
X_ADA_CFLAGS =
T_ADA_CFLAGS =
X_ADAFLAGS =
T_ADAFLAGS =
# --------
# UNSORTED
@ -142,9 +138,7 @@ LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
# Various ways of specifying flags for compilations:
# CFLAGS is for the user to override to, e.g., do a cross build with -O2.
# XCFLAGS is used for most compilations but not when using the GCC just built.
# TCFLAGS is used for compilations with the GCC just built.
XCFLAGS =
TCFLAGS =
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
@ -202,12 +196,8 @@ WARN_CFLAGS = @warn_cflags@
CPPFLAGS = @CPPFLAGS@
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
T_CFLAGS =
X_CPPFLAGS =
T_CPPFLAGS =
AWK = @AWK@
CC = @CC@
BISON = @BISON@
@ -318,9 +308,9 @@ UNWIND_H = $(srcdir)/unwind-generic.h
GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It specifies -B./.
# It also specifies -isystem ./include to find, e.g., stddef.h.
GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
GCC_CFLAGS=$(CFLAGS_FOR_TARGET) $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_WARN) -Wold-style-definition $($@-warn) -isystem ./include $(TCFLAGS)
# ---------------------------------------------------
# Programs which produce files for the target machine
@ -856,13 +846,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
# This is the variable actually used when we compile. If you change this,
# you probably want to update BUILD_CFLAGS in configure.ac
ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
ALL_CFLAGS = $(T_CFLAGS) \
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
# Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro
# puts -I options in CPPFLAGS, our include files in the srcdir will always
# win against random include files in /usr/include.
ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
# Build and host support libraries.
LIBIBERTY = ../libiberty/libiberty.a
@ -938,6 +928,7 @@ export libsubdir
export slibdir
FLAGS_TO_PASS = \
"ADA_CFLAGS=$(ADA_CFLAGS)" \
"BISON=$(BISON)" \
"BISONFLAGS=$(BISONFLAGS)" \
"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \

4
gcc/aclocal.m4 vendored
View File

@ -103,4 +103,8 @@ m4_include([../config/lib-link.m4])
m4_include([../config/lib-prefix.m4])
m4_include([../config/progtest.m4])
m4_include([../config/warnings.m4])
m4_include([../libtool.m4])
m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
m4_include([../ltversion.m4])
m4_include([acinclude.m4])

5999
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1814,6 +1814,21 @@ esac
# Assembler & linker features
# ---------------------------
# During stage 2, ld is actually gcc/collect-ld, which is a small script to
# discern between when to use prev-ld/ld-new and when to use ld/ld-new.
# However when ld-new is first executed from the build tree, libtool will
# relink it as .libs/lt-ld-new, so that it can give it an RPATH that refers
# to the build tree. While doing this we need to use the previous-stage
# linker, or we have an infinite loop. The presence of a shell script as
# ld/ld-new, and the fact that the script *uses ld itself*, is what confuses
# the gcc/collect-ld script. So we need to know how libtool works, or
# exec-tool will fail.
m4_defun([_LT_CONFIG_COMMANDS], [])
AC_PROG_LIBTOOL
AC_SUBST(objdir)
AC_SUBST(enable_fast_install)
# Identify the assembler which will work hand-in-glove with the newly
# built GCC, so that we can examine its features. This is the assembler
# which will be driven by the driver program.
@ -3690,9 +3705,6 @@ else
fi)
AC_SUBST(slibdir)
objdir=`${PWDCMD-pwd}`
AC_SUBST(objdir)
AC_ARG_WITH(datarootdir,
[ --with-datarootdir=DIR Use DIR as the data root [[PREFIX/share]]],
datarootdir="\${prefix}/$with_datarootdir",

View File

@ -23,6 +23,8 @@ 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@
fast_install=@enable_fast_install@
objdir=@objdir@
invoked=`basename "$0"`
case "$invoked" in
@ -50,7 +52,23 @@ case "$original" in
scriptdir=`cd "$tdir" && pwd`
if test -x $scriptdir/../$dir/$prog; then
exec $scriptdir/../$dir/$prog ${1+"$@"}
test "$fast_install" = yes || exec $scriptdir/../$dir/$prog ${1+"$@"}
# if libtool did everything it needs to do, there's a fast path
lt_prog=$scriptdir/../$dir/$objdir/lt-$prog
test -x $lt_prog && exec $lt_prog ${1+"$@"}
# libtool has not relinked ld-new yet, but we cannot just use the
# previous stage (because then the relinking would just never happen!).
# So we take extra care to use prev-ld/ld-new *on recursive calls*.
test -f $lt_prog-recursive && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
touch $lt_prog-recursive
$scriptdir/../$dir/$prog ${1+"$@"}
result=$?
rm -f $lt_prog-recursive
exit $result
else
exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
fi