Skip to content

Commit efab2a2

Browse files
authored
Merge pull request #5929 from moluopro/remove-misspelled-bdsdc-sources
Fix CMake dynamic-arch fallback and remove unused BDSDC source copies
2 parents 0b54dd1 + 1b64851 commit efab2a2

5 files changed

Lines changed: 18 additions & 1046 deletions

File tree

.github/workflows/c910v.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ jobs:
5858
run: |
5959
# Force use c910v qemu-user
6060
wget https://github.com/revyos/qemu/commit/222729c7455784dd855216d7a2bec4bd8f2a6800.patch
61+
# Backport the upstream linux-user clone_lock fix
62+
wget -O qemu-clone-lock.patch https://gitlab.com/qemu-project/qemu/-/commit/d22e9aec572396836782e993cb18d598e6012688.patch
6163
cd qemu
6264
patch -p1 < ../222729c7455784dd855216d7a2bec4bd8f2a6800.patch
65+
patch -p1 < ../qemu-clone-lock.patch
6366
export CXXFLAGS="-Wno-error"; export CFLAGS="-Wno-error"
6467
./configure --prefix=$GITHUB_WORKSPACE/qemu-install --target-list=riscv64-linux-user --disable-system
6568
make -j$(nproc)

azure-pipelines.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,13 @@ jobs:
223223
LIBRARY_PATH: /usr/local/opt/llvm/lib
224224
steps:
225225
- script: |
226+
set -euo pipefail
226227
brew update
227228
brew install llvm libomp
228229
mkdir build
229230
cd build
230-
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
231-
make
231+
cmake -DTARGET=CORE2 -DUSE_OPENMP=1 -DINTERFACE64=1 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM;HASWELL;SKYLAKEX' -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DNOFORTRAN=1 -DNO_AVX512=1 ..
232+
cmake --build . --parallel "$(sysctl -n hw.logicalcpu)"
232233
ctest
233234
234235
- job: OSX_dynarch_cmake
@@ -239,9 +240,10 @@ jobs:
239240
LIBRARY_PATH: /usr/local/opt/llvm/lib
240241
steps:
241242
- script: |
243+
set -euo pipefail
242244
mkdir build
243245
cd build
244-
cmake -DTARGET=CORE2 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM HASWELL SKYLAKEX' -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_Fortran_COMPILER=gfortran-13 -DBUILD_SHARED_LIBS=ON ..
246+
cmake -DTARGET=CORE2 -DDYNAMIC_ARCH=1 -DDYNAMIC_LIST='NEHALEM;HASWELL;SKYLAKEX' -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_Fortran_COMPILER=gfortran-13 -DBUILD_SHARED_LIBS=ON ..
245247
cmake --build .
246248
ctest
247249

kernel/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
3636
if (${DYNAMIC_ARCH})
3737
include("${PROJECT_SOURCE_DIR}/cmake/system.cmake")
3838
endif ()
39+
# getarch may select a fallback core when CPU features are disabled.
40+
set (KERNEL_CORE "${TARGET_CORE}")
41+
if (${DYNAMIC_ARCH} AND NOT CMAKE_CROSSCOMPILING)
42+
set (KERNEL_CORE "${CORE}")
43+
endif ()
3944
ParseMakefileVars("${KERNELDIR}/KERNEL")
40-
ParseMakefileVars("${KERNELDIR}/KERNEL.${TARGET_CORE}")
45+
ParseMakefileVars("${KERNELDIR}/KERNEL.${KERNEL_CORE}")
4146
SetDefaultL1()
4247
SetDefaultL2()
4348
SetDefaultL3()
@@ -234,11 +239,11 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
234239
endif ()
235240
# Makefile.L3
236241
set(USE_TRMM false)
237-
string(TOUPPER ${TARGET_CORE} UC_TARGET_CORE)
238-
if (ARM OR ARM64 OR RISCV64 OR WASM OR (UC_TARGET_CORE MATCHES LONGSOON3B) OR (UC_TARGET_CORE MATCHES GENERIC) OR (UC_TARGET_CORE MATCHES HASWELL) OR (UC_TARGET_CORE MATCHES ZEN) OR (UC_TARGET_CORE MATCHES SKYLAKEX) OR (UC_TARGET_CORE MATCHES COOPERLAKE) OR (UC_TARGET_CORE MATCHES SAPPHIRERAPIDS))
242+
string(TOUPPER "${KERNEL_CORE}" UC_KERNEL_CORE)
243+
if (ARM OR ARM64 OR RISCV64 OR WASM OR (UC_KERNEL_CORE MATCHES LONGSOON3B) OR (UC_KERNEL_CORE MATCHES GENERIC) OR (UC_KERNEL_CORE MATCHES HASWELL) OR (UC_KERNEL_CORE MATCHES ZEN) OR (UC_KERNEL_CORE MATCHES SKYLAKEX) OR (UC_KERNEL_CORE MATCHES COOPERLAKE) OR (UC_KERNEL_CORE MATCHES SAPPHIRERAPIDS))
239244
set(USE_TRMM true)
240245
endif ()
241-
if (ZARCH OR (UC_TARGET_CORE MATCHES POWER8) OR (UC_TARGET_CORE MATCHES POWER9) OR (UC_TARGET_CORE MATCHES POWER10))
246+
if (ZARCH OR (UC_KERNEL_CORE MATCHES POWER8) OR (UC_KERNEL_CORE MATCHES POWER9) OR (UC_KERNEL_CORE MATCHES POWER10))
242247
set(USE_TRMM true)
243248
endif ()
244249
set(USE_DIRECT_STRMM false)
@@ -261,7 +266,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
261266
if (ARM64)
262267
set(USE_DIRECT_SSYMM true)
263268
endif()
264-
if (UC_TARGET_CORE MATCHES ARMV9SME OR UC_TARGET_CORE MATCHES VORTEXM4)
269+
if (UC_KERNEL_CORE MATCHES ARMV9SME OR UC_KERNEL_CORE MATCHES VORTEXM4)
265270
set (HAVE_SME true)
266271
endif ()
267272

0 commit comments

Comments
 (0)