Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 15:56:15 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r229169 - head/lib/clang
Message-ID:  <201201011556.q01FuF5V019342@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sun Jan  1 15:56:15 2012
New Revision: 229169
URL: http://svn.freebsd.org/changeset/base/229169

Log:
  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

Modified:
  head/lib/clang/clang.build.mk

Modified: head/lib/clang/clang.build.mk
==============================================================================
--- head/lib/clang/clang.build.mk	Sun Jan  1 09:12:21 2012	(r229168)
+++ head/lib/clang/clang.build.mk	Sun Jan  1 15:56:15 2012	(r229169)
@@ -8,10 +8,8 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG
 	-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\"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201011556.q01FuF5V019342>