Open Quuxplusone opened 9 years ago
And:
$ clang++ -xc -c /dev/null -Wa,--version -o/dev/null 2>&1
clang: error: unsupported argument '--version' to option 'Wa,'
We are tracking this with "Need extensible way to handle Clang Integrated Assembler/LLVM Issues 18916 and 24200", https://github.com/weidai11/cryptopp/issues/11.
I was just testing similar Clang behavior with the preprocessor via the -Wp
options. They look to be OK:
$ clang++ -E -Wp,-version - </dev/null LLVM (http://llvm.org/): LLVM version 3.4svn Optimized build. Default target: x86_64-apple-darwin12.6.0 Host CPU: corei7-avx
$ /usr/local/bin/clang++ -E -Wp,-version - </dev/null LLVM (http://llvm.org/): LLVM version 3.6.0 Optimized build with assertions. Built Apr 2 2015 (01:25:22). Default target: x86_64-apple-darwin12.6.0 Host CPU: corei7-avx
We have a GNU makefile that mostly configures itself on the fly. The makefile has tests like:
GAS219_OR_LATER := $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -i -c "GNU assembler version (2.19|2.[2-9]|[3-9])")
Later, if
GAS219_OR_LATER
is defined, then code paths that utilize SSE, SSE2, SSE3, double-quad word multiply, AES-NI, etc are utilized.However, clang does not return a version in response to the query. Rather, it just errors out:
This is how the assembler is supposed to react (give or take) when running it through the GCC compiler driver:
Determining the assembler and its version is critical to us due to issues like https://llvm.org/bugs/show_bug.cgi?id=18916.
Please consume
-Wa,-v
, and please return a string to identify the integrated assembler.