[Lldb-commits] [PATCH] Improve test for g++ 4.6
Chaoren Lin
chaorenl at google.com
Fri May 29 07:46:46 PDT 2015
> $(shell $(CXX) g++ -dumpversion | cut -b 1-3)
Do you mean
> $(shell $(CXX) -dumpversion | cut -b 1-3)
?
On May 29, 2015 07:40, "Ed Maste" <emaste at freebsd.org> wrote:
> Hi labath, chaoren,
>
> Skip the g++ 4.6 test if we're not going to build any C++ source. If a
> test has C++ source files we automatically determine which C++ compiler to
> use based on $CC (for example, clang++ if CC=clang). However, this is not
> done for tests without C++ source and CXX will be GNU make's default of
> g++. This produces suprious "g++: not found" errors in testrun output on
> systems without a gcc/g++.
>
> http://reviews.llvm.org/D10122
>
> Files:
> test/make/Makefile.rules
>
> Index: test/make/Makefile.rules
> ===================================================================
> --- test/make/Makefile.rules
> +++ test/make/Makefile.rules
> @@ -342,14 +342,16 @@
> #----------------------------------------------------------------------
> # Check if we are compiling with gcc 4.6
> #----------------------------------------------------------------------
> +ifneq "$(strip $(CXX_SOURCES) $(OBJCXX_SOURCES))" ""
> ifneq (,$(filter g++,$(CXX)))
> - CXXVERSION = $(shell g++ -dumpversion | cut -b 1-3)
> + CXXVERSION = $(shell $(CXX) g++ -dumpversion | cut -b 1-3)
> ifeq "$(CXXVERSION)" "4.6"
> # GCC 4.6 cannot handle -std=c++11, so replace it with
> -std=c++0x
> # instead. FIXME: remove once GCC version is upgraded.
> override CXXFLAGS := $(subst
> -std=c++11,-std=c++0x,$(CXXFLAGS))
> endif
> endif
> +endif
>
> #----------------------------------------------------------------------
> # DYLIB_ONLY variable can be used to skip the building of a.out.
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150529/b9dd1355/attachment.html>
More information about the lldb-commits
mailing list