From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12120 invoked by alias); 3 Nov 2010 22:31:34 -0000 Received: (qmail 12021 invoked by uid 22791); 3 Nov 2010 22:31:33 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,FSL_RU_URL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from newsmtp5.atmel.com (HELO sjogate2.atmel.com) (204.2.163.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Nov 2010 22:31:28 +0000 Received: from csomb01.corp.atmel.com ([10.95.30.150]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id oA3MSeSp001889; Wed, 3 Nov 2010 15:28:40 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [patch] Separate {OS,CPU}_CPP_BUILTINS macros into C-family and language-independent macros Date: Wed, 03 Nov 2010 22:34:00 -0000 Message-ID: <258DDD1F44B6ED4AAFD4370847CF58D50DA7D996@csomb01.corp.atmel.com> In-Reply-To: <1D974441-C894-4F24-A0D1-7B693044B2BF@gmail.com> References: <1D974441-C894-4F24-A0D1-7B693044B2BF@gmail.com> From: "Weddington, Eric" To: "FX" , , "gfortran List" Cc: "Michael Meissner" , "Rainer Orth" , , 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: 2010-11/txt/msg00373.txt.bz2 =20 > -----Original Message----- > From: FX [mailto:fxcoudert@gmail.com]=20 > Sent: Wednesday, November 03, 2010 3:27 PM > To: gcc-patches@gcc.gnu.org; gfortran List > Cc: Michael Meissner; Rainer Orth; chertykov@gmail.com;=20 > aesok@post.ru; Weddington, Eric > Subject: [patch] Separate {OS,CPU}_CPP_BUILTINS macros into=20 > C-family and language-independent macros >=20 > See below for the description of the patch; this take n+1=20 > incorporates suggestions by Michael Meissner and Rainer Orth,=20 > with the following exceptions: >=20 > -- As avr.c includes new headers (cpplib.h and=20 > cppbuiltin.h), I wanted to update its dependencies in the=20 > target configuration file (t-avr), but to my surprise, this=20 > file doesn't contain any mention of avr.o. In fact, I failed=20 > to find any by grepping the whole tree, so I'm a little=20 > unsure how this can work (and apparently it does). Could the=20 > maintainers help me here? Hmm. AFAICT, in looking through the history of that file, the first time th= at it contained any dependency information was June 23, 2009 (revision 1488= 68) and it wasn't for avr.o. I don't think it ever contained dependency inf= ormation for avr.o.=20 =20 > The attached patch fixes PR 42954: when Fortran moved to=20 > using libcpp directly from the front-end (instead of calling=20 > cc1 to do its preprocessing), we lost all target-specific CPP=20 > built-in macros. The issue is that part of the code in=20 > TARGET_OS_CPP_BUILTINS and TARGET_CPU_CPP_BUILTINS depends on=20 > C-only flags, and thus cannot be moved to a directory outside=20 > gcc/c-family/. >=20 > The patch moves this C-only code to specific=20 > TARGET_OS_CPP_BUILTINS_CFAMILY and=20 > TARGET_CPU_CPP_BUILTINS_CFAMILY macros. I manually audited=20 > all the targets in config/ twice, to check that I did not=20 > leave any code behind. I have bootstrapped and regtested an=20 > all-language compiler on x86_64-linux and i686-darwin. I have=20 > also built C and Fortran cross-compilers (make all-gcc &&=20 > make fortran) for the following targets (which cover all=20 > gcc/config/ files changed): >=20 > avr-elf >=20 > In all cases, the cross-compiler built successfully and=20 > seemed to work. In each case, I checked a few of the=20 > target-specific macros (but did not check all of them). That's news to me: I didn't know that you could now build the Fortran compi= ler for the AVR. (Not that anyone would seriously use it, but.. you never k= now.) Last I heard, the Fortran FE couldn't be built for the AVR because th= at port only has 32-bit doubles. See gcc bug #34040. Thanks for doing this work. :-) Eric Weddington