Author: PiJoules
Date: 2024-07-25T14:42:46-07:00
New Revision: 38f2f9527249894a6a77c22abe8f39d6369d7ced

URL: 
https://github.com/llvm/llvm-project/commit/38f2f9527249894a6a77c22abe8f39d6369d7ced
DIFF: 
https://github.com/llvm/llvm-project/commit/38f2f9527249894a6a77c22abe8f39d6369d7ced.diff

LOG: [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.

Added: 
    

Modified: 
    clang/cmake/caches/Fuchsia-stage2.cmake

Removed: 
    


################################################################################
diff  --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index 8e0835cb3158f..75ceb799352f9 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -309,7 +309,7 @@ foreach(target 
armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
   foreach(lang C;CXX;ASM)
     set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} 
-mthumb")
     if(${target} STREQUAL "armv8m.main-unknown-eabi")
-      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 "")
+      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 "")
     endif()
     set(BUILTINS_${target}_CMAKE_${lang}_FLAGS 
"${BUILTINS_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
   endforeach()
@@ -327,7 +327,11 @@ foreach(target 
armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
   foreach(lang C;CXX;ASM)
     # TODO: The preprocessor defines workaround various issues in libc and 
libc++ integration.
     # These should be addressed and removed over time.
-    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 "")
+    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")
+    if(${target} STREQUAL "armv8m.main-unknown-eabi")
+      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 "")
+    endif()
+    set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS 
"${RUNTIMES_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
   endforeach()
   foreach(type SHARED;MODULE;EXE)
     set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to