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++.
|346 ↗||(On Diff #26781)|
I think we should use findstring instead of filter here, since filter can only match g++ exactly and ignore things like special-custom-g++ and /path/to/g++. Also, it's a little weird to have 2 ways of comparing empty strings, I think we should standardize on ifneq "string 1" "string 2".
I support that idea, but we should probably consult Greg as well.
I've added Greg, but I don't think it will be a concern. This bit originated with the Intel developers when they were working on LLDB/Linux. At this point I think your team would have the best handle on whether GCC 4.6 is a relevant compiler in the Linux ecosystem. On both OS X and FreeBSD Clang has been the primary compiler for some time.
Perhaps a more general solution of checking whether c++11 is supported? Like try invoking $(CC) with -std=c++11, if it fails we use -std=c__0x instead. We don't have to tie it to a specific gcc version.
On 29 May 2015 at 13:54, Vince Harron <email@example.com> wrote:
Debugging apps built with gcc 4.6 might be important to someone. No reason
to pull it out if it's not hurting.
Perhaps we can just expect the user to set CXXFLAGS=-std=c++0x?
Anyway, I'm happy enough to commit the previous version of the patch instead (adding ifneq "$(strip $(CXX_SOURCES) $(OBJCXX_SOURCES))" "")