File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -850,9 +850,12 @@ else ()
850850 if (CAN_TARGET_${arch} )
851851 cmake_push_check_state()
852852 # TODO: we should probably make most of the checks in builtin-config depend on the target flags.
853- message (STATUS "Performing additional configure checks with target flags: ${TARGET_${arch} _CFLAGS}" )
854853 set (BUILTIN_CFLAGS_${arch} ${BUILTIN_CFLAGS} )
855- list (APPEND CMAKE_REQUIRED_FLAGS ${TARGET_${arch} _CFLAGS} ${BUILTIN_CFLAGS_${arch} })
854+ # CMAKE_REQUIRED_FLAGS must be a space separated string but unlike TARGET_${arch}_CFLAGS,
855+ # BUILTIN_CFLAGS_${arch} is a CMake list, so we have to join it to create a valid command line.
856+ list (JOIN BUILTIN_CFLAGS " " CMAKE_REQUIRED_FLAGS)
857+ set (CMAKE_REQUIRED_FLAGS "${TARGET_${arch} _CFLAGS} ${BUILTIN_CFLAGS_${arch} }" )
858+ message (STATUS "Performing additional configure checks with target flags: ${CMAKE_REQUIRED_FLAGS} " )
856859 # For ARM archs, exclude any VFP builtins if VFP is not supported
857860 if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$" )
858861 string (REPLACE ";" " " _TARGET_${arch} _CFLAGS "${TARGET_${arch} _CFLAGS}" )
You can’t perform that action at this time.
0 commit comments