From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5059 invoked by alias); 20 Oct 2010 22:04:53 -0000 Received: (qmail 5050 invoked by uid 22791); 20 Oct 2010 22:04:52 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 22:04:47 +0000 Received: by wyb40 with SMTP id 40so4332716wyb.20 for ; Wed, 20 Oct 2010 15:04:45 -0700 (PDT) Received: by 10.227.127.134 with SMTP id g6mr62758wbs.54.1287612284553; Wed, 20 Oct 2010 15:04:44 -0700 (PDT) Received: from [192.168.0.101] (chufi.coudert.name [88.162.139.106]) by mx.google.com with ESMTPS id f14sm627151wbe.14.2010.10.20.15.04.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Oct 2010 15:04:43 -0700 (PDT) Subject: Re: [patch] Separate {OS,CPU}_CPP_BUILTINS macros into C-family and language-independent macros Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: FX In-Reply-To: <4CB9F146.30804@net-b.de> Date: Wed, 20 Oct 2010 22:34:00 -0000 Cc: Tobias Burnus , Ian Lance Taylor , Richard Henderson Content-Transfer-Encoding: quoted-printable Message-Id: References: <4D88077B-3233-4D15-94E6-13BE58D29AD5@gmail.com> <4CB9F146.30804@net-b.de> To: gcc-patches@gcc.gnu.org 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-10/txt/msg01762.txt.bz2 ping ** 2 http://gcc.gnu.org/ml/gcc-patches/2010-10/threads.html#00566 This patch needs global reviewers approval. > The attached patch fixes PR 42954: when Fortran moved to using libcpp dir= ectly from the front-end (instead of calling cc1 to do its preprocessing), = we lost all target-specific CPP built-in macros. The issue is that part of = the code in TARGET_OS_CPP_BUILTINS and TARGET_CPU_CPP_BUILTINS depends on C= -only flags, and thus cannot be moved to a directory outside gcc/c-family/. >=20 > The patch moves this C-only code to specific TARGET_OS_CPP_BUILTINS_CFAMI= LY and TARGET_CPU_CPP_BUILTINS_CFAMILY macros. I manually audited all the t= argets in config/ twice, to check that I did not leave any code behind. I h= ave bootstrapped and regtested an all-language compiler on x86_64-linux and= i686-darwin. I have also built C and Fortran cross-compilers (make all-gcc= && make fortran) for the following targets (which cover all gcc/config/ fi= les changed): >=20 > avr-elf > frv-elf > spu-elf > i386-pc-netware > alpha-linux > ia64-hpux > mips-linux > mips-sgi-irix6.5 > hppa2.0w-hp-hpux11.00 > sparc-sun-solaris2.10 > i686-pc-mingw32 > powerpc-darwin >=20 > In all cases, the cross-compiler built successfully and seemed to work. I= n each case, I checked a few of the target-specific macros (but did not che= ck all of them). >=20 >=20 > I also tried to build cross-compilers for the following i386-pc-interix3 = and alpha-dec-osf5.1, but they failed to build even without my patch: >=20 > -- i386-pc-interix3 fails to build winnt.c over use of undeclared use_p= e_aligned_common() > -- alpha-dec-osf5.1 fails to build mips-tfile.o >=20 > Rainer (as osf maintainer) is CC'ed to this mail. Interix hasn't seen a s= pecific patch for it (not part of mechanical changes) since 2003, and I don= 't know whom to forward this information to. >=20 >=20 > OK to commit?