diff options
author | Ian Lance Taylor <iant@google.com> | 2009-11-22 04:25:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-11-22 04:25:56 +0000 |
commit | ed2eaa9f6e74a146aa686c4fabb7de227abf99b5 (patch) | |
tree | 3dadafd71165a50c78510cebe37e4dd81eda3a01 /gcc | |
parent | 44e795858656da385d7bc99b0f23138d08cccd3f (diff) | |
download | gcc-ed2eaa9f6e74a146aa686c4fabb7de227abf99b5.zip gcc-ed2eaa9f6e74a146aa686c4fabb7de227abf99b5.tar.gz gcc-ed2eaa9f6e74a146aa686c4fabb7de227abf99b5.tar.bz2 |
configure.ac: Change default of poststage1_ldflags to be empty if poststage1_libs is set.
./: * configure.ac: Change default of poststage1_ldflags to be empty if
poststage1_libs is set. When poststage1_libs is empty, and
ENABLE_BUILD_WITH_CXX is set, add -static-libgcc.
* configure: Rebuild.
gcc/:
* Makefile.in (HOST_LIBS): Move higher in file.
(LINKER, LINKER_FLAGS): If ENABLE_BUILD_WITH_CXX, but $(HOST_LIBS)
is not empty, set to $(CC) and $(CFLAGS).
From-SVN: r154422
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/Makefile.in | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e14b895..31dcdb6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-11-21 Ian Lance Taylor <iant@google.com> + + * Makefile.in (HOST_LIBS): Move higher in file. + (LINKER, LINKER_FLAGS): If ENABLE_BUILD_WITH_CXX, but $(HOST_LIBS) + is not empty, set to $(CC) and $(CFLAGS). + 2009-11-22 Martin Jambor <mjambor@suse.cz> * tree-cfg.c (verify_types_in_gimple_reference): Error out on diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 4e15309..c2b0643 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -206,6 +206,9 @@ NM = @NM@ RANLIB = @RANLIB@ RANLIB_FLAGS = @ranlib_flags@ +# Libraries to use on the host. +HOST_LIBS = @HOST_LIBS@ + # The name of the compiler to use. ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@ ifneq ($(ENABLE_BUILD_WITH_CXX),yes) @@ -216,8 +219,17 @@ LINKER_FLAGS = $(CFLAGS) else COMPILER = $(CXX) COMPILER_FLAGS = $(CXXFLAGS) +# If HOST_LIBS is set, then the user is controlling the libraries to +# link against. In that case, link with $(CC) so that the -lstdc++ +# library is not introduced. If HOST_LIBS is not set, link with +# $(CXX) to pick up -lstdc++. +ifeq ($(HOST_LIBS),) LINKER = $(CXX) LINKER_FLAGS = $(CXXFLAGS) +else +LINKER = $(CC) +LINKER_FLAGS = $(CFLAGS) +endif endif # ------------------------------------------- @@ -288,9 +300,6 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \ # In stage2 and beyond, we force this to "-o $@" since we know we're using gcc. OUTPUT_OPTION = @OUTPUT_OPTION@ -# Libraries to use on the host. -HOST_LIBS = @HOST_LIBS@ - # This is where we get zlib from. zlibdir is -L../zlib and zlibinc is # -I../zlib, unless we were configured with --with-system-zlib, in which # case both are empty. |