summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2024-09-02 00:44:06 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-10-17 00:58:49 -0500
commitc96bfdf277cc43235d90b0cbfcd09b026cef1f1d (patch)
treec0460aafa0c2c2a09198c460f23d7df042dfaeef /user
parent32cc832aa5be04fb3f23e9a51db7ee8bf2d0d927 (diff)
downloadpackages-c96bfdf277cc43235d90b0cbfcd09b026cef1f1d.tar.gz
packages-c96bfdf277cc43235d90b0cbfcd09b026cef1f1d.tar.bz2
packages-c96bfdf277cc43235d90b0cbfcd09b026cef1f1d.tar.xz
packages-c96bfdf277cc43235d90b0cbfcd09b026cef1f1d.zip
user/cbindgen: Fix build on PPC32
cbindgen vendors the libc crate, so this needs the same fix as the Rust 1.7x bootstrap compilers. Closes: #1252 Ref: #1248
Diffstat (limited to 'user')
-rw-r--r--user/cbindgen/APKBUILD7
-rw-r--r--user/cbindgen/ppc-libc-hugetlb.patch12
2 files changed, 17 insertions, 2 deletions
diff --git a/user/cbindgen/APKBUILD b/user/cbindgen/APKBUILD
index 61feac008..e2ef30812 100644
--- a/user/cbindgen/APKBUILD
+++ b/user/cbindgen/APKBUILD
@@ -63,7 +63,9 @@ winapi-util-0.1.5
winapi-x86_64-pc-windows-gnu-0.4.0
"
-source="$source $(echo $cargo_deps | sed -E 's#([[:graph:]]+)-([0-9.]+(-(alpha|beta|rc)[0-9.]+)?)#&.tar.gz::https://crates.io/api/v1/crates/\1/\2/download#g')"
+source="$source $(echo $cargo_deps | sed -E 's#([[:graph:]]+)-([0-9.]+(-(alpha|beta|rc)[0-9.]+)?)#&.tar.gz::https://crates.io/api/v1/crates/\1/\2/download#g')
+ ppc-libc-hugetlb.patch
+ "
prepare() {
export CARGO_HOME="$srcdir/cargo-home"
@@ -156,4 +158,5 @@ eddb82aeb8fdeb5436579292c6f7a64a90a2c7bb54070beb437bc7890b99795d0505faa8d6451a99
ff8b7b78065f3d8999ec03c725a0460ebc059771bf071c7a3df3f0ecd733edf3b0a2450024d4e24e1aedddaecd9038ce1376c0d8bbf45132068cf45cf4a53a97 winapi-0.3.9.tar.gz
a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2 winapi-i686-pc-windows-gnu-0.4.0.tar.gz
7baeb661f397c4693dfa001fdc774b323c51a7c55caad40f2de5112a1cefd1d6151e3df41fa4ee193460a5905917c83d2b1de5fa10b4bd014ad96690af95c0fd winapi-util-0.1.5.tar.gz
-4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513 winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz"
+4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513 winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz
+299fbec38c0874bd53987ee8f8d793ac2f7b7695af22fb85b01dd0f3a20190d6920cc2deacc2a9da35bd58fd8eaab177aaa3460ef9e3f0897cd80d0c180e3ce0 ppc-libc-hugetlb.patch"
diff --git a/user/cbindgen/ppc-libc-hugetlb.patch b/user/cbindgen/ppc-libc-hugetlb.patch
new file mode 100644
index 000000000..8a1bfe78d
--- /dev/null
+++ b/user/cbindgen/ppc-libc-hugetlb.patch
@@ -0,0 +1,12 @@
+diff -ur a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs
+--- a/libc-0.2.144/src/unix/linux_like/linux/musl/b32/powerpc.rs 2024-09-02 00:25:08.560000000 +0000
++++ b/libc-0.2.144/src/unix/linux_like/linux/musl/b32/powerpc.rs 2024-09-02 00:25:41.080000000 +0000
+@@ -377,8 +377,6 @@
+
+ pub const EXTPROC: ::tcflag_t = 0x10000000;
+
+-pub const MAP_HUGETLB: ::c_int = 0x040000;
+-
+ pub const F_GETLK: ::c_int = 12;
+ pub const F_GETOWN: ::c_int = 9;
+ pub const F_SETLK: ::c_int = 13;