tune distro mode
authorAndreas Beckmann <anbe@debian.org>
Tue, 13 Dec 2022 03:08:31 +0000 (03:08 +0000)
committerAndreas Beckmann <anbe@debian.org>
Tue, 13 Dec 2022 03:08:31 +0000 (03:08 +0000)
Forwarded: not-needed

Gbp-Pq: Name distro.patch

CMakeLists.txt
lib/kernel/host/CMakeLists.txt

index 727b3585579005c5e6efadc3edd4c7d222bef929..66711fdf07a9d8957a51954e0942ec0929bbbd6b 100644 (file)
@@ -1202,6 +1202,9 @@ endif()
 
 set(KERNELLIB_HOST_DISTRO_VARIANTS 0)
 if(KERNELLIB_HOST_CPU_VARIANTS STREQUAL "distro")
+  if("${LLC_HOST_CPU}" STREQUAL "GENERIC")
+    set(HOST_CPU_FORCED 0 CACHE INTERNAL "CPU is forced by user")
+  endif()
   if(HOST_CPU_FORCED)
     message(FATAL_ERROR "Cannot build with CPU autodetection distro variants build, and enforce LLC_HOST_CPU at the same time. Please pick one")
   endif()
@@ -1214,6 +1217,9 @@ if(KERNELLIB_HOST_CPU_VARIANTS STREQUAL "distro")
   else()
     message(FATAL_ERROR "Don't know what CPU variants to use for kernel library on this platform.")
   endif()
+  if("${LLC_HOST_CPU}" STREQUAL "GENERIC")
+    list(INSERT KERNELLIB_HOST_CPU_VARIANTS 0 ${LLC_HOST_CPU})
+  endif()
   set(KERNELLIB_HOST_DISTRO_VARIANTS 1)
 endif()
 
index 2caaa7cc7f98053a071fa0c2848418c4f709e3d6..c657400f18a66009b2cc335510c9602d8c680bba 100644 (file)
@@ -323,8 +323,8 @@ separate_arguments(DEVICE_C_FLAGS)
 function(x86_distro_variant_to_flags VARIANT OUT_LLC_FLAGS OUT_CLANG_FLAGS)
 
   if("${VARIANT}" STREQUAL "sse2")
-    set(CLANG_F "${CLANG_MARCH_FLAG}athlon64")
-    set(LLC_F "-mcpu=athlon64")
+    set(CLANG_F "${CLANG_MARCH_FLAG}x86-64")
+    set(LLC_F "-mcpu=x86-64")
 
   elseif("${VARIANT}" STREQUAL "ssse3")
     set(CLANG_F "${CLANG_MARCH_FLAG}core2")