From patchwork Sat Feb 5 12:04:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Tobler X-Patchwork-Id: 81997 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 03EC7B7128 for ; Sat, 5 Feb 2011 23:05:04 +1100 (EST) Received: (qmail 25179 invoked by alias); 5 Feb 2011 12:05:01 -0000 Received: (qmail 25124 invoked by uid 22791); 5 Feb 2011 12:05:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_FP, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 Feb 2011 12:04:53 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-8-131.flashcable.ch [91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id p15C4ocU058672 for ; Sat, 5 Feb 2011 13:04:50 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4D4D3CE1.2050003@fgznet.ch> Date: Sat, 05 Feb 2011 13:04:49 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: GCC Patches Subject: Re: [patch] unbreak bootstrap on FreeBSD ppc References: <4D4ACBB7.10800@fgznet.ch> In-Reply-To: <4D4ACBB7.10800@fgznet.ch> 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 On 03.02.11 16:37, Andreas Tobler wrote: > Hi all, > > bootstrap on FreeBSD PowerPC is broken since r167085. Even longer for > soft-float. > > The attached patch should solve this breakage. > > The first part I solved the same way as linux-ppc. Honza gave me hand to > track down what the issue was. > > I had this failure: > > /export/devel/gcc/head/gcc/libgcc/../gcc/emutls.c:92:1: error: > emutls_alloc causes a section type conflict > > With the second part, the soft-float issue I have tried to solve it with > adding a t-freebsd file which overrides the LIB2FUNCS_EXTRA. On PowerPC > FreeBSD the long double is only 64-bit wide. > I do not know if there is a nicer variant. As I understand, I can not > add an 'if else' in the t-file, right? > > I'll post the results once the test has completed. Here are the results. http://gcc.gnu.org/ml/gcc-testresults/2011-02/msg00512.html Attached the second revision of the patch. After the comment of Andreas. Which made me aware that I had a severe bug. OK for trunk? Thanks, Andreas Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 169824) +++ gcc/config.gcc (working copy) @@ -2043,9 +2043,10 @@ tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" extra_headers=altivec.h ;; -powerpc*-*-freebsd*) +powerpc-*-freebsd*) tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h" - tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" + tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd" + tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp" extra_options="${extra_options} rs6000/sysv4.opt" ;; powerpc-*-netbsd*) Index: gcc/config/rs6000/freebsd.h =================================================================== --- gcc/config/rs6000/freebsd.h (revision 169824) +++ gcc/config/rs6000/freebsd.h (working copy) @@ -1,5 +1,6 @@ /* Definitions for PowerPC running FreeBSD using the ELF format - Copyright (C) 2001, 2003, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2007, 2009, 2010, 2011 + Free Software Foundation, Inc. Contributed by David E. O'Brien and BSDi. This file is part of GCC. @@ -70,4 +71,10 @@ #undef ASM_APP_OFF #define ASM_APP_OFF "#NO_APP\n" +/* We don't need to generate entries in .fixup, except when + -mrelocatable or -mrelocatable-lib is given. */ +#undef RELOCATABLE_NEEDS_FIXUP +#define RELOCATABLE_NEEDS_FIXUP \ + (target_flags & target_flags_explicit & MASK_RELOCATABLE) + #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) Index: gcc/config/rs6000/t-freebsd =================================================================== --- gcc/config/rs6000/t-freebsd (revision 0) +++ gcc/config/rs6000/t-freebsd (revision 0) @@ -0,0 +1,24 @@ +# Overrides for FreeBSD PowerPC +# +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# We do not want to build darwin-ldouble.c, so set the LIB2FUNCS_EXTRA again. +# Invoke this file after rs6000/t-ppccomm. + +LIB2FUNCS_EXTRA = tramp.S Index: libgcc/config.host =================================================================== --- libgcc/config.host (revision 169824) +++ libgcc/config.host (working copy) @@ -463,7 +463,8 @@ ;; powerpc64-*-darwin*) ;; -powerpc*-*-freebsd*) +powerpc-*-freebsd*) + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp" ;; powerpc-*-netbsd*) ;;