chore: import upstream snapshot with attribution
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig ar "$@"
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Wrapper that dispatches to `zig c++ -target x86_64-linux-gnu.2.35`.
|
||||
# Mirrors x86_64-linux-musl-g++ but pins a glibc 2.35 baseline.
|
||||
#
|
||||
# See x86_64-linux-gnu-gcc for the rationale behind intercepting
|
||||
# `-print-prog-name=ld`.
|
||||
case " $* " in
|
||||
*" -print-prog-name=ld "*)
|
||||
echo /usr/local/bin/x86_64-linux-gnu-ld
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Filters out `--target=<rust-triple>` args that cc-rs adds — cc-rs
|
||||
# emits the Rust-form triple (x86_64-unknown-linux-gnu) which Zig
|
||||
# can't parse. We always pass our own -target below.
|
||||
args=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--target=*) ;;
|
||||
*) args+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
exec /opt/zig/zig c++ -target x86_64-linux-gnu.2.35 "${args[@]}"
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Wrapper that dispatches to `zig cc -target x86_64-linux-gnu.2.35`.
|
||||
# Mirrors x86_64-linux-musl-gcc but pins a glibc 2.35 baseline; the
|
||||
# resulting binaries run on any host with glibc >= 2.35.
|
||||
#
|
||||
# Intercepts `-print-prog-name=ld` and returns our cross-ld wrapper —
|
||||
# libtool uses that query to discover the linker before probing it
|
||||
# with `-m elf_x86_64` to decide whether shared library builds are
|
||||
# supported. zig cc passes the query through to the host `/usr/bin/ld`,
|
||||
# which is aarch64-only and rejects the x86_64 emulation mode, causing
|
||||
# libtool to silently disable shared-lib emission. Pointing libtool at
|
||||
# our ld.lld-backed wrapper makes the probe succeed.
|
||||
case " $* " in
|
||||
*" -print-prog-name=ld "*)
|
||||
echo /usr/local/bin/x86_64-linux-gnu-ld
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Filters out `--target=<rust-triple>` args that cc-rs (Rust build
|
||||
# scripts like libseccomp-sys, capng-sys) adds — cc-rs emits the
|
||||
# Rust-form triple (x86_64-unknown-linux-gnu) which Zig can't parse.
|
||||
# We always pass our own -target below, so cc-rs's is redundant.
|
||||
args=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--target=*) ;;
|
||||
*) args+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
exec /opt/zig/zig cc -target x86_64-linux-gnu.2.35 "${args[@]}"
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Wrapper that points the autotools / libtool linker probe at
|
||||
# LLVM's lld, which can produce x86_64 ELF output on an aarch64
|
||||
# host. The system `/usr/bin/ld` on the dev image is aarch64-only
|
||||
# and rejects `-m elf_x86_64`, causing libtool to silently disable
|
||||
# shared-library builds. libtool searches PATH for `<host>-ld`
|
||||
# before falling back to plain `ld`; this wrapper satisfies the
|
||||
# search and unblocks shared-lib emission.
|
||||
exec ld.lld "$@"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig ranlib "$@"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig strip "$@"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig ar "$@"
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Wrapper that dispatches to `zig c++ -target x86_64-linux-musl`.
|
||||
# Filters out `--target=<rust-triple>` args that cc-rs (Rust build
|
||||
# scripts) adds — cc-rs emits the Rust-form triple
|
||||
# (x86_64-unknown-linux-musl) which Zig can't parse. We always pass
|
||||
# our own -target below, so cc-rs's is redundant.
|
||||
args=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--target=*) ;;
|
||||
*) args+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
exec /opt/zig/zig c++ -target x86_64-linux-musl "${args[@]}"
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# Wrapper that dispatches to `zig cc -target x86_64-linux-musl`.
|
||||
# Filters out `--target=<rust-triple>` args that cc-rs (Rust build
|
||||
# scripts like zstd-sys) adds — cc-rs emits the Rust-form triple
|
||||
# (x86_64-unknown-linux-musl) which Zig can't parse. We always pass
|
||||
# our own -target below, so cc-rs's is redundant.
|
||||
args=()
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--target=*) ;;
|
||||
*) args+=("$arg") ;;
|
||||
esac
|
||||
done
|
||||
exec /opt/zig/zig cc -target x86_64-linux-musl "${args[@]}"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig ranlib "$@"
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec /opt/zig/zig strip "$@"
|
||||
Reference in New Issue
Block a user