Build: Use wrapper script for gas-preprocessor.pl

The previous hack (adding ${CMAKE_ASM_COMPILER} to CMAKE_ASM_FLAGS)
didn't work in all cases, because more recent versions of CMake place
the includes ahead of the flags (which meant that the real assembler
wasn't the first argument to gas-preprocessor.pl.)
This commit is contained in:
DRC
2016-11-25 18:50:11 -06:00
parent 97205269bc
commit 94686e3c0f
2 changed files with 3 additions and 3 deletions

View File

@@ -228,9 +228,8 @@ if(NOT RESULT EQUAL 0)
return()
else()
message(STATUS "Using gas-preprocessor.pl")
set(CMAKE_REAL_ASM_COMPILER ${CMAKE_ASM_COMPILER})
set(CMAKE_ASM_COMPILER gas-preprocessor.pl)
set(CMAKE_ASM_FLAGS "${CMAKE_REAL_ASM_COMPILER} ${CMAKE_ASM_FLAGS}")
configure_file(gas-preprocessor.in gas-preprocessor @ONLY)
set(CMAKE_ASM_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/gas-preprocessor)
endif()
else()
message(STATUS "GAS is working properly")

1
simd/gas-preprocessor.in Executable file
View File

@@ -0,0 +1 @@
gas-preprocessor.pl @CMAKE_ASM_COMPILER@ ${1+"$@"}