From patchwork Fri Aug 8 19:41:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 378421 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 09D95140114 for ; Sat, 9 Aug 2014 05:41:54 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=qSoJITKhys94XXrZGx8VbC6J0F9PwgQ1WpcqfJsLuacnn1OJApF0i 7yE2pZy3kJv8DfKhFZ0BqXh4Qfqwr0ck6pwOYgQCj69xbXudRI1Fimp+rKKzmE3G yDg78CDGm2ShU4G6GKTeefYfFlDJ4J+0KyrxYxRim25JqpnO8duV8k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:in-reply-to:references :content-type:content-transfer-encoding:mime-version; s=default; bh=nEyZGFqEbe2gl44j42+AYXoTMaU=; b=lwKamtF3YXCkVHOeuq7OJc17xCaB zQ098PJ+3l3ypEP2HV10iUwBm3bUeGmZJbGyQm05kYY80oyi/GCzquaGXheOO44Z fRQudxcGOKsI+6wxVXBUfS9i+mbZCEtdEo/SefzRxYKywuY5ZJ0b7m0j9yTh+rnf 5REmTY6X0HCMEps= Received: (qmail 28014 invoked by alias); 8 Aug 2014 19:41:48 -0000 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 Received: (qmail 28001 invoked by uid 89); 8 Aug 2014 19:41:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Aug 2014 19:41:46 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id A42AF169E250F; Fri, 8 Aug 2014 20:41:39 +0100 (IST) Received: from BAMAIL02.ba.imgtec.org (192.168.66.28) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 8 Aug 2014 20:41:42 +0100 Received: from [192.168.65.53] (192.168.65.53) by bamail02.ba.imgtec.org (192.168.66.28) with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 8 Aug 2014 12:41:40 -0700 Message-ID: <1407526900.2601.48.camel@ubuntu-sellcey> Subject: Re: [PATCH mips] Pass -msoft-float/-mhard-float flags to GAS From: Steve Ellcey To: , , , GCC Patches Date: Fri, 8 Aug 2014 12:41:40 -0700 In-Reply-To: References: MIME-Version: 1.0 On Fri, 2014-08-08 at 08:38 -0700, Steve Ellcey wrote: > Recent changes to the MIPS binutils sources have made it necessary for > GCC to pass the -msoft-float to the assembler if it wants an object > file marked as soft-float. This patch makes GCC pass any -mhard-float, > or -msoft-float flags that were used on the compile line on to the > assembler so the executable is marked appropriately. I did not do > anything with -mno-float because the GNU assembler doesn't have a > -mno-float flag. > > Without this patch (and a second one I will submit shortly) I cannot > build soft-float multilibs with the latest GCC and top-of-tree binutils. > > Tested with the mips-mti-linux-gnu toolchain. > > OK to checkin? > > Steve Ellcey > sellcey@mips.com Matthew Fortune pointed out that -msingle-float has the same issue. I didn't run into it because I wasn't building single-float multilibs but I modified this patch to pass -msingle-float and -mdouble-float to the assembler as well as -mhard-float and -msoft-float. Here is the modified patch to pass all four flags on to the assembler. Steve Ellcey sellcey@mips.com 2014-08-08 Steve Ellcey * config/mips/mips.h (ASM_SPEC): Pass float options to assembler. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 8d7a09f..9a15287 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1187,6 +1187,8 @@ struct mips_cpu_info { %{mshared} %{mno-shared} \ %{msym32} %{mno-sym32} \ %{mtune=*} \ +%{mhard-float} %{msoft-float} \ +%{msingle-float} %{mdouble-float} \ %(subtarget_asm_spec)" /* Extra switches sometimes passed to the linker. */