Skip to content

Commit 55272a7

Browse files
committed
RISCV: Add CMake variable to set the system library directory
RISCV installs place the libraries inside a folder that is named after the ABI, so we need to prompt CMake to search there.
1 parent be6a14c commit 55272a7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilderBase"
22
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
33
authors = ["Elliot Saba <staticfloat@gmail.com>"]
4-
version = "1.36.0"
4+
version = "1.37.0"
55

66
[deps]
77
Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0"

src/BuildToolchains.jl

+8
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ function toolchain_file(bt::CMake, p::AbstractPlatform, host_platform::AbstractP
9494
set(CMAKE_SYSROOT /opt/$(aatarget)/$(aatarget)/sys-root/)
9595
"""
9696
end
97+
98+
if arch(p) == "riscv64"
99+
# RISCV libraries are in a subdirectory corresponding to the ABI of the processor
100+
file *= """
101+
set(CMAKE_SYSTEM_LIBRARY_PATH \${CMAKE_SYSROOT}/usr/lib64/lp64d)
102+
"""
103+
end
104+
97105
file *= """
98106
set(CMAKE_INSTALL_PREFIX \$ENV{prefix})
99107

0 commit comments

Comments
 (0)