diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-01-01 15:56:15 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-01-01 15:56:15 +0000 |
commit | d8a85911b45a6f0dfc0f4ba00961346f1777b406 (patch) | |
tree | 9b64c0db6a647e89f47a7bf50d2c17ef6e7bce59 /lib/clang | |
parent | 10acf139ecfe0e77962fbc989997e9d9e5ca744b (diff) | |
download | FreeBSD-src-d8a85911b45a6f0dfc0f4ba00961346f1777b406.zip FreeBSD-src-d8a85911b45a6f0dfc0f4ba00961346f1777b406.tar.gz |
Instead of forcing -O1 on PowerPC for LLVM and clang, fix the actual
problem by adding -fno-strict-aliasing to CFLAGS. Since this is a global
issue that just happened to manifest on PowerPC, add this to CFLAGS
unconditionally.
MFC after: 1 week
Diffstat (limited to 'lib/clang')
-rw-r--r-- | lib/clang/clang.build.mk | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 47b6795..2c059f5 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -8,10 +8,8 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG -# Correct for gcc miscompilation when compiling on PPC with -O2 -.if ${MACHINE_CPUARCH} == "powerpc" -CFLAGS+= -O1 -.endif +# LLVM is not strict aliasing safe as of 12/31/2011 +CFLAGS+= -fno-strict-aliasing TARGET_ARCH?= ${MACHINE_ARCH} CFLAGS+=-DLLVM_HOSTTRIPLE=\"${TARGET_ARCH:C/amd64/x86_64/}-unknown-freebsd10.0\" |