From c82e88dd00d1b0b7fcfb4e5628d99611388cef6f Mon Sep 17 00:00:00 2001 From: rawnix ports Date: Sat, 26 Sep 2026 18:19:05 +0000 Subject: sync 2026-09-26 18:19 UTC 1672 files changed, 151396 insertions(+) --- devel/gcc-compat/MAKEPKG | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 devel/gcc-compat/MAKEPKG (limited to 'devel/gcc-compat/MAKEPKG') diff --git a/devel/gcc-compat/MAKEPKG b/devel/gcc-compat/MAKEPKG new file mode 100644 index 0000000..4d0fceb --- /dev/null +++ b/devel/gcc-compat/MAKEPKG @@ -0,0 +1,47 @@ +#!/bin/mkpkg +# description: GCC compatibility shims for pure LLVM/musl systems +name=gcc-compat +version=1.0.0 +release=2 +#depends=(llvm-toolchain) +depends=() +source=() + +sha256sums=( +) + +build() { + mkdir -p $PKG/usr/lib + mkdir -p $PKG/usr/bin + + # libgcc_s → libunwind + ln -s libunwind.so.1 $PKG/usr/lib/libgcc_s.so.1 + printf 'INPUT(-lunwind)\n' > $PKG/usr/lib/libgcc_s.so + + # libgcc.a → compiler-rt builtins + _builtins=$(clang --print-libgcc-file-name 2>/dev/null || true) + if [ -n "$_builtins" ] && [ -f "$_builtins" ]; then + printf 'INPUT(%s)\n' "$_builtins" > $PKG/usr/lib/libgcc.a + else + llvm-ar cr $PKG/usr/lib/libgcc.a + fi + + # libstdc++ → libc++ + printf 'INPUT(-lc++)\n' > $PKG/usr/lib/libstdc++.so + ln -s libc++.so.1 $PKG/usr/lib/libstdc++.so.6 + if [ -f /usr/lib/libc++.a ]; then + printf 'INPUT(-lc++ -lc++abi)\n' > $PKG/usr/lib/libstdc++.a + fi + + # rustc-wrapper — force dynamic linking on musl + printf '#!/bin/sh\nexec /usr/bin/rustc -C target-feature=-crt-static "$@"\n' \ + > $PKG/usr/bin/rustc-wrapper + chmod 755 $PKG/usr/bin/rustc-wrapper +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh -- cgit v1.3.1