From ed2eaa9f6e74a146aa686c4fabb7de227abf99b5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 22 Nov 2009 04:25:56 +0000 Subject: 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 --- gcc/ChangeLog | 6 ++++++ gcc/Makefile.in | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'gcc') 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 + + * 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 * 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. -- cgit v1.1