Skip to content

Commit 38f2f95

Browse files
authored
[Fuchsia] Apply armv8m flags for runtimes (#100656)
These are needed for cortex-m33. Ideally in the future we'd have separate multilibs for different ABI configs and we wouldn't need to explicitly set cortex-m33 manually. The driver should handle it.
1 parent 5b4e5f8 commit 38f2f95

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
309309
foreach(lang C;CXX;ASM)
310310
set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb")
311311
if(${target} STREQUAL "armv8m.main-unknown-eabi")
312-
set(BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=hard -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
312+
set(BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
313313
endif()
314314
set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "${BUILTINS_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
315315
endforeach()
@@ -327,7 +327,11 @@ foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
327327
foreach(lang C;CXX;ASM)
328328
# TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
329329
# These should be addressed and removed over time.
330-
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1" CACHE STRING "")
330+
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \"-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \"-Dfprintf(stream, format, ...)=printf(format)\" \"-Dtimeval=struct timeval{int tv_sec; int tv_usec;}\" \"-Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1")
331+
if(${target} STREQUAL "armv8m.main-unknown-eabi")
332+
set(RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
333+
endif()
334+
set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "${RUNTIMES_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
331335
endforeach()
332336
foreach(type SHARED;MODULE;EXE)
333337
set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")

0 commit comments

Comments
 (0)