]> granicus.if.org Git - clang/commitdiff
Pass "-z relro" as two arguments. This works with both gnu ld and gold.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 8 Nov 2010 14:48:47 +0000 (14:48 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 8 Nov 2010 14:48:47 +0000 (14:48 +0000)
Patch by Frits van Bommel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118406 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp

index 57743e59a55c405e5844f3d75b7fe01415b7d054..6a1566636267443133011bfa68ff6a00c74224d6 100644 (file)
@@ -1360,8 +1360,10 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple)
 
   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");