diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-26 04:25:32 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-26 04:25:32 +0000 |
commit | 174d231ca3ffe1dfc6874f5ad53d56f225f0c75f (patch) | |
tree | 7ae1fd98cdefafcec0ad911e8281931b12b781c3 /Makefile.in | |
parent | a0b71069c18000351f635cabc7c881888a69ea5b (diff) | |
download | gcc-174d231ca3ffe1dfc6874f5ad53d56f225f0c75f.tar.gz |
PR other/46020
* configure.ac (CXX_FOR_TARGET): Add -funconfigured-libstdc++-v3.
* Makefile.def (CXX_FOR_TARGET): Removed from flags_to_pass.
* Makefile.tpl (CXX_FOR_TARGET_FLAG_TO_PASS): New.
(BASE_FLAGS_TO_PASS): Use it.
* configure: Rebuilt.
* Makefile.in: Rebuilt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167160 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index c3cf12194db..945fc5ddb8d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -640,6 +640,26 @@ HOST_LIB_PATH_libelf = \ @endif libelf +CXX_FOR_TARGET_FLAG_TO_PASS = \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" +@if target-libstdc++-v3 +# CXX_FOR_TARGET is tricky to get right for target libs that require a +# functional C++ compiler. When we recurse, if we expand +# CXX_FOR_TARGET before configuring libstdc++-v3, we won't get +# libstdc++ include flags from the script. Instead, we get an +# -funconfigured-* word, so that we'll get errors if this invalid C++ +# command line is used for anything, but also so that we can use the +# word to decide whether or not to pass on this CXX_FOR_TARGET. If we +# don't pass it on, sub-make will use the default definition, that +# re-expands it at the time of use, so we'll get it right when we need +# it. One potential exception is the expansion of CXX_FOR_TARGET +# passed down as part of CXX within TARGET_FLAGS, but this wouldn't +# really work, for C++ host programs can't depend on the current-stage +# C++ target library. +CXX_FOR_TARGET_FLAG_TO_PASS = \ + $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi) +@endif target-libstdc++-v3 + # Flags to pass down to all sub-makes. BASE_FLAGS_TO_PASS = \ "DESTDIR=$(DESTDIR)" \ @@ -707,7 +727,6 @@ BASE_FLAGS_TO_PASS = \ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ "CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \ - "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ "FLAGS_FOR_TARGET=$(FLAGS_FOR_TARGET)" \ @@ -747,6 +766,7 @@ BASE_FLAGS_TO_PASS = \ "STAGEfeedback_CFLAGS=$(STAGEfeedback_CFLAGS)" \ "STAGEfeedback_CXXFLAGS=$(STAGEfeedback_CXXFLAGS)" \ "STAGEfeedback_TFLAGS=$(STAGEfeedback_TFLAGS)" \ + $(CXX_FOR_TARGET_FLAG_TO_PASS) \ "TFLAGS=$(TFLAGS)" \ "CONFIG_SHELL=$(SHELL)" \ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" |