[PATCH] D56047: [Driver] Disable -faddrsig on Gentoo by default

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 23 07:10:58 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL350028: [Driver] Disable -faddrsig on Gentoo by default (authored by mgorny, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D56047?vs=179415&id=179442#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56047/new/

https://reviews.llvm.org/D56047

Files:
  cfe/trunk/lib/Driver/ToolChains/Clang.cpp
  cfe/trunk/test/Driver/addrsig.c
  cfe/trunk/test/lit.cfg.py


Index: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp
@@ -25,6 +25,7 @@
 #include "clang/Basic/LangOptions.h"
 #include "clang/Basic/ObjCRuntime.h"
 #include "clang/Basic/Version.h"
+#include "clang/Driver/Distro.h"
 #include "clang/Driver/DriverDiagnostic.h"
 #include "clang/Driver/Options.h"
 #include "clang/Driver/SanitizerArgs.h"
@@ -5290,6 +5291,7 @@
                     TC.getTriple().isOSBinFormatCOFF()) &&
                       !TC.getTriple().isPS4() &&
                       !TC.getTriple().isOSNetBSD() &&
+                      !Distro(D.getVFS()).IsGentoo() &&
                        TC.useIntegratedAs()))
     CmdArgs.push_back("-faddrsig");
 
Index: cfe/trunk/test/lit.cfg.py
===================================================================
--- cfe/trunk/test/lit.cfg.py
+++ cfe/trunk/test/lit.cfg.py
@@ -190,3 +190,6 @@
 macOSSDKVersion = lit.util.findPlatformSdkVersionOnMacOS(config, lit_config)
 if macOSSDKVersion is not None:
     config.available_features.add('macos-sdk-' + macOSSDKVersion)
+
+if os.path.exists('/etc/gentoo-release'):
+    config.available_features.add('gentoo')
Index: cfe/trunk/test/Driver/addrsig.c
===================================================================
--- cfe/trunk/test/Driver/addrsig.c
+++ cfe/trunk/test/Driver/addrsig.c
@@ -1,3 +1,6 @@
+// Gentoo disables -faddrsig by default
+// XFAIL: gentoo
+
 // RUN: %clang -### -target x86_64-unknown-linux -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s
 // RUN: %clang -### -target x86_64-pc-win32 -c %s 2>&1 | FileCheck -check-prefix=ADDRSIG %s
 // RUN: %clang -### -target x86_64-unknown-linux -fno-integrated-as -c %s 2>&1 | FileCheck -check-prefix=NO-ADDRSIG %s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56047.179442.patch
Type: text/x-patch
Size: 1837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181223/f1ad001d/attachment.bin>


More information about the cfe-commits mailing list