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/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 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')