aports/testing/llvm-next/0009-Switch-on-default-now-relro-without-reading-osrelease.patch

21 lines
712 B
Diff

Switch on default now/relro without depending on ID=alpine in /etc/os-release
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -222,16 +222,11 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
Distro Distro(D.getVFS(), Triple);
- if (Distro.IsAlpineLinux() || Triple.isAndroid()) {
ExtraOpts.push_back("-z");
ExtraOpts.push_back("now");
- }
- if (Distro.IsOpenSUSE() || Distro.IsUbuntu() || Distro.IsAlpineLinux() ||
- Triple.isAndroid()) {
ExtraOpts.push_back("-z");
ExtraOpts.push_back("relro");
- }
// Note, lld from 11 onwards default max-page-size to 65536 for both ARM and
// AArch64.