From owner-svn-src-all@FreeBSD.ORG Sun Jan 1 16:24:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 574EC106564A; Sun, 1 Jan 2012 16:24:48 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id 2342C8FC14; Sun, 1 Jan 2012 16:24:47 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LX400000O9B2C00@smtpauth3.wiscmail.wisc.edu>; Sun, 01 Jan 2012 10:24:47 -0600 (CST) Received: from comporellon.tachypleus.net ([unknown] [76.210.61.211]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LX400F6MO99WL20@smtpauth3.wiscmail.wisc.edu>; Sun, 01 Jan 2012 10:24:46 -0600 (CST) Date: Sun, 01 Jan 2012 10:24:45 -0600 From: Nathan Whitehorn In-reply-to: <4F00859C.5020205@FreeBSD.org> To: Dimitry Andric Message-id: <4F0088CD.5010202@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.61.211 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.1.1.161517, SenderIP=76.210.61.211 References: <201201011556.q01FuF5V019342@svn.freebsd.org> <4F00859C.5020205@FreeBSD.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111113 Thunderbird/8.0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229169 - head/lib/clang X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 16:24:48 -0000 On 01/01/12 10:11, Dimitry Andric wrote: > On 2012-01-01 16:56, Nathan Whitehorn wrote: >> 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 > > Actually, LLVM is strict-aliasing safe, but not for gcc 4.2.1. :) > > There is some sort of problem with gcc's optimizer that made a few LLVM > tests fails mysteriously in the past. At a certain point, these > problems went away for x86, but apparently not for non-x86... > > In any case, this option should only have to be added when the compiler > is base gcc. Ah, interesting. I'm not quite sure how to express "is compiler base GCC", but I'm guessing you have more experience there. Would you mind fixing that? -Nathan