Use CMake variables instead of as
@@ -107,7 +107,13 @@ endif ()
if (POWER)
set(NO_WARMUP 1)
- execute_process(COMMAND bash -c "as -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null" RESULT_VARIABLE HAVE_GAS)
+ set(HAVE_GAS 1)
+ if (CMAKE_ASM_COMPILER_ID STREQUAL "GNU")
+ set(HAVE_GAS 0)
+ elseif (CMAKE_ASM_COMPILER_ID STREQUAL "Clang")
+ set(CCOMMON_OPT "${CCOMMON_OPT} -fno-integrated-as")
+ set(HAVE_GAS 0)
+ endif ()
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DHAVE_GAS=${HAVE_GAS}")
endif ()
