summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpascal <pascal@openbsd.org>2016-09-27 16:50:37 +0000
committerpascal <pascal@openbsd.org>2016-09-27 16:50:37 +0000
commite8bf6990ac915d95b92decbd872e3727b3bee947 (patch)
tree1b93c713b6922bf297fd464e861c9199edf6590f
parentWait until the BSSID is known before adding the MAC context to iwm firmware. (diff)
downloadwireguard-openbsd-e8bf6990ac915d95b92decbd872e3727b3bee947.tar.xz
wireguard-openbsd-e8bf6990ac915d95b92decbd872e3727b3bee947.zip
Disable -fstrict-aliasing per default on OpenBSD.
cluebat & ok kettenis@
-rw-r--r--gnu/llvm/tools/clang/lib/Driver/Tools.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
index 81bd5da9276..656a8fbbdaf 100644
--- a/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/gnu/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -3746,9 +3746,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
OFastEnabled ? options::OPT_Ofast : options::OPT_fstrict_aliasing;
// We turn strict aliasing off by default if we're in CL mode, since MSVC
// doesn't do any TBAA.
- bool TBAAOnByDefault = !getToolChain().getDriver().IsCLMode();
+ bool StrictAliasingDefault = !getToolChain().getDriver().IsCLMode();
+ // We also turn off strict aliasing on OpenBSD.
+ if (getToolChain().getTriple().isOSOpenBSD())
+ StrictAliasingDefault = false;
if (!Args.hasFlag(options::OPT_fstrict_aliasing, StrictAliasingAliasOption,
- options::OPT_fno_strict_aliasing, TBAAOnByDefault))
+ options::OPT_fno_strict_aliasing, StrictAliasingDefault))
CmdArgs.push_back("-relaxed-aliasing");
if (!Args.hasFlag(options::OPT_fstruct_path_tbaa,
options::OPT_fno_struct_path_tbaa))