From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20711 invoked by alias); 6 Aug 2007 20:59:46 -0000 Received: (qmail 20563 invoked by uid 22791); 6 Aug 2007 20:59:45 -0000 X-Spam-Check-By: sourceware.org Received: from nz-out-0506.google.com (HELO nz-out-0506.google.com) (64.233.162.235) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 20:59:41 +0000 Received: by nz-out-0506.google.com with SMTP id s1so578669nze for ; Mon, 06 Aug 2007 13:59:40 -0700 (PDT) Received: by 10.142.239.11 with SMTP id m11mr265870wfh.1186433979488; Mon, 06 Aug 2007 13:59:39 -0700 (PDT) Received: by 10.142.99.11 with HTTP; Mon, 6 Aug 2007 13:59:39 -0700 (PDT) Message-ID: Date: Mon, 06 Aug 2007 20:59:00 -0000 From: "Andrew Pinski" To: "David Edelsohn" Subject: Re: [RFC] PowerPC processor and cache detection Cc: gcc-patches@gcc.gnu.org In-Reply-To: <200708062045.l76KjhhY029738@makai.watson.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200708062045.l76KjhhY029738@makai.watson.ibm.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00390.txt.bz2 On 8/6/07, David Edelsohn wrote: > The appended patch implements -mcpu=native detecting the processor > and cache on AIX, Darwin and Linux. Unfortunately, PPC Linux does not > communicate any cache information, so it only selects the processor. > > I am not sure whether to protect the Linux code with __ELF__ or > with __linux. > > +#ifdef GCC_VERSION Even though I know this is copied from driver-i386.c, it is wrong (PR 32787 records that bug). GCC_VERSION is always defined via ansidecl.h: #ifndef GCC_VERSION #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) #endif /* GCC_VERSION */ It would be better if you did: #if GCC_VERSION >= 0 Thanks, Andrew Pinski