summaryrefslogtreecommitdiff
path: root/repo/devel
diff options
context:
space:
mode:
Diffstat (limited to 'repo/devel')
-rw-r--r--repo/devel/asciidoc/asciidoc.xibuild (renamed from repo/devel/asciidoc.xibuild)0
-rw-r--r--repo/devel/autoconf-archive/autoconf-archive.xibuild (renamed from repo/devel/autoconf-archive.xibuild)0
-rw-r--r--repo/devel/autoconf/autoconf.xibuild (renamed from repo/devel/autoconf.xibuild)0
-rw-r--r--repo/devel/autoconf2-13/autoconf2-13.xibuild (renamed from repo/devel/autoconf2-13.xibuild)0
-rw-r--r--repo/devel/automake/automake.xibuild (renamed from repo/devel/automake.xibuild)0
-rw-r--r--repo/devel/bc/bc.xibuild (renamed from repo/devel/bc.xibuild)0
-rw-r--r--repo/devel/bison/bison.xibuild (renamed from repo/devel/bison.xibuild)0
-rw-r--r--repo/devel/boost/0001-revert-cease-dependence-on-range.patch1
-rw-r--r--repo/devel/boost/boost-1.57.0-python-abi_letters.patch62
-rw-r--r--repo/devel/boost/boost-1.57.0-python-libpython_dep.patch13
-rw-r--r--repo/devel/boost/boost.xibuild (renamed from repo/devel/boost.xibuild)0
-rw-r--r--repo/devel/boost/python-3.10.patch49
-rw-r--r--repo/devel/cbindgen/cbindgen.xibuild (renamed from repo/devel/cbindgen.xibuild)0
-rw-r--r--repo/devel/check/check.xibuild (renamed from repo/devel/check.xibuild)0
-rw-r--r--repo/devel/clang/clang.xibuild (renamed from repo/devel/clang.xibuild)0
-rw-r--r--repo/devel/clang/patches/10-add-musl-triples.patch35
-rw-r--r--repo/devel/clang/patches/30-Enable-stack-protector-by-default-for-Alpine-Linux.patch81
-rw-r--r--repo/devel/cmake-extra/cmake-extra.xibuild (renamed from repo/devel/cmake-extra.xibuild)0
-rw-r--r--repo/devel/cmake-modules/cmake-modules.xibuild (renamed from repo/devel/cmake-modules.xibuild)0
-rw-r--r--repo/devel/cmake/cmake.xibuild (renamed from repo/devel/cmake.xibuild)0
-rw-r--r--repo/devel/compiler-rt/compiler-rt.xibuild (renamed from repo/devel/compiler-rt.xibuild)0
-rw-r--r--repo/devel/compiler-rt/link-execinfo.patch11
-rw-r--r--repo/devel/dejagnu/dejagnu.xibuild (renamed from repo/devel/dejagnu.xibuild)0
-rw-r--r--repo/devel/distcc/dcc_gcc_rewrite_fqn-avoid-heap-corruption.patch65
-rw-r--r--repo/devel/distcc/distcc-hardened.patch24
-rw-r--r--repo/devel/distcc/distcc.xibuild (renamed from repo/devel/distcc.xibuild)0
-rw-r--r--repo/devel/distcc/gcc-10.patch15
-rw-r--r--repo/devel/docbook-dtd/docbook-dtd.xibuild (renamed from repo/devel/docbook-dtd.xibuild)0
-rw-r--r--repo/devel/docbook-xml/docbook-xml.xibuild (renamed from repo/devel/docbook-xml.xibuild)0
-rw-r--r--repo/devel/docbook-xsl/docbook-xsl.xibuild (renamed from repo/devel/docbook-xsl.xibuild)0
-rw-r--r--repo/devel/docbook4-xml/docbook4-xml.xibuild (renamed from repo/devel/docbook4-xml.xibuild)0
-rw-r--r--repo/devel/expect/expect.xibuild (renamed from repo/devel/expect.xibuild)0
-rw-r--r--repo/devel/flex/flex.xibuild (renamed from repo/devel/flex.xibuild)0
-rw-r--r--repo/devel/gcc/gcc.xibuild (renamed from repo/devel/gcc.xibuild)0
-rw-r--r--repo/devel/gdb/gdb.xibuild (renamed from repo/devel/gdb.xibuild)0
-rw-r--r--repo/devel/git/git.xibuild (renamed from repo/devel/git.xibuild)0
-rw-r--r--repo/devel/go/go.xibuild (renamed from repo/devel/go.xibuild)0
-rw-r--r--repo/devel/gtk-doc/gtk-doc.xibuild (renamed from repo/devel/gtk-doc.xibuild)0
-rw-r--r--repo/devel/help2man/help2man.xibuild (renamed from repo/devel/help2man.xibuild)0
-rw-r--r--repo/devel/icecream/icecream.xibuild (renamed from repo/devel/icecream.xibuild)0
-rw-r--r--repo/devel/imake/imake.xibuild (renamed from repo/devel/imake.xibuild)0
-rw-r--r--repo/devel/itstool/itstool.xibuild (renamed from repo/devel/itstool.xibuild)0
-rw-r--r--repo/devel/libexecinfo/10-execinfo.patch64
-rw-r--r--repo/devel/libexecinfo/20-define-gnu-source.patch24
-rw-r--r--repo/devel/libexecinfo/30-linux-makefile.patch44
-rw-r--r--repo/devel/libexecinfo/libexecinfo.xibuild (renamed from repo/devel/libexecinfo.xibuild)0
-rw-r--r--repo/devel/lld/lld.xibuild (renamed from repo/devel/lld.xibuild)0
-rw-r--r--repo/devel/llvm-libunwind/libcxx-musl.patch28
-rw-r--r--repo/devel/llvm-libunwind/libunwind-link-libssp.patch20
-rw-r--r--repo/devel/llvm-libunwind/llvm-libunwind.xibuild (renamed from repo/devel/llvm-libunwind.xibuild)0
-rw-r--r--repo/devel/llvm/llvm.xibuild (renamed from repo/devel/llvm.xibuild)0
-rw-r--r--repo/devel/m4/m4.xibuild (renamed from repo/devel/m4.xibuild)0
-rw-r--r--repo/devel/make/make.xibuild (renamed from repo/devel/make.xibuild)0
-rw-r--r--repo/devel/meson/meson.xibuild (renamed from repo/devel/meson.xibuild)0
-rw-r--r--repo/devel/mpc/mpc.xibuild (renamed from repo/devel/mpc.xibuild)0
-rw-r--r--repo/devel/nasm/nasm.xibuild (renamed from repo/devel/nasm.xibuild)0
-rw-r--r--repo/devel/ninja/ninja.xibuild (renamed from repo/devel/ninja.xibuild)0
-rw-r--r--repo/devel/patch/patch.xibuild (renamed from repo/devel/patch.xibuild)0
-rw-r--r--repo/devel/pkg-config/pkg-config.xibuild (renamed from repo/devel/pkg-config.xibuild)0
-rw-r--r--repo/devel/rustc/files/check-rustc109
-rw-r--r--repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch24
-rw-r--r--repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch19
-rw-r--r--repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch23
-rw-r--r--repo/devel/rustc/patches/alpine-target.patch191
-rw-r--r--repo/devel/rustc/patches/install-template-shebang.patch10
-rw-r--r--repo/devel/rustc/patches/link-musl-dynamically.patch17
-rw-r--r--repo/devel/rustc/patches/musl-fix-linux_musl_base.patch23
-rw-r--r--repo/devel/rustc/patches/need-rpath.patch62
-rw-r--r--repo/devel/rustc/patches/need-ssp_nonshared.patch13
-rw-r--r--repo/devel/rustc/rustc.xibuild (renamed from repo/devel/rustc.xibuild)0
-rw-r--r--repo/devel/scdoc/scdoc.xibuild (renamed from repo/devel/scdoc.xibuild)0
-rw-r--r--repo/devel/sgml-common/sgml-common.xibuild (renamed from repo/devel/sgml-common.xibuild)0
-rw-r--r--repo/devel/strace/disable-fortify.patch39
-rw-r--r--repo/devel/strace/nlattr-fix.patch21
-rw-r--r--repo/devel/strace/strace.xibuild (renamed from repo/devel/strace.xibuild)0
-rw-r--r--repo/devel/swig/swig.xibuild (renamed from repo/devel/swig.xibuild)0
-rw-r--r--repo/devel/texinfo/texinfo.xibuild (renamed from repo/devel/texinfo.xibuild)0
-rw-r--r--repo/devel/uthash/uthash.xibuild (renamed from repo/devel/uthash.xibuild)0
-rw-r--r--repo/devel/vala/vala.xibuild (renamed from repo/devel/vala.xibuild)0
-rw-r--r--repo/devel/waf/waf.xibuild (renamed from repo/devel/waf.xibuild)0
-rw-r--r--repo/devel/xmlto/xmlto.xibuild (renamed from repo/devel/xmlto.xibuild)0
-rw-r--r--repo/devel/xorg-cf-files/xorg-cf-files.xibuild (renamed from repo/devel/xorg-cf-files.xibuild)0
82 files changed, 1087 insertions, 0 deletions
diff --git a/repo/devel/asciidoc.xibuild b/repo/devel/asciidoc/asciidoc.xibuild
index 34202d0..34202d0 100644
--- a/repo/devel/asciidoc.xibuild
+++ b/repo/devel/asciidoc/asciidoc.xibuild
diff --git a/repo/devel/autoconf-archive.xibuild b/repo/devel/autoconf-archive/autoconf-archive.xibuild
index ff50482..ff50482 100644
--- a/repo/devel/autoconf-archive.xibuild
+++ b/repo/devel/autoconf-archive/autoconf-archive.xibuild
diff --git a/repo/devel/autoconf.xibuild b/repo/devel/autoconf/autoconf.xibuild
index 8068345..8068345 100644
--- a/repo/devel/autoconf.xibuild
+++ b/repo/devel/autoconf/autoconf.xibuild
diff --git a/repo/devel/autoconf2-13.xibuild b/repo/devel/autoconf2-13/autoconf2-13.xibuild
index abddc17..abddc17 100644
--- a/repo/devel/autoconf2-13.xibuild
+++ b/repo/devel/autoconf2-13/autoconf2-13.xibuild
diff --git a/repo/devel/automake.xibuild b/repo/devel/automake/automake.xibuild
index 8b8951f..8b8951f 100644
--- a/repo/devel/automake.xibuild
+++ b/repo/devel/automake/automake.xibuild
diff --git a/repo/devel/bc.xibuild b/repo/devel/bc/bc.xibuild
index ffe43a5..ffe43a5 100644
--- a/repo/devel/bc.xibuild
+++ b/repo/devel/bc/bc.xibuild
diff --git a/repo/devel/bison.xibuild b/repo/devel/bison/bison.xibuild
index 2f96141..2f96141 100644
--- a/repo/devel/bison.xibuild
+++ b/repo/devel/bison/bison.xibuild
diff --git a/repo/devel/boost/0001-revert-cease-dependence-on-range.patch b/repo/devel/boost/0001-revert-cease-dependence-on-range.patch
new file mode 100644
index 0000000..77b8178
--- /dev/null
+++ b/repo/devel/boost/0001-revert-cease-dependence-on-range.patch
@@ -0,0 +1 @@
+Too Many Requests \ No newline at end of file
diff --git a/repo/devel/boost/boost-1.57.0-python-abi_letters.patch b/repo/devel/boost/boost-1.57.0-python-abi_letters.patch
new file mode 100644
index 0000000..7df3ee7
--- /dev/null
+++ b/repo/devel/boost/boost-1.57.0-python-abi_letters.patch
@@ -0,0 +1,62 @@
+--- boost_1_57_0/tools/build/src/tools/python.jam 2013-05-21 06:14:18.000000000 +0200
++++ boost_1_55_0/tools/build/src/tools/python.jam 2014-05-29 19:09:12.115413877 +0200
+@@ -94,7 +94,7 @@ feature.feature pythonpath : : free opti
+ # using python : 2.3 : /usr/local/bin/python ;
+ #
+ rule init ( version ? : cmd-or-prefix ? : includes * : libraries ?
+- : condition * : extension-suffix ? )
++ : condition * : extension-suffix ? : abi-letters ? )
+ {
+ project.push-current $(.project) ;
+
+@@ -107,7 +107,7 @@ rule init ( version ? : cmd-or-prefix ?
+ }
+ }
+
+- configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) ;
++ configure $(version) : $(cmd-or-prefix) : $(includes) : $(libraries) : $(condition) : $(extension-suffix) : $(abi-letters) ;
+
+ project.pop-current ;
+ }
+@@ -653,7 +653,7 @@ local rule system-library-dependencies (
+
+ # Declare a target to represent Python's library.
+ #
+-local rule declare-libpython-target ( version ? : requirements * )
++local rule declare-libpython-target ( version ? : requirements * : abi-letters ? )
+ {
+ # Compute the representation of Python version in the name of Python's
+ # library file.
+@@ -677,13 +677,13 @@ local rule declare-libpython-target ( ve
+ }
+
+ # Declare it.
+- lib python.lib : : <name>python$(lib-version) $(requirements) ;
++ lib python.lib : : <name>python$(lib-version)$(abi-letters) $(requirements) ;
+ }
+
+
+ # Implementation of init.
+ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
+- condition * : extension-suffix ? )
++ condition * : extension-suffix ? : abi-letters ? )
+ {
+ local prefix ;
+ local exec-prefix ;
+@@ -699,6 +699,7 @@ local rule configure ( version ? : cmd-o
+ extension-suffix ?= _d ;
+ }
+ extension-suffix ?= "" ;
++ abi-letters ?= "" ;
+
+ # Normalize and dissect any version number.
+ local major-minor ;
+@@ -922,7 +923,7 @@ local rule configure ( version ? : cmd-o
+ }
+ else
+ {
+- declare-libpython-target $(version) : $(target-requirements) ;
++ declare-libpython-target $(version) : $(target-requirements) : $(abi-letters) ;
+
+ # This is an evil hack. On, Windows, when Python is embedded, nothing
+ # seems to set up sys.path to include Python's standard library
diff --git a/repo/devel/boost/boost-1.57.0-python-libpython_dep.patch b/repo/devel/boost/boost-1.57.0-python-libpython_dep.patch
new file mode 100644
index 0000000..57bfc26
--- /dev/null
+++ b/repo/devel/boost/boost-1.57.0-python-libpython_dep.patch
@@ -0,0 +1,13 @@
+Index: boost_1_57_0/tools/build/src/tools/python.jam
+===================================================================
+--- boost_1_57_0/tools/build/src/tools/python.jam (revision 50406)
++++ boost_1_57_0/tools/build/src/tools/python.jam (working copy)
+@@ -994,7 +994,7 @@
+ else
+ {
+ alias python_for_extensions
+- :
++ : python
+ : $(target-requirements)
+ :
+ : $(usage-requirements)
diff --git a/repo/devel/boost.xibuild b/repo/devel/boost/boost.xibuild
index b97cab7..b97cab7 100644
--- a/repo/devel/boost.xibuild
+++ b/repo/devel/boost/boost.xibuild
diff --git a/repo/devel/boost/python-3.10.patch b/repo/devel/boost/python-3.10.patch
new file mode 100644
index 0000000..2e1d5e3
--- /dev/null
+++ b/repo/devel/boost/python-3.10.patch
@@ -0,0 +1,49 @@
+From e193f080c7d209516ac9b712fa0c50bb08026fa2 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Tue, 19 Oct 2021 12:24:31 +0000
+Subject: [PATCH] BoostConfig.cmake: allow searching for python310
+
+* accept double digits in Python3_VERSION_MINOR
+
+* if someone is using e.g.:
+ find_package(Python3 REQUIRED)
+ find_package(Boost REQUIRED python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
+
+ with python-3.10 then it currently fails with:
+
+ -- Found PythonLibs: /usr/lib/libpython3.10.so (found version "3.10.0")
+ -- Found Python3: -native/usr/bin/python3-native/python3 (found version "3.10.0") found components: Interpreter
+ CMake Error at /usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:141 (find_package):
+ Could not find a package configuration file provided by "boost_python310"
+ (requested version 1.77.0) with any of the following names:
+
+ boost_python310Config.cmake
+ boost_python310-config.cmake
+
+ Add the installation prefix of "boost_python310" to CMAKE_PREFIX_PATH or
+ set "boost_python310_DIR" to a directory containing one of the above files.
+ If "boost_python310" provides a separate development package or SDK, be
+ sure it has been installed.
+ Call Stack (most recent call first):
+ /usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:258 (boost_find_component)
+ /usr/share/cmake-3.21/Modules/FindBoost.cmake:594 (find_package)
+ CMakeLists.txt:18 (find_package)
+
+Signed-off-by: Martin Jansa <martin.jansa@lge.com>
+---
+ BoostConfig.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/BoostConfig.cmake b/BoostConfig.cmake
+index fd17821..5dffa58 100644
+--- a/tools/boost_install/BoostConfig.cmake
++++ b/tools/boost_install/BoostConfig.cmake
+@@ -113,7 +113,7 @@ macro(boost_find_component comp required quiet)
+ set(_BOOST_REQUIRED REQUIRED)
+ endif()
+
+- if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9])$")
++ if("${comp}" MATCHES "^(python|numpy|mpi_python)([1-9])([0-9][0-9]?)$")
+
+ # handle pythonXY and numpyXY versioned components for compatibility
+
diff --git a/repo/devel/cbindgen.xibuild b/repo/devel/cbindgen/cbindgen.xibuild
index 8bebc3a..8bebc3a 100644
--- a/repo/devel/cbindgen.xibuild
+++ b/repo/devel/cbindgen/cbindgen.xibuild
diff --git a/repo/devel/check.xibuild b/repo/devel/check/check.xibuild
index 192e219..192e219 100644
--- a/repo/devel/check.xibuild
+++ b/repo/devel/check/check.xibuild
diff --git a/repo/devel/clang.xibuild b/repo/devel/clang/clang.xibuild
index 3b93ba3..3b93ba3 100644
--- a/repo/devel/clang.xibuild
+++ b/repo/devel/clang/clang.xibuild
diff --git a/repo/devel/clang/patches/10-add-musl-triples.patch b/repo/devel/clang/patches/10-add-musl-triples.patch
new file mode 100644
index 0000000..b11ca84
--- /dev/null
+++ b/repo/devel/clang/patches/10-add-musl-triples.patch
@@ -0,0 +1,35 @@
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -2077,6 +2077,7 @@
+ static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
+ static const char *const AArch64Triples[] = {
+ "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
++ "aarch64-linux-musl",
+ "aarch64-suse-linux", "aarch64-linux-android"};
+ static const char *const AArch64beLibDirs[] = {"/lib"};
+ static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
+@@ -2086,6 +2087,8 @@
+ static const char *const ARMTriples[] = {"arm-linux-gnueabi",
+ "arm-linux-androideabi"};
+ static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
++ "arm-linux-musleabihf",
++ "armv7l-linux-musleabihf",
+ "armv7hl-redhat-linux-gnueabi",
+ "armv6hl-suse-linux-gnueabi",
+ "armv7hl-suse-linux-gnueabi"};
+@@ -2105,6 +2108,7 @@
+ "x86_64-redhat-linux", "x86_64-suse-linux",
+ "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
+ "x86_64-slackware-linux", "x86_64-unknown-linux",
++ "x86_64-linux-musl",
+ "x86_64-amazon-linux", "x86_64-linux-android"};
+ static const char *const X32Triples[] = {"x86_64-linux-gnux32",
+ "x86_64-pc-linux-gnux32"};
+@@ -2116,6 +2120,7 @@
+ "i686-redhat-linux", "i386-redhat-linux",
+ "i586-suse-linux", "i686-montavista-linux",
+ "i686-linux-android", "i686-gnu",
++ "i686-linux-musl",
+ };
+
+ static const char *const M68kLibDirs[] = {"/lib"};
diff --git a/repo/devel/clang/patches/30-Enable-stack-protector-by-default-for-Alpine-Linux.patch b/repo/devel/clang/patches/30-Enable-stack-protector-by-default-for-Alpine-Linux.patch
new file mode 100644
index 0000000..f2895ce
--- /dev/null
+++ b/repo/devel/clang/patches/30-Enable-stack-protector-by-default-for-Alpine-Linux.patch
@@ -0,0 +1,81 @@
+Based on original patchset from Jakub Jirutka <jakub@jirutka.cz>
+Updated by Eric Molitor <eric@molitor.org>
+Updated by Natanael Copa <ncopa@alpinelinux.org>
+Updated by omni <omni+alpine@hack.org>
+
+--- a/lib/Driver/ToolChains/Linux.h
++++ b/lib/Driver/ToolChains/Linux.h
+@@ -11,6 +11,7 @@
+
+ #include "Gnu.h"
+ #include "clang/Driver/ToolChain.h"
++#include "clang/Basic/LangOptions.h"
+
+ namespace clang {
+ namespace driver {
+@@ -38,6 +39,18 @@
+ CXXStdlibType GetDefaultCXXStdlibType() const override;
+ bool isPIEDefault() const override;
+ bool isNoExecStackDefault() const override;
++
++ LangOptions::StackProtectorMode
++ GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
++ StringRef VendorName = Linux::getTriple().getVendorName();
++ if (VendorName.compare("alpine") == 0)
++ return LangOptions::SSPStrong;
++
++ return LangOptions::SSPOff;
++ }
++
++
++
+ bool IsMathErrnoDefault() const override;
+ SanitizerMask getSupportedSanitizers() const override;
+ void addProfileRTLibs(const llvm::opt::ArgList &Args,
+--- a/test/Driver/fsanitize.c
++++ b/test/Driver/fsanitize.c
+@@ -667,18 +667,17 @@
+ // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP
+ // NOSP-NOT: "-fsanitize=safe-stack"
+
+-// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
++// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
+ // RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN
+ // RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
+ // RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP
+-// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
+-// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
++// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
++// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
+ // RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
+ // NO-SP-NOT: stack-protector
+ // NO-SP: "-fsanitize=safe-stack"
+ // SP-ASAN: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address'
+ // SP: "-fsanitize=safe-stack"
+-// SP: -stack-protector
+ // NO-SP-NOT: stack-protector
+
+ // RUN: %clang -target powerpc64-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM
+--- a/test/Driver/stack-protector.c
++++ b/test/Driver/stack-protector.c
+@@ -35,6 +35,20 @@
+
+ // Test default stack protector values for Darwin platforms
+
++// RUN: %clang -target x86_64-alpine-linux-musl -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE
++// ALPINE: "-stack-protector" "2"
++
++// RUN: %clang -target x86_64-alpine-linux-musl -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_SPS
++// ALPINE_SPS: "-stack-protector" "2"
++
++// RUN: %clang -target x86_64-alpine-linux-musl -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_ALL
++// ALPINE_ALL: "-stack-protector" "3"
++// ALPINE_ALL-NOT: "-stack-protector-buffer-size"
++
++// RUN: %clang -target x86_64-alpine-linux-musl -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=ALPINE_NOSSP
++// ALPINE_NOSSP-NOT: "-stack-protector"
++// ALPINE_NOSSP-NOT: "-stack-protector-buffer-size"
++
+ // RUN: %clang -target armv7k-apple-watchos2.0 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_WATCHOS
+ // RUN: %clang -ffreestanding -target armv7k-apple-watchos2.0 -### %s 2>&1 | FileCheck %s -check-prefix=SSP_WATCHOS
+ // SSP_WATCHOS: "-stack-protector" "1"
diff --git a/repo/devel/cmake-extra.xibuild b/repo/devel/cmake-extra/cmake-extra.xibuild
index a81994f..a81994f 100644
--- a/repo/devel/cmake-extra.xibuild
+++ b/repo/devel/cmake-extra/cmake-extra.xibuild
diff --git a/repo/devel/cmake-modules.xibuild b/repo/devel/cmake-modules/cmake-modules.xibuild
index b23083d..b23083d 100644
--- a/repo/devel/cmake-modules.xibuild
+++ b/repo/devel/cmake-modules/cmake-modules.xibuild
diff --git a/repo/devel/cmake.xibuild b/repo/devel/cmake/cmake.xibuild
index 41be69c..41be69c 100644
--- a/repo/devel/cmake.xibuild
+++ b/repo/devel/cmake/cmake.xibuild
diff --git a/repo/devel/compiler-rt.xibuild b/repo/devel/compiler-rt/compiler-rt.xibuild
index abff3dc..abff3dc 100644
--- a/repo/devel/compiler-rt.xibuild
+++ b/repo/devel/compiler-rt/compiler-rt.xibuild
diff --git a/repo/devel/compiler-rt/link-execinfo.patch b/repo/devel/compiler-rt/link-execinfo.patch
new file mode 100644
index 0000000..8da49fb
--- /dev/null
+++ b/repo/devel/compiler-rt/link-execinfo.patch
@@ -0,0 +1,11 @@
+--- a/lib/scudo/standalone/CMakeLists.txt
++++ b/lib/scudo/standalone/CMakeLists.txt
+@@ -137,6 +137,8 @@
+
+ append_list_if(FUCHSIA zircon SCUDO_LINK_LIBS)
+
++list(APPEND SCUDO_LINK_LIBS execinfo)
++
+ if(COMPILER_RT_HAS_SCUDO_STANDALONE)
+ add_compiler_rt_object_libraries(RTScudoStandalone
+ ARCHS ${SCUDO_STANDALONE_SUPPORTED_ARCH}
diff --git a/repo/devel/dejagnu.xibuild b/repo/devel/dejagnu/dejagnu.xibuild
index 82e443d..82e443d 100644
--- a/repo/devel/dejagnu.xibuild
+++ b/repo/devel/dejagnu/dejagnu.xibuild
diff --git a/repo/devel/distcc/dcc_gcc_rewrite_fqn-avoid-heap-corruption.patch b/repo/devel/distcc/dcc_gcc_rewrite_fqn-avoid-heap-corruption.patch
new file mode 100644
index 0000000..5d0a86d
--- /dev/null
+++ b/repo/devel/distcc/dcc_gcc_rewrite_fqn-avoid-heap-corruption.patch
@@ -0,0 +1,65 @@
+commit 879b71d6e95673e58d33f6c3c341a893ee307161
+Author: Alexey Sheplyakov <asheplyakov@yandex.ru>
+Date: Sat Jul 10 22:18:14 2021 +0400
+
+ dcc_gcc_rewrite_fqn: avoid heap corruption
+
+ On ALT Linux I've run into the following bug:
+
+ distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+ free(): invalid next size (fast)
+ Aborted (core dumped)
+
+ Apparently dcc_gcc_rewrite writes beyond the allocated memory:
+
+ valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+
+ ==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0)
+ ==11382==
+ ==11382== 1 errors in context 1 of 5:
+ ==11382== Invalid write of size 1
+ ==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+ ==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+ ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+ ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+ ==11382== by 0x10E380: main (distcc.c:352)
+ ==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd
+ ==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+ ==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+ ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+ ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+ ==11382== by 0x10E380: main (distcc.c:352)
+ ==11382==
+ ==11382==
+ ==11382== 1 errors in context 2 of 5:
+ ==11382== Invalid write of size 1
+ ==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+ ==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+ ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+ ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+ ==11382== by 0x10E380: main (distcc.c:352)
+ ==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd
+ ==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+ ==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+ ==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+ ==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+ ==11382== by 0x10E380: main (distcc.c:352)
+
+ and ALT Linux' hardened glibc does not quite like that.
+ Correctly compute the `newcmd_len` to avoid the problem.
+
+ ALTBUG: #40425
+
+diff --git a/src/compile.c b/src/compile.c
+index 34964566fdd6..26d7d1821501 100644
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -584,7 +584,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+ return -ENOENT;
+
+
+- newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0] + 1);
++ newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0]) + 1;
+ newcmd = malloc(newcmd_len);
+ if (!newcmd)
+ return -ENOMEM;
diff --git a/repo/devel/distcc/distcc-hardened.patch b/repo/devel/distcc/distcc-hardened.patch
new file mode 100644
index 0000000..c50b15d
--- /dev/null
+++ b/repo/devel/distcc/distcc-hardened.patch
@@ -0,0 +1,24 @@
+From: Gordon Malm <gengor@gentoo.org>
+
+Make distcc client pass -D__KERNEL__ macro. Hardened GCC uses this
+macro to determine if code intended to be run in-kernel is being compiled.
+If the code is kernel code, certain compile flags are not applied.
+
+When using distcc to build kernel code (modules, etc.) without this patch,
+the distccd host doesn't get passed -D__KERNEL__. Consequently, gcc on
+the distccd host applies all kinds of flags that it shouldn't.
+
+--- distcc-2.18.3/src/strip.c
++++ distcc-2.18.3-hardened/src/strip.c
+@@ -79,7 +79,10 @@ int dcc_strip_local_args(char **from, ch
+ /* skip through argv, copying all arguments but skipping ones that
+ * ought to be omitted */
+ for (from_i = to_i = 0; from[from_i]; from_i++) {
+- if (str_equal("-D", from[from_i])
++ if (str_equal("-D__KERNEL__", from[from_i])) {
++ to[to_i++] = from[from_i];
++ }
++ else if (str_equal("-D", from[from_i])
+ || str_equal("-I", from[from_i])
+ || str_equal("-U", from[from_i])
+ || str_equal("-L", from[from_i])
diff --git a/repo/devel/distcc.xibuild b/repo/devel/distcc/distcc.xibuild
index f333ed6..f333ed6 100644
--- a/repo/devel/distcc.xibuild
+++ b/repo/devel/distcc/distcc.xibuild
diff --git a/repo/devel/distcc/gcc-10.patch b/repo/devel/distcc/gcc-10.patch
new file mode 100644
index 0000000..599de51
--- /dev/null
+++ b/repo/devel/distcc/gcc-10.patch
@@ -0,0 +1,15 @@
+Upstream: Should be
+Reason: Fixes compilation under gcc-10 which has -fno-common
+
+diff --git a/src/stats.c b/src/stats.c
+index 35dbf7d..76bfbee 100644
+--- a/src/stats.c
++++ b/src/stats.c
+@@ -82,7 +82,7 @@ struct statsdata {
+ char compiler[MAX_FILENAME_LEN];
+ };
+
+-const char *stats_text[20] = { "TCP_ACCEPT", "REJ_BAD_REQ", "REJ_OVERLOAD",
++extern const char *stats_text[20] = { "TCP_ACCEPT", "REJ_BAD_REQ", "REJ_OVERLOAD",
+ "COMPILE_OK", "COMPILE_ERROR", "COMPILE_TIMEOUT", "CLI_DISCONN",
+ "OTHER" };
diff --git a/repo/devel/docbook-dtd.xibuild b/repo/devel/docbook-dtd/docbook-dtd.xibuild
index f751d36..f751d36 100644
--- a/repo/devel/docbook-dtd.xibuild
+++ b/repo/devel/docbook-dtd/docbook-dtd.xibuild
diff --git a/repo/devel/docbook-xml.xibuild b/repo/devel/docbook-xml/docbook-xml.xibuild
index 56efc6c..56efc6c 100644
--- a/repo/devel/docbook-xml.xibuild
+++ b/repo/devel/docbook-xml/docbook-xml.xibuild
diff --git a/repo/devel/docbook-xsl.xibuild b/repo/devel/docbook-xsl/docbook-xsl.xibuild
index f5d576d..f5d576d 100644
--- a/repo/devel/docbook-xsl.xibuild
+++ b/repo/devel/docbook-xsl/docbook-xsl.xibuild
diff --git a/repo/devel/docbook4-xml.xibuild b/repo/devel/docbook4-xml/docbook4-xml.xibuild
index 36faa98..36faa98 100644
--- a/repo/devel/docbook4-xml.xibuild
+++ b/repo/devel/docbook4-xml/docbook4-xml.xibuild
diff --git a/repo/devel/expect.xibuild b/repo/devel/expect/expect.xibuild
index c2dd0d8..c2dd0d8 100644
--- a/repo/devel/expect.xibuild
+++ b/repo/devel/expect/expect.xibuild
diff --git a/repo/devel/flex.xibuild b/repo/devel/flex/flex.xibuild
index abf55f4..abf55f4 100644
--- a/repo/devel/flex.xibuild
+++ b/repo/devel/flex/flex.xibuild
diff --git a/repo/devel/gcc.xibuild b/repo/devel/gcc/gcc.xibuild
index e0176cb..e0176cb 100644
--- a/repo/devel/gcc.xibuild
+++ b/repo/devel/gcc/gcc.xibuild
diff --git a/repo/devel/gdb.xibuild b/repo/devel/gdb/gdb.xibuild
index 31d9b7c..31d9b7c 100644
--- a/repo/devel/gdb.xibuild
+++ b/repo/devel/gdb/gdb.xibuild
diff --git a/repo/devel/git.xibuild b/repo/devel/git/git.xibuild
index ab8e273..ab8e273 100644
--- a/repo/devel/git.xibuild
+++ b/repo/devel/git/git.xibuild
diff --git a/repo/devel/go.xibuild b/repo/devel/go/go.xibuild
index 9a5f1b7..9a5f1b7 100644
--- a/repo/devel/go.xibuild
+++ b/repo/devel/go/go.xibuild
diff --git a/repo/devel/gtk-doc.xibuild b/repo/devel/gtk-doc/gtk-doc.xibuild
index 074eca0..074eca0 100644
--- a/repo/devel/gtk-doc.xibuild
+++ b/repo/devel/gtk-doc/gtk-doc.xibuild
diff --git a/repo/devel/help2man.xibuild b/repo/devel/help2man/help2man.xibuild
index 6d91935..6d91935 100644
--- a/repo/devel/help2man.xibuild
+++ b/repo/devel/help2man/help2man.xibuild
diff --git a/repo/devel/icecream.xibuild b/repo/devel/icecream/icecream.xibuild
index 713f16e..713f16e 100644
--- a/repo/devel/icecream.xibuild
+++ b/repo/devel/icecream/icecream.xibuild
diff --git a/repo/devel/imake.xibuild b/repo/devel/imake/imake.xibuild
index 2828071..2828071 100644
--- a/repo/devel/imake.xibuild
+++ b/repo/devel/imake/imake.xibuild
diff --git a/repo/devel/itstool.xibuild b/repo/devel/itstool/itstool.xibuild
index 721c5a7..721c5a7 100644
--- a/repo/devel/itstool.xibuild
+++ b/repo/devel/itstool/itstool.xibuild
diff --git a/repo/devel/libexecinfo/10-execinfo.patch b/repo/devel/libexecinfo/10-execinfo.patch
new file mode 100644
index 0000000..44db530
--- /dev/null
+++ b/repo/devel/libexecinfo/10-execinfo.patch
@@ -0,0 +1,64 @@
+--- a/execinfo.c.orig
++++ b/execinfo.c
+@@ -69,7 +69,8 @@
+ char **
+ backtrace_symbols(void *const *buffer, int size)
+ {
+- int i, clen, alen, offset;
++ size_t clen, alen;
++ int i, offset;
+ char **rval;
+ char *cp;
+ Dl_info info;
+@@ -78,7 +79,6 @@
+ rval = malloc(clen);
+ if (rval == NULL)
+ return NULL;
+- (char **)cp = &(rval[size]);
+ for (i = 0; i < size; i++) {
+ if (dladdr(buffer[i], &info) != 0) {
+ if (info.dli_sname == NULL)
+@@ -92,14 +92,14 @@
+ 2 + /* " <" */
+ strlen(info.dli_sname) + /* "function" */
+ 1 + /* "+" */
+- D10(offset) + /* "offset */
++ 10 + /* "offset */
+ 5 + /* "> at " */
+ strlen(info.dli_fname) + /* "filename" */
+ 1; /* "\0" */
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p <%s+%d> at %s",
++ snprintf((char *) rval + clen, alen, "%p <%s+%d> at %s",
+ buffer[i], info.dli_sname, offset, info.dli_fname);
+ } else {
+ alen = 2 + /* "0x" */
+@@ -108,12 +108,15 @@
+ rval = realloc_safe(rval, clen + alen);
+ if (rval == NULL)
+ return NULL;
+- snprintf(cp, alen, "%p", buffer[i]);
++ snprintf((char *) rval + clen, alen, "%p", buffer[i]);
+ }
+- rval[i] = cp;
+- cp += alen;
++ rval[i] = (char *) clen;
++ clen += alen;
+ }
+
++ for (i = 0; i < size; i++)
++ rval[i] += (long) rval;
++
+ return rval;
+ }
+
+@@ -155,6 +158,6 @@
+ return;
+ snprintf(buf, len, "%p\n", buffer[i]);
+ }
+- write(fd, buf, len - 1);
++ write(fd, buf, strlen(buf));
+ }
+ }
diff --git a/repo/devel/libexecinfo/20-define-gnu-source.patch b/repo/devel/libexecinfo/20-define-gnu-source.patch
new file mode 100644
index 0000000..7255ecd
--- /dev/null
+++ b/repo/devel/libexecinfo/20-define-gnu-source.patch
@@ -0,0 +1,24 @@
+--- a/execinfo.c.orig
++++ b/execinfo.c
+@@ -26,6 +26,7 @@
+ * $Id: execinfo.c,v 1.3 2004/07/19 05:21:09 sobomax Exp $
+ */
+
++#define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/uio.h>
+ #include <dlfcn.h>
+--- a/stacktraverse.c.orig
++++ b/stacktraverse.c
+@@ -1,3 +1,4 @@
++#define _GNU_SOURCE
+ #include <stddef.h>
+
+ #include "stacktraverse.h"
+--- a/test.c.orig
++++ b/test.c
+@@ -1,3 +1,4 @@
++#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+
diff --git a/repo/devel/libexecinfo/30-linux-makefile.patch b/repo/devel/libexecinfo/30-linux-makefile.patch
new file mode 100644
index 0000000..6bc8a89
--- /dev/null
+++ b/repo/devel/libexecinfo/30-linux-makefile.patch
@@ -0,0 +1,44 @@
+--- a/Makefile.orig
++++ b/Makefile
+@@ -23,24 +23,25 @@
+ # SUCH DAMAGE.
+ #
+ # $Id: Makefile,v 1.3 2004/07/19 05:19:55 sobomax Exp $
++#
++# Linux Makefile by Matt Smith <mcs@darkregion.net>, 2011/01/04
+
+-LIB= execinfo
++CC=cc
++AR=ar
++EXECINFO_CFLAGS=$(CFLAGS) -O2 -pipe -fno-strict-aliasing -std=gnu99 -fstack-protector -c
++EXECINFO_LDFLAGS=$(LDFLAGS)
+
+-SRCS= stacktraverse.c stacktraverse.h execinfo.c execinfo.h
++all: static dynamic
+
+-INCS= execinfo.h
++static:
++ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c
++ $(CC) $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c
++ $(AR) rcs libexecinfo.a stacktraverse.o execinfo.o
+
+-SHLIB_MAJOR= 1
+-SHLIB_MINOR= 0
++dynamic:
++ $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) stacktraverse.c -o stacktraverse.So
++ $(CC) -fpic -DPIC $(EXECINFO_CFLAGS) $(EXECINFO_LDFLAGS) execinfo.c -o execinfo.So
++ $(CC) -shared -Wl,-soname,libexecinfo.so.1 -o libexecinfo.so.1 stacktraverse.So execinfo.So
+
+-NOPROFILE= yes
+-
+-DPADD= ${LIBM}
+-LDADD= -lm
+-
+-#WARNS?= 4
+-
+-#stacktraverse.c: gen.py
+-# ./gen.py > stacktraverse.c
+-
+-.include <bsd.lib.mk>
++clean:
++ rm -rf *.o *.So *.a *.so
diff --git a/repo/devel/libexecinfo.xibuild b/repo/devel/libexecinfo/libexecinfo.xibuild
index 67e1002..67e1002 100644
--- a/repo/devel/libexecinfo.xibuild
+++ b/repo/devel/libexecinfo/libexecinfo.xibuild
diff --git a/repo/devel/lld.xibuild b/repo/devel/lld/lld.xibuild
index c2dff7f..c2dff7f 100644
--- a/repo/devel/lld.xibuild
+++ b/repo/devel/lld/lld.xibuild
diff --git a/repo/devel/llvm-libunwind/libcxx-musl.patch b/repo/devel/llvm-libunwind/libcxx-musl.patch
new file mode 100644
index 0000000..358d4a3
--- /dev/null
+++ b/repo/devel/llvm-libunwind/libcxx-musl.patch
@@ -0,0 +1,28 @@
+Patch-Source: https://github.com/void-linux/void-packages/blob/74f16232621ca8dfb6d244beff1df35a6df1647f/srcpkgs/llvm12/patches/libcxx-musl.patch
+
+--- a/libcxx/include/locale
++++ b/libcxx/include/locale
+@@ -742,7 +742,11 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
+ typename remove_reference<decltype(errno)>::type __save_errno = errno;
+ errno = 0;
+ char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++ long long __ll = strtoll(__a, &__p2, __base);
++#else
+ long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+ typename remove_reference<decltype(errno)>::type __current_errno = errno;
+ if (__current_errno == 0)
+ errno = __save_errno;
+@@ -782,7 +786,11 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
+ typename remove_reference<decltype(errno)>::type __save_errno = errno;
+ errno = 0;
+ char *__p2;
++#if defined(__linux__) && !defined(__GLIBC__)
++ unsigned long long __ll = strtoull(__a, &__p2, __base);
++#else
+ unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++#endif
+ typename remove_reference<decltype(errno)>::type __current_errno = errno;
+ if (__current_errno == 0)
+ errno = __save_errno;
diff --git a/repo/devel/llvm-libunwind/libunwind-link-libssp.patch b/repo/devel/llvm-libunwind/libunwind-link-libssp.patch
new file mode 100644
index 0000000..ae819fe
--- /dev/null
+++ b/repo/devel/llvm-libunwind/libunwind-link-libssp.patch
@@ -0,0 +1,20 @@
+--- a/libunwind/src/CMakeLists.txt
++++ b/libunwind/src/CMakeLists.txt
+@@ -129,7 +129,7 @@
+ else()
+ target_compile_options(unwind_shared PRIVATE -fno-rtti)
+ endif()
+- target_link_libraries(unwind_shared PRIVATE ${LIBUNWIND_LIBRARIES})
++ target_link_libraries(unwind_shared PRIVATE ${LIBUNWIND_LIBRARIES} -lssp_nonshared)
+ set_target_properties(unwind_shared
+ PROPERTIES
+ CXX_EXTENSIONS OFF
+@@ -157,7 +157,7 @@
+ else()
+ target_compile_options(unwind_static PRIVATE -fno-rtti)
+ endif()
+- target_link_libraries(unwind_static PRIVATE ${LIBUNWIND_LIBRARIES})
++ target_link_libraries(unwind_static PRIVATE ${LIBUNWIND_LIBRARIES} -lssp_nonshared)
+ set_target_properties(unwind_static
+ PROPERTIES
+ CXX_EXTENSIONS OFF
diff --git a/repo/devel/llvm-libunwind.xibuild b/repo/devel/llvm-libunwind/llvm-libunwind.xibuild
index 9c61c31..9c61c31 100644
--- a/repo/devel/llvm-libunwind.xibuild
+++ b/repo/devel/llvm-libunwind/llvm-libunwind.xibuild
diff --git a/repo/devel/llvm.xibuild b/repo/devel/llvm/llvm.xibuild
index f1eaf13..f1eaf13 100644
--- a/repo/devel/llvm.xibuild
+++ b/repo/devel/llvm/llvm.xibuild
diff --git a/repo/devel/m4.xibuild b/repo/devel/m4/m4.xibuild
index e6ccf14..e6ccf14 100644
--- a/repo/devel/m4.xibuild
+++ b/repo/devel/m4/m4.xibuild
diff --git a/repo/devel/make.xibuild b/repo/devel/make/make.xibuild
index bb4412f..bb4412f 100644
--- a/repo/devel/make.xibuild
+++ b/repo/devel/make/make.xibuild
diff --git a/repo/devel/meson.xibuild b/repo/devel/meson/meson.xibuild
index f445bc4..f445bc4 100644
--- a/repo/devel/meson.xibuild
+++ b/repo/devel/meson/meson.xibuild
diff --git a/repo/devel/mpc.xibuild b/repo/devel/mpc/mpc.xibuild
index f9c9477..f9c9477 100644
--- a/repo/devel/mpc.xibuild
+++ b/repo/devel/mpc/mpc.xibuild
diff --git a/repo/devel/nasm.xibuild b/repo/devel/nasm/nasm.xibuild
index b8d7fd6..b8d7fd6 100644
--- a/repo/devel/nasm.xibuild
+++ b/repo/devel/nasm/nasm.xibuild
diff --git a/repo/devel/ninja.xibuild b/repo/devel/ninja/ninja.xibuild
index 8ae4868..8ae4868 100644
--- a/repo/devel/ninja.xibuild
+++ b/repo/devel/ninja/ninja.xibuild
diff --git a/repo/devel/patch.xibuild b/repo/devel/patch/patch.xibuild
index 015aeeb..015aeeb 100644
--- a/repo/devel/patch.xibuild
+++ b/repo/devel/patch/patch.xibuild
diff --git a/repo/devel/pkg-config.xibuild b/repo/devel/pkg-config/pkg-config.xibuild
index 3db8dfd..3db8dfd 100644
--- a/repo/devel/pkg-config.xibuild
+++ b/repo/devel/pkg-config/pkg-config.xibuild
diff --git a/repo/devel/rustc/files/check-rustc b/repo/devel/rustc/files/check-rustc
new file mode 100644
index 0000000..d4b85be
--- /dev/null
+++ b/repo/devel/rustc/files/check-rustc
@@ -0,0 +1,109 @@
+#!/bin/sh
+# vim: set ts=4:
+set -eu
+
+RUSTC="$1"
+TMPDIR="$(pwd)/.tmp-${0##*/}-$RANDOM"
+failed=0
+
+unset RUST_BACKTRACE
+unset RUSTC_CRT_STATIC
+
+
+_rustc() {
+ printf '\n$ rustc %s\n' "$*"
+ "$RUSTC" "$@"
+}
+
+die() {
+ printf '\033[1;31mERROR:\033[0m %s\n' "$1" >&2 # bold red
+ exit 1
+}
+
+fail() {
+ printf '\033[1;31mFAIL:\033[0m %s\n' "$1" >&2 # bold red
+ failed=$(( failed + 1 ))
+}
+
+assert_dynamic() {
+ readelf -l "$1" | grep -Fqw INTERP \
+ && readelf -d "$1" | grep -Fqw NEEDED || {
+ fail "$1 is not a dynamic executable!"
+ readelf -ld "$1"
+ }
+}
+
+assert_ok() {
+ "$1" || fail "$1 exited with status $?"
+}
+
+assert_panic() {
+ local status=0
+ "$1" || status=$? && [ "$status" = 101 ] \
+ || fail "$1 exited with status $status, but expected 101"
+}
+
+assert_pie() {
+ readelf -d "$1" | grep -Fw FLAGS_1 | grep -Fqw PIE || {
+ fail "$1 is not a PIE executable!"
+ readelf -d "$1"
+ }
+}
+
+assert_static() {
+ test -f "$1" \
+ && ! readelf -l "$1" | grep -Fqw INTERP \
+ && ! readelf -d "$1" | grep -Fqw NEEDED || {
+ fail "$1 is not a static executable!"
+ readelf -ld "$1"
+ }
+}
+
+
+#-------------------- M a i n --------------------
+
+test -d "$TMPDIR" && die "$TMPDIR already exists!"
+mkdir -p "$TMPDIR"
+trap "rm -R '$TMPDIR'" EXIT
+
+cd "$TMPDIR"
+
+cat >> hello_world.rs <<-EOF
+ fn main() {
+ println!("Hello, world!");
+ }
+EOF
+
+_rustc hello_world.rs
+assert_ok ./hello_world
+assert_dynamic hello_world
+assert_pie hello_world
+rm -f hello_world
+
+_rustc -C target-feature=-crt-static hello_world.rs
+assert_ok ./hello_world
+assert_dynamic hello_world
+assert_pie hello_world
+rm -f hello_world
+
+_rustc -C target-feature=+crt-static hello_world.rs
+assert_ok ./hello_world
+assert_static hello_world
+assert_pie hello_world
+rm -f hello_world
+
+
+cat >> panic.rs <<-EOF
+ fn main() {
+ panic!("This should panic");
+ }
+EOF
+
+_rustc -C target-feature=-crt-static panic.rs
+assert_panic ./panic
+
+_rustc -C target-feature=+crt-static panic.rs
+assert_panic ./panic
+
+
+[ "$failed" -eq 0 ] || die "$failed assertion(s) has failed"
diff --git a/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch b/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
new file mode 100644
index 0000000..30cb66f
--- /dev/null
+++ b/repo/devel/rustc/patches/0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch
@@ -0,0 +1,24 @@
+Additions for build.rs by q66, necessary for our musl setup.
+
+From 1eb558f246269606c6d8d73824ef6b44fa10764e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sat, 9 Sep 2017 00:14:16 -0500
+Subject: [PATCH 06/16] Prefer libgcc_eh over libunwind for musl
+
+---
+ src/libunwind/lib.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
+index 9182e349b19..0377fbb58fc 100644
+--- a/library/unwind/src/lib.rs
++++ b/library/unwind/src/lib.rs
+@@ -51,7 +51,7 @@
+ #[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ } else {
+- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
++ #[link(name = "gcc_eh", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
+ extern "C" {}
+ }
diff --git a/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch b/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch
new file mode 100644
index 0000000..e8ff8b7
--- /dev/null
+++ b/repo/devel/rustc/patches/0007-do-not-install-libunwind-source.patch
@@ -0,0 +1,19 @@
+From: Dominic Meiser <alpine@msrd0.de>
+Date: Tue, 22 Dec 2020 23:31:28 +0100
+Subject: [PATCH] Do not install libunwind source
+
+This was added in rustc 1.48, but is incompatible with the Alpine Linux package since it removes all bundled
+dependencies prior to building.
+
+diff -Naur rustc-1.48.0-src.orig/src/bootstrap/dist.rs rustc-1.48.0-src/src/bootstrap/dist.rs
+--- rustc-1.48.0-src.orig/src/bootstrap/dist.rs 2020-12-22 16:39:30.504249113 +0100
++++ rustc-1.48.0-src/src/bootstrap/dist.rs 2020-12-22 16:42:08.663006830 +0100
+@@ -1016,7 +1016,7 @@
+ copy_src_dirs(
+ builder,
+ &builder.src,
+- &["library", "src/llvm-project/libunwind"],
++ &["library"],
+ &[
+ // not needed and contains symlinks which rustup currently
+ // chokes on when unpacking.
diff --git a/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch b/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch
new file mode 100644
index 0000000..21be36f
--- /dev/null
+++ b/repo/devel/rustc/patches/alpine-move-py-scripts-to-share.patch
@@ -0,0 +1,23 @@
+--- a/src/etc/rust-gdb
++++ b/src/etc/rust-gdb
+@@ -12,7 +12,7 @@
+
+ # Find out where the pretty printer Python module is
+ RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
+-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
++GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust/etc"
+
+ # Run GDB with the additional arguments that load the pretty printers
+ # Set the environment variable `RUST_GDB` to overwrite the call to a
+ # Set the environment variable `RUST_GDB` to overwrite the call to a
+--- a/src/etc/rust-lldb
++++ b/src/etc/rust-lldb
+@@ -8,7 +8,7 @@
+
+ # Find out where to look for the pretty printer Python module
+ RUSTC_SYSROOT=$(rustc --print sysroot)
+-RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"
++RUST_LLDB="$RUSTC_SYSROOT/share/rust/etc"
+
+ lldb=lldb
+ if [ -f "$RUST_LLDB" ]; then
diff --git a/repo/devel/rustc/patches/alpine-target.patch b/repo/devel/rustc/patches/alpine-target.patch
new file mode 100644
index 0000000..2392cdd
--- /dev/null
+++ b/repo/devel/rustc/patches/alpine-target.patch
@@ -0,0 +1,191 @@
+From: Shiz <hi@shiz.me>
+Updated by Rasmus Thomsen <oss@cogitri.dev> on 28th of July 2019
+Updated again by Ariadne Conill <ariadne@dereferenced.org> on 31 October 2020
+Date: Thu, 20 Aug 2017 01:52:36 +0200
+Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200
+Subject: [PATCH] Add Alpine targets
+
+This adds `$arch-alpine-linux-musl` targets to Rust to encode our toolchain
+and distribution-specific quirks instead of polluting the main musl target of
+`$arch-unknown-linux-musl`.
+
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/aarch64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::aarch64_unknown_linux_musl::target();
++
++ base.llvm_target = "aarch64-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv6_alpine_linux_musleabihf.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::arm_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/armv7_alpine_linux_musleabihf.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::armv7_unknown_linux_musleabihf::target();
++
++ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/i586_alpine_linux_musl.rs
+@@ -0,0 +1,14 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::i686_unknown_linux_musl::target();
++
++ base.options.cpu = "pentium4".to_string();
++ base.llvm_target = "i586-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- rustc-1.48.0-src.orig/compiler/rustc_target/src/spec/mod.rs
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/mod.rs
+@@ -490,6 +490,16 @@
+ }
+
+ supported_targets! {
++ ("i586-alpine-linux-musl", i586_alpine_linux_musl),
++ ("x86_64-alpine-linux-musl", x86_64_alpine_linux_musl),
++ ("aarch64-alpine-linux-musl", aarch64_alpine_linux_musl),
++ ("armv6-alpine-linux-musleabihf", armv6_alpine_linux_musleabihf),
++ ("armv7-alpine-linux-musleabihf", armv7_alpine_linux_musleabihf),
++ ("powerpc-alpine-linux-musl", powerpc_alpine_linux_musl),
++ ("powerpc64-alpine-linux-musl", powerpc64_alpine_linux_musl),
++ ("powerpc64le-alpine-linux-musl", powerpc64le_alpine_linux_musl),
++ ("s390x-alpine-linux-musl", s390x_alpine_linux_musl),
++ ("riscv64-alpine-linux-musl", riscv64_alpine_linux_musl),
+ ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
+ ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
+ ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc64le_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc64le_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/powerpc_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::powerpc_unknown_linux_musl::target();
++
++ base.llvm_target = "powerpc-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/s390x_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::s390x_unknown_linux_musl::target();
++
++ base.llvm_target = "s390x-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.48.0-src/compiler/rustc_target/src/spec/x86_64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::x86_64_unknown_linux_musl::target();
++
++ base.llvm_target = "x86_64-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
+--- /dev/null
++++ rustc-1.52.1-src/compiler/rustc_target/src/spec/riscv64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::Target;
++
++pub fn target() -> Target {
++ let mut base = super::riscv64gc_unknown_linux_musl::target();
++
++ base.llvm_target = "riscv64-alpine-linux-musl".to_string();
++ base.options.vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ base
++}
diff --git a/repo/devel/rustc/patches/install-template-shebang.patch b/repo/devel/rustc/patches/install-template-shebang.patch
new file mode 100644
index 0000000..e81b579
--- /dev/null
+++ b/repo/devel/rustc/patches/install-template-shebang.patch
@@ -0,0 +1,10 @@
+The script seems to be POSIX-sh (+ local) compatible.
+
+--- a/src/tools/rust-installer/install-template.sh
++++ b/src/tools/rust-installer/install-template.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+ # file at the top-level directory of this distribution and at
+ # http://rust-lang.org/COPYRIGHT.
diff --git a/repo/devel/rustc/patches/link-musl-dynamically.patch b/repo/devel/rustc/patches/link-musl-dynamically.patch
new file mode 100644
index 0000000..55d02a3
--- /dev/null
+++ b/repo/devel/rustc/patches/link-musl-dynamically.patch
@@ -0,0 +1,17 @@
+--- rustc-1.58.0-src.orig/vendor/libc/src/unix/mod.rs
++++ rustc-1.58.0-src/vendor/libc/src/unix/mod.rs
+@@ -329,11 +329,11 @@
+ #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+ extern {}
+ } else if #[cfg(target_env = "musl")] {
++ #[link(name = "c")]
++ extern {}
+ #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", kind = "static", modifiers = "-bundle",
++ link(name = "gcc", kind = "static", modifiers = "-bundle",
+ cfg(target_feature = "crt-static")))]
+- #[cfg_attr(feature = "rustc-dep-of-std",
+- link(name = "c", cfg(not(target_feature = "crt-static"))))]
+ extern {}
+ } else if #[cfg(target_os = "emscripten")] {
+ #[link(name = "c")]
diff --git a/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch b/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch
new file mode 100644
index 0000000..1771ffe
--- /dev/null
+++ b/repo/devel/rustc/patches/musl-fix-linux_musl_base.patch
@@ -0,0 +1,23 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Sat, 08 Aug 2016 15:06:00 +0200
+Subject: [PATCH] Fix linux_musl_base for native musl host
+
+See https://github.com/rust-lang/rust/pull/40113
+
+--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
++++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
+@@ -5,12 +5,9 @@
+ let mut base = super::linux_base::opts();
+
+ base.env = "musl".to_string();
+- base.pre_link_objects_fallback = crt_objects::pre_musl_fallback();
+- base.post_link_objects_fallback = crt_objects::post_musl_fallback();
+- base.crt_objects_fallback = Some(CrtObjectsFallback::Musl);
+
+ // These targets statically link libc by default
+- base.crt_static_default = true;
++ base.crt_static_default = false;
+
+ base
+ }
+
diff --git a/repo/devel/rustc/patches/need-rpath.patch b/repo/devel/rustc/patches/need-rpath.patch
new file mode 100644
index 0000000..5ab8377
--- /dev/null
+++ b/repo/devel/rustc/patches/need-rpath.patch
@@ -0,0 +1,62 @@
+From: Shiz <hi@shiz.me>
+Date: Thu, 20 Aug 2017 01:48:22 +0200
+Subject: [PATCH] Add need_rpath target option to force RPATH generation
+
+This adds a `need_rpath` option to the target options in order to implicitly
+have the equivalent of `-C rpath` specified by default for final products
+(executables and dynamic libraries), so that RPATHs are always added.
+
+We have to skip this step in the bootstrap phase as it does its own manual
+RPATH additions, but unfortunately there's no clean way to detect this.
+As such, we have to resort to checking the `RUSTC_BOOTSTRAP` variable.
+Hacky hacky!
+
+--- a/compiler/rustc_target/src/spec/mod.rs
++++ b/compiler/rustc_target/src/spec/mod.rs
+@@ -379,6 +379,8 @@
+ pub allows_weak_linkage: bool,
+ /// Whether the linker support rpaths or not. Defaults to false.
+ pub has_rpath: bool,
++ /// Whether to force rpath support on by default. Defaults to false.
++ pub need_rpath: bool,
+ /// Whether to disable linking to the default libraries, typically corresponds
+ /// to `-nodefaultlibs`. Defaults to true.
+ pub no_default_libraries: bool,
+@@ -519,6 +519,7 @@
+ linker_is_gnu: false,
+ allows_weak_linkage: true,
+ has_rpath: false,
++ need_rpath: false,
+ no_default_libraries: true,
+ position_independent_executables: false,
+ static_position_independent_executables: false,
+@@ -776,6 +776,7 @@
+ key!(linker_is_gnu, bool);
+ key!(allows_weak_linkage, bool);
+ key!(has_rpath, bool);
++ key!(need_rpath, bool);
+ key!(no_default_libraries, bool);
+ key!(position_independent_executables, bool);
+ key!(static_position_independent_executables, bool);
+@@ -980,6 +980,7 @@
+ target_option_val!(linker_is_gnu);
+ target_option_val!(allows_weak_linkage);
+ target_option_val!(has_rpath);
++ target_option_val!(need_rpath);
+ target_option_val!(no_default_libraries);
+ target_option_val!(position_independent_executables);
+ target_option_val!(static_position_independent_executables);
+--- a/compiler/rustc_codegen_ssa/src/back/link.rs.orig
++++ b/compiler/rustc_codegen_ssa/src/back/link.rs
+@@ -1675,7 +1675,10 @@
+ // FIXME (#2397): At some point we want to rpath our guesses as to
+ // where extern libraries might live, based on the
+ // add_lib_search_paths
+- if sess.opts.cg.rpath {
++ // XXX: hacky hacky
++ let bootstrap = env::var("RUSTC_BOOTSTRAP").is_ok();
++ if !bootstrap && !sess.crt_static(None) &&
++ (sess.opts.cg.rpath || sess.target.options.need_rpath) {
+ let libs = codegen_results
+ .crate_info
+ .used_crates
diff --git a/repo/devel/rustc/patches/need-ssp_nonshared.patch b/repo/devel/rustc/patches/need-ssp_nonshared.patch
new file mode 100644
index 0000000..f1adf20
--- /dev/null
+++ b/repo/devel/rustc/patches/need-ssp_nonshared.patch
@@ -0,0 +1,13 @@
+--- a/library/std/src/sys/unix/mod.rs.orig 2021-02-11 18:34:14.479832268 +0100
++++ b/library/std/src/sys/unix/mod.rs 2021-02-11 18:38:28.078987749 +0100
+@@ -243,6 +243,9 @@
+ #[link(name = "log")]
+ #[link(name = "gcc")]
+ extern "C" {}
++ } else if #[cfg(all(target_os = "linux", target_env = "musl"))] {
++ #[link(name = "ssp_nonshared")]
++ extern "C" {}
+ } else if #[cfg(target_os = "freebsd")] {
+ #[link(name = "execinfo")]
+ #[link(name = "pthread")]
+
diff --git a/repo/devel/rustc.xibuild b/repo/devel/rustc/rustc.xibuild
index 758dafe..758dafe 100644
--- a/repo/devel/rustc.xibuild
+++ b/repo/devel/rustc/rustc.xibuild
diff --git a/repo/devel/scdoc.xibuild b/repo/devel/scdoc/scdoc.xibuild
index d6fc4de..d6fc4de 100644
--- a/repo/devel/scdoc.xibuild
+++ b/repo/devel/scdoc/scdoc.xibuild
diff --git a/repo/devel/sgml-common.xibuild b/repo/devel/sgml-common/sgml-common.xibuild
index 70fe070..70fe070 100644
--- a/repo/devel/sgml-common.xibuild
+++ b/repo/devel/sgml-common/sgml-common.xibuild
diff --git a/repo/devel/strace/disable-fortify.patch b/repo/devel/strace/disable-fortify.patch
new file mode 100644
index 0000000..26b2978
--- /dev/null
+++ b/repo/devel/strace/disable-fortify.patch
@@ -0,0 +1,39 @@
+Subject: [PATCH] don't use fortify-headers on netlink test sources
+From: A. Wilcox <AWilcox@Wilcox-Tech.com>
+
+We can't use fortify-headers on netlink tests because it tests what happens
+when a buffer overrun occurs.
+
+--- strace-4.18/tests/netlink_protocol.c.old 2017-07-05 07:08:09.000000000 +0000
++++ strace-4.18/tests/netlink_protocol.c 2017-08-17 01:09:45.822502012 +0000
+@@ -28,6 +28,8 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#define _FORTIFY_SOURCE 0
++
+ #include "tests.h"
+
+ #ifdef HAVE_SYS_XATTR_H
+--- strace-4.18/tests/netlink_sock_diag.c.old 2017-07-05 07:08:09.000000000 +0000
++++ strace-4.18/tests/netlink_sock_diag.c 2017-08-17 01:10:00.935807300 +0000
+@@ -27,6 +27,8 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#define _FORTIFY_SOURCE 0
++
+ #include "tests.h"
+ #include <stdio.h>
+ #include <string.h>
+--- strace-4.18/tests/nlattr.c.old 2017-07-05 07:08:09.000000000 +0000
++++ strace-4.18/tests/nlattr.c 2017-08-17 01:10:11.862453682 +0000
+@@ -28,6 +28,8 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
++#define _FORTIFY_SOURCE 0
++
+ #include "tests.h"
+
+ #include <stdio.h>
diff --git a/repo/devel/strace/nlattr-fix.patch b/repo/devel/strace/nlattr-fix.patch
new file mode 100644
index 0000000..6d480fa
--- /dev/null
+++ b/repo/devel/strace/nlattr-fix.patch
@@ -0,0 +1,21 @@
+--- strace-4.18/tests/nlattr.c.old 2017-07-05 07:08:09.000000000 +0000
++++ strace-4.18/tests/nlattr.c 2017-08-17 00:25:26.734218699 +0000
+@@ -61,7 +61,7 @@
+ };
+ struct msg *msg;
+ struct nlattr *nla;
+- unsigned int msg_len;
++ uint32_t msg_len;
+ long rc;
+
+ /* fetch fail: len < sizeof(struct nlattr) */
+@@ -259,7 +259,7 @@
+ };
+ struct msg *msg;
+ struct nlattr *nla;
+- unsigned int msg_len;
++ uint32_t msg_len;
+ long rc;
+
+ msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla);
+
diff --git a/repo/devel/strace.xibuild b/repo/devel/strace/strace.xibuild
index e523146..e523146 100644
--- a/repo/devel/strace.xibuild
+++ b/repo/devel/strace/strace.xibuild
diff --git a/repo/devel/swig.xibuild b/repo/devel/swig/swig.xibuild
index 5d2471c..5d2471c 100644
--- a/repo/devel/swig.xibuild
+++ b/repo/devel/swig/swig.xibuild
diff --git a/repo/devel/texinfo.xibuild b/repo/devel/texinfo/texinfo.xibuild
index b53afe6..b53afe6 100644
--- a/repo/devel/texinfo.xibuild
+++ b/repo/devel/texinfo/texinfo.xibuild
diff --git a/repo/devel/uthash.xibuild b/repo/devel/uthash/uthash.xibuild
index e9dd494..e9dd494 100644
--- a/repo/devel/uthash.xibuild
+++ b/repo/devel/uthash/uthash.xibuild
diff --git a/repo/devel/vala.xibuild b/repo/devel/vala/vala.xibuild
index a457cca..a457cca 100644
--- a/repo/devel/vala.xibuild
+++ b/repo/devel/vala/vala.xibuild
diff --git a/repo/devel/waf.xibuild b/repo/devel/waf/waf.xibuild
index a479282..a479282 100644
--- a/repo/devel/waf.xibuild
+++ b/repo/devel/waf/waf.xibuild
diff --git a/repo/devel/xmlto.xibuild b/repo/devel/xmlto/xmlto.xibuild
index 0efc381..0efc381 100644
--- a/repo/devel/xmlto.xibuild
+++ b/repo/devel/xmlto/xmlto.xibuild
diff --git a/repo/devel/xorg-cf-files.xibuild b/repo/devel/xorg-cf-files/xorg-cf-files.xibuild
index a99bcdc..a99bcdc 100644
--- a/repo/devel/xorg-cf-files.xibuild
+++ b/repo/devel/xorg-cf-files/xorg-cf-files.xibuild