tune distro mode
authorAndreas Beckmann <anbe@debian.org>
Mon, 24 Jun 2024 09:29:13 +0000 (11:29 +0200)
committerAndreas Beckmann <anbe@debian.org>
Mon, 24 Jun 2024 09:29:13 +0000 (11:29 +0200)
Forwarded: not-needed

Gbp-Pq: Name distro.patch

CMakeLists.txt

index 4d5280d24711dfa0d633326ac549ee4f68f4d54a..3a35da9bf359468c0b329a5843326fe474d76eb0 100644 (file)
@@ -1420,6 +1420,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()
@@ -1433,6 +1436,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()