From patchwork Fri Jul 15 13:56:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 104827 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 87B22B6EDF for ; Fri, 15 Jul 2011 23:57:01 +1000 (EST) Received: (qmail 30626 invoked by alias); 15 Jul 2011 13:56:58 -0000 Received: (qmail 30617 invoked by uid 22791); 15 Jul 2011 13:56:57 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_ZJ X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jul 2011 13:56:26 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 656BB7BD; Fri, 15 Jul 2011 15:56:24 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TmqX5A4Igmri; Fri, 15 Jul 2011 15:56:19 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 6D6697BA; Fri, 15 Jul 2011 15:56:19 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p6FDuHue009946; Fri, 15 Jul 2011 15:56:17 +0200 (MEST) From: Rainer Orth To: Uros Bizjak Cc: Andreas Schwab , "H.J. Lu" , Richard Henderson , gcc-patches@gcc.gnu.org, Paolo Bonzini , Ian Lance Taylor , Steve Ellcey , Richard Sandiford , Eric Botcazou Subject: Re: [build] Move crtfastmath to toplevel libgcc References: <4E1B37C3.3030607@redhat.com> <4E1DD0D6.3040003@redhat.com> Date: Fri, 15 Jul 2011 15:56:17 +0200 In-Reply-To: (Uros Bizjak's message of "Thu, 14 Jul 2011 23:14:10 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 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 Uros Bizjak writes: > Alpha needs the same fix. I need following patch to bootstrap the compiler: > > --cut here-- > Index: gcc/config.gcc > =================================================================== > --- gcc/config.gcc (revision 176282) > +++ gcc/config.gcc (working copy) > @@ -757,6 +757,7 @@ > extra_options="${extra_options} alpha/elf.opt" > target_cpu_default="MASK_GAS" > tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee alpha/t-linux" > + extra_parts="$extra_parts crtfastmath.o" > ;; > alpha*-*-freebsd*) > tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h" I've made a pass over the possibly affected targets (+: inconsistency, config.gcc needs crtfastmath.o addition; 0: no problem): config.gcc alpha*-*-linux* + alpha*-*-freebsd* + alpha*-dec-osf5.1* 0 i[34567]86-*-darwin* 0 x86_64-*-darwin* 0 i[34567]86-*-linux* 0 i[34567]86-*-kfreebsd*-gnu + + crtprec??.o x86_64-*-linux* 0 x86_64-*-kfreebsd*-gnu 0 i[34567]86-*-solaris2* 0 i[34567]86-*-cygwin* 0 i[34567]86-*-mingw* 0 x86_64-*-mingw* 0 ia64*-*-elf* + ia64*-*-freebsd* + ia64*-*-linux* + mips-sgi-irix6.5* 0 mips64*-*-linux* + mips*-*-linux* + sparc-*-elf* 0 sparc-*-linux* + sparc-*-rtems* 0 sparc*-*-solaris2* 0 sparc64-*-elf* 0 sparc64-*-freebsd* + sparc64-*-linux* + The affected ones have defaults for extra_parts for either *-*-linux* or *-*-freebsd* and previously had EXTRA_PARTS in gcc/config/$cpu/t-crtfm, i.e. alpha, i386, and sparc. With the latter now gone, we've got an inconsistency. I think the following patch should fix all broken targets. For those that previously had crtfastmath.o in EXTRA_PARTS, I'm adding it to config.gcc (extra_parts) explicitly. The non-Linux x86 glibc targets were missed before. I move the extra_parts addition down so they all benefit from it. The duplication with i386/t-linux64 shouldn't matter since gcc/Makefile.in (GCC_EXTRA_PARTS) merges them and removes duplicates. ia64*-*-elf* is also affected because it has its own extra_parts, which is now unnecessary. Unless I get confirmation that this patch breaks nothing and fixes the majority of affected targets, I'll leave it as is and work to remove the duplication over the weekend, moving extra_parts/EXTRA_PARTS/EXTRA_MULTILIB_PARTS and referenced source files over to libgcc. While this is the way we want to go, it is clearly more risky than this stop gap measure. Sorry. Rainer 2011-07-14 Rainer Orth gcc: * config.gcc (alpha*-*-linux*): Add crtfastmath.o to extra_parts. (alpha*-*-freebsd*): Likewise. (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Add crtprec32.o, crtprec64.o, crtprec80.o, crtfastmath.o to extra_parts for all targets. (ia64*-*-elf*): Remove extra_parts. (sparc-*-linux*): Add crtfastmath.o to extra_parts. (sparc64-*-linux*): Likewise. (sparc64-*-freebsd*): Likewise. Revert: * config.gcc (ia64*-*-freebsd*): Remove crtfastmath.o from extra_parts. (ia64*-*-linux*): Likewise. (mips64*-*-linux*): Likewise. (mips*-*-linux*): Likewise. Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 176266) +++ gcc/config.gcc (working copy) @@ -757,13 +757,14 @@ extra_options="${extra_options} alpha/elf.opt" target_cpu_default="MASK_GAS" tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee alpha/t-linux" + extra_parts="${extra_parts} crtfastmath.o" ;; alpha*-*-freebsd*) tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h" extra_options="${extra_options} alpha/elf.opt" target_cpu_default="MASK_GAS" tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee" - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o crtfastmath.o" ;; alpha*-*-netbsd*) tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h" @@ -1304,9 +1305,6 @@ esac else tm_file="${tm_file} i386/gnu-user.h i386/linux.h" - # This is a hack to avoid a configuration mismatch - # until the toplevel libgcc move is complete. - extra_parts="${extra_parts} crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" fi ;; i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;; @@ -1315,6 +1313,9 @@ i[34567]86-*-gnu*) tm_file="$tm_file i386/gnu-user.h gnu.h i386/gnu.h";; esac tmake_file="${tmake_file} i386/t-crtstuff" + # This is a hack to avoid a configuration mismatch + # until the toplevel libgcc move is complete. + extra_parts="${extra_parts} crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \ @@ -1594,13 +1595,13 @@ then target_cpu_default="${target_cpu_default}|MASK_GNU_LD" fi - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-freebsd*) tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h" target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" tmake_file="${tmake_file} ia64/t-ia64" - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h" @@ -1609,7 +1610,7 @@ tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind" fi target_cpu_default="MASK_GNU_AS|MASK_GNU_LD" - extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-hpux*) tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h" @@ -1849,6 +1850,7 @@ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65" ;; esac + extra_parts="$extra_parts crtfastmath.o" gnu_ld=yes gas=yes test x$with_llsc != x || with_llsc=yes @@ -1868,6 +1870,7 @@ mipsisa32*) tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32" esac + extra_parts="$extra_parts crtfastmath.o" test x$with_llsc != x || with_llsc=yes ;; mips*-*-openbsd*) @@ -2493,6 +2496,7 @@ else tm_file="${tm_file} sparc/linux.h" fi + extra_parts="${extra_parts} crtfastmath.o" ;; sparc-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" @@ -2528,6 +2532,7 @@ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/linux64.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64" + extra_parts="${extra_parts} crtfastmath.o" ;; sparc64-*-freebsd*|ultrasparc-*-freebsd*) tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h" @@ -2537,6 +2542,7 @@ x) with_cpu=ultrasparc ;; *) echo "$with_cpu not supported for freebsd target"; exit 1 ;; esac + extra_parts="${extra_parts} crtfastmath.o" ;; sparc64-*-netbsd*) tm_file="sparc/biarch64.h ${tm_file}"