Pass "-z relro" as two arguments. This works with both gnu ld and gold.
Patch by Frits van Bommel.
llvm-svn: 118406
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 57743e5..6a15666 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1360,8 +1360,10 @@
LinuxDistro Distro = DetectLinuxDistro(Arch);
- if (IsUbuntu(Distro))
- ExtraOpts.push_back("-z relro");
+ if (IsUbuntu(Distro)) {
+ ExtraOpts.push_back("-z");
+ ExtraOpts.push_back("relro");
+ }
if (Arch == llvm::Triple::arm)
ExtraOpts.push_back("-X");