From: Andreas Beckmann Date: Tue, 13 Dec 2022 03:08:31 +0000 (+0000) Subject: tune distro mode X-Git-Tag: archive/raspbian/3.0-8+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f4287b5ed3f7c115e14d59c3e42d4fa751c4f8dc;p=pocl.git tune distro mode Forwarded: not-needed Gbp-Pq: Name distro.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 727b358..66711fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/lib/kernel/host/CMakeLists.txt b/lib/kernel/host/CMakeLists.txt index 2caaa7c..c657400 100644 --- a/lib/kernel/host/CMakeLists.txt +++ b/lib/kernel/host/CMakeLists.txt @@ -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")