1

I have a GNU Makefile that performs the following:

GAS210_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")

Later, defines are set up based on GAS210_OR_LATER. I noticed some defines were wrong under Clang (Ubuntu 14.04 provides GAS 2.24), so I performed:

$ clang++ -xc -c /dev/null -Wa,-v -o/dev/null 2>&1
clang: error: unsupported argument '-v' to option 'Wa,'

This option appears to be fine when sent through the GCC compiler driver:

$ g++ -xc -c /dev/null -Wa,-v -o/dev/null 2>&1
GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.24

I'm trying to determine if a bug report should be filled against Clang. Should Clang attempt to interpret assembler options? Or am I missing something obvious (or not so obvious)?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
jww
  • 97,681
  • 90
  • 411
  • 885

1 Answers1

1

I'm trying to determine if a bug report should be filled against Clang. Should Clang attempt to interpret assembler options? Or am I missing something obvious (or not so obvious)?

Clang has an integrated assembler that can optionally be switched off. That explains why its attempting to interpret assembler options.

However, not responding to -Wa,-v appears to be a separate issue. For this issue, see LLVM Bug 24200 - With integrated assembler enabled, fail to fetch version string of assembler. It was filed in response to the -Wa,-v issue.

Related, also see How to switch off LLVM's integrated assembler? on Stack Overflow.

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885