From patchwork Thu Sep 30 20:00:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 66745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E4B0DB70D2 for ; Tue, 5 Oct 2010 09:02:27 +1100 (EST) Received: (qmail 11488 invoked by alias); 4 Oct 2010 22:02:24 -0000 Received: (qmail 11480 invoked by uid 22791); 4 Oct 2010 22:02:23 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL, BAYES_00, DATE_IN_PAST_96_XX, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e3.ny.us.ibm.com (HELO e3.ny.us.ibm.com) (32.97.182.143) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Oct 2010 22:02:18 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o94LjpDu013791 for ; Mon, 4 Oct 2010 17:45:51 -0400 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o94M2E7V470056 for ; Mon, 4 Oct 2010 18:02:14 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o94M2EfR008462 for ; Mon, 4 Oct 2010 16:02:14 -0600 Received: from hungry-tiger.westford.ibm.com (dyn9033048198.westford.ibm.com [9.33.48.198]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o94M2D1s008428; Mon, 4 Oct 2010 16:02:14 -0600 Received: by hungry-tiger.westford.ibm.com (Postfix, from userid 500) id DA4FFF868A; Thu, 30 Sep 2010 16:00:50 -0400 (EDT) Date: Thu, 30 Sep 2010 16:00:50 -0400 From: Michael Meissner To: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: [PATCH, committed] Fix ppc build breakage (PR target/45837) Message-ID: <20100930200050.GA13694@hungry-tiger.westford.ibm.com> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes the breakage that comes up when building GCC on a powerpc64-linux system due to the changes in the option handling submitted on the 29th. Powerpc64-linux defined TARGET_AIX to be TARGET_64BIT, while options-default.h had an #if TARGET_AIX in it. Before the option changes when in, the preprecessor would just use 0 for target flags, and use -m64/-m32 as the opions for 64/32-bit code. Under the new setup, target flags is a define into a struction, and the preprocessor doesn't like the . in the expression. I bootstraped it on a powerpc64-linux system using --with-cpu=default32. Unfortunately, it currently won't build defaulting to 64-bit compiles, due to interactions caused by the fix for PR 45807. Index: gcc/config/rs6000/aix.h =================================================================== --- gcc/config/rs6000/aix.h (revision 164732) +++ gcc/config/rs6000/aix.h (working copy) @@ -24,6 +24,10 @@ #undef TARGET_AIX #define TARGET_AIX 1 +/* Linux64.h wants to redefine TARGET_AIX based on -m64, but it can't be used + in the #if conditional in options-default.h, so provide another macro. */ +#define TARGET_AIX_OS 1 + /* AIX always has a TOC. */ #define TARGET_NO_TOC 0 #define TARGET_TOC 1 Index: gcc/config/rs6000/rs6000.h =================================================================== --- gcc/config/rs6000/rs6000.h (revision 164732) +++ gcc/config/rs6000/rs6000.h (working copy) @@ -46,6 +46,10 @@ #define TARGET_AIX 0 #endif +#ifndef TARGET_AIX_OS +#define TARGET_AIX_OS 0 +#endif + /* Control whether function entry points use a "dot" symbol when ABI_AIX. */ #define DOT_SYMBOLS 1 Index: gcc/config/rs6000/option-defaults.h =================================================================== --- gcc/config/rs6000/option-defaults.h (revision 164732) +++ gcc/config/rs6000/option-defaults.h (working copy) @@ -27,7 +27,7 @@ /* This header needs to be included after any other headers affecting TARGET_DEFAULT. */ -#if TARGET_AIX +#if TARGET_AIX_OS #define OPT_64 "maix64" #define OPT_32 "maix32" #else