Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/packages/pedalboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ versions:
gpl-sources:
filename: gpl-sources.tar
description: gcc and the copyleft libraries bundled in the wheel
- version: 0.9.25
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From: RISE Project <info@riseproject.dev>
Subject: [PATCH] cmake: don't assume x86 when the target isn't ARM

The Linux branch of CMakeLists.txt has two if/else pairs that treat
"not ARM" as "x86": one adds -march=native (or -mavx) and defines
HAVE_AVX, the other keeps FFTW's AVX/SSE codelets and drops only the
NEON ones. On any other architecture the build fails at
simd-support/simd-avx.h with "compiling simd-avx.h without -mavx".

Make both conditions test for x86 explicitly, so architectures without a
vendored SIMD backend (riscv64, ppc64le, s390x) build the scalar FFTW
codelets and get no architecture-specific compiler flags. JUCE already
falls back to its scalar path when JUCE_USE_SIMD is 0.

Upstream-Status: To upstream [not yet submitted; upstream builds no riscv64 wheels]
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89de0fa..f697bfc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,7 +203,7 @@ elseif(UNIX AND NOT APPLE)
# Processor-specific optimizations (x86 vs ARM)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64")
add_compile_definitions(HAVE_NEON=1)
- else()
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64|i[3-6]86")
# Use -march=native for local builds to optimize for the current CPU,
# but use a portable baseline for CI builds to avoid "Illegal instruction" errors
# when ccache restores objects built on different runner hardware.
@@ -214,6 +214,7 @@ elseif(UNIX AND NOT APPLE)
endif()
add_compile_definitions(HAVE_AVX)
endif()
+ # Any other architecture (riscv64, ppc64le, s390x, ...) builds without SIMD.

# Additional Linux flags
list(APPEND ALL_INCLUDES "vendors/fftw3/api/" "vendors/fftw3/")
@@ -317,8 +318,10 @@ function(collect_sources)
# Exclude files depending on architecture
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64")
list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*(avx|/sse).*")
- else()
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64|i[3-6]86")
list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*neon.*")
+ else()
+ list(FILTER FFTW_SOURCES EXCLUDE REGEX ".*(avx|/sse|neon).*")
endif()

# Exclude unused FFTW components
Loading