From patchwork Tue Oct 30 20:42:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 195620 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 01E3F2C0081 for ; Wed, 31 Oct 2012 07:43:25 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352234606; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:Date:To:Subject:User-Agent:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-ID:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=qpPfUiBMMV8Z7FTDqDIRujHGX+s=; b=GRVOKg6UYa+PjMqvx7SbtIkHe1EsuflDa8rXugEGe/kFXqcEeJQShsygLjapzh D8q2Nd5UMeTLisjV/Bcv4zg5PvWstuiefC3fUhBFa+1vCpVv8mHCUOHdvAF4CB6d LqlqMxgQZyQgXdGke/bB4AElRIKRco3sPBzzkxxRKkaEs= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-M-MSG:Received:Received:Received:From:Date:To:Subject:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID:X-EMS-Proccessed:X-EMS-STAMP:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=aMAqSk+/9ZTH4pLI4PBrzWpvrBbAxD9vCOUtd+iVWz24V5KhCS33+/2u3npp3W ukoNejjJnngnKvvX72dIJyNAuFoMib4CghSa727BbaXI8m2iOWEgNqLGJ5nOF6mI OFNShVGsR6zguhIgrmiga1oosolR1T5wWzaYKyXeX2jBU=; Received: (qmail 4954 invoked by alias); 30 Oct 2012 20:43:15 -0000 Received: (qmail 4938 invoked by uid 22791); 30 Oct 2012 20:43:09 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_MG X-Spam-Check-By: sourceware.org Received: from dns1.mips.com (HELO dns1.mips.com) (12.201.5.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Oct 2012 20:43:03 +0000 Received: from mailgate1.mips.com (mailgate1.mips.com [12.201.5.111]) by dns1.mips.com (8.13.8/8.13.8) with ESMTP id q9UKh1RA003439 for ; Tue, 30 Oct 2012 13:43:01 -0700 X-M-MSG: Received: from exchdb01.mips.com (unknown [192.168.36.84]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mailgate1.mips.com (Postfix) with ESMTP id 2089A36465C for ; Tue, 30 Oct 2012 13:42:57 -0700 (PDT) Received: from ubuntu-sellcey.mips.com (192.168.65.53) by exchhub01.mips.com (192.168.36.84) with Microsoft SMTP Server id 14.1.270.1; Tue, 30 Oct 2012 13:42:54 -0700 Received: by ubuntu-sellcey.mips.com (sSMTP sendmail emulation); Tue, 30 Oct 2012 13:42:54 -0700 From: "Steve Ellcey " Date: Tue, 30 Oct 2012 13:42:54 -0700 To: Subject: [patch, mips] Modify mips-mti-linux-gnu build User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Message-ID: <67e709af-3479-4e74-8ef5-cadda370b148@EXCHHUB01.MIPS.com> X-EMS-Proccessed: 6LP3oGfGVdcdb8o1aBnt6w== X-EMS-STAMP: j9uHVfDVQHaFo8j9QjZiSw== 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 This patch makes a few changes to the work I have been doing on the mips-mti-linux-gnu target that I recently added. It adds an -mabi=64 build to MULTILIBS and changes the order of MULTILIB_OPTIONS to be consistent with the mips-mti-elf target. It also makes the N32 ABI the default when compiling for mips64* targets, this is also to be consistent with the mips-mti-elf target. Tested with a cross-build and running the GCC testsuite using qemu. OK to checkin? Steve Ellcey sellcey@mips.com 2012-10-30 Steve Ellcey * config/mips/mti-linux.h (SYSROOT_SUFFIX_SPEC): Change order and add mabi=64. (DRIVER_SELF_SPECS): Make -n32 the default on mips64* archs. * config/mips/t-mti-linux (MULTILIB_OPTIONS): Change order. (MULTILIB_DIRNAMES): Ditto. (MULTILIB_EXCEPTIONS): New. diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h index 36c003c..cda9bdc 100644 --- a/gcc/config/mips/mti-linux.h +++ b/gcc/config/mips/mti-linux.h @@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see /* This target is a multilib target, specify the sysroot paths. */ #undef SYSROOT_SUFFIX_SPEC #define SYSROOT_SUFFIX_SPEC \ - "%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{msoft-float:/sof}%{mel|EL:/el}%{mabi=64:/64}%{mabi=n32:/n32}" + "%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}" #undef DRIVER_SELF_SPECS #define DRIVER_SELF_SPECS \ @@ -36,6 +36,10 @@ along with GCC; see the file COPYING3. If not see /* Infer the -msynci setting from -march if not explicitly set. */ \ MIPS_ISA_SYNCI_SPEC, \ \ + /* If no ABI option is specified, infer one from the ISA level \ + or -mgp setting. */ \ + "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=n32}}", \ + \ /* Base SPECs. */ \ BASE_DRIVER_SELF_SPECS \ \ diff --git a/gcc/config/mips/t-mti-linux b/gcc/config/mips/t-mti-linux index ba11706..6d280cd 100644 --- a/gcc/config/mips/t-mti-linux +++ b/gcc/config/mips/t-mti-linux @@ -19,6 +19,15 @@ # The default build is mips32r2, hard-float big-endian. Add mips32, # soft-float, and little-endian variations. -MULTILIB_OPTIONS = mips32/mips64/mips64r2 msoft-float EL -MULTILIB_DIRNAMES = mips32 mips64 mips64r2 sof el +MULTILIB_OPTIONS = mips32/mips64/mips64r2 mabi=64 EL msoft-float +MULTILIB_DIRNAMES = mips32 mips64 mips64r2 64 el sof MULTILIB_MATCHES = EL=mel EB=meb + +# The 64 bit ABI is not supported on the mips32 architecture. +MULTILIB_EXCEPTIONS += *mips32*/*mabi=64* + +# The 64 bit ABI is not supported on the mips32r2 architecture. +# Because mips32r2 is the default we can't use that flag to trigger +# the exception so we check for mabi=64 with no specific mips flag +# instead. +MULTILIB_EXCEPTIONS += mabi=64*