tune distro mode
authorAndreas Beckmann <anbe@debian.org>
Fri, 19 Jan 2024 13:00:32 +0000 (14:00 +0100)
committerAndreas Beckmann <anbe@debian.org>
Fri, 19 Jan 2024 13:00:32 +0000 (14:00 +0100)
Forwarded: not-needed

Gbp-Pq: Name distro.patch

CMakeLists.txt

index 45b92446d1ef4b2478704498dd93fe315bc2a2b0..0126ddf0af42fc66a764368252afba9f5c56bbff 100644 (file)
@@ -1390,6 +1390,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()
@@ -1403,6 +1406,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()