From owner-svn-src-user@FreeBSD.ORG Thu Mar 11 01:48:00 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20577106564A; Thu, 11 Mar 2010 01:48:00 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E923A8FC14; Thu, 11 Mar 2010 01:47:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2B1lxqH024955; Thu, 11 Mar 2010 01:47:59 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B1lxBS024953; Thu, 11 Mar 2010 01:47:59 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003110147.o2B1lxBS024953@svn.freebsd.org> From: Juli Mallett Date: Thu, 11 Mar 2010 01:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204993 - user/jmallett/octeon/contrib/gcc/config/mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 01:48:00 -0000 Author: jmallett Date: Thu Mar 11 01:47:59 2010 New Revision: 204993 URL: http://svn.freebsd.org/changeset/base/204993 Log: Integrate MIPS_CPU_STRING_DEFAULT into DRIVER_SELF_SPECS so that we see it as an argument and can pass it to the assembler. It'd be nice if the mips.h assembler and linker specs could take into account the CPU architecture as it may be intuited within GCC rather than having to do this. This is so ugly. Then again, it's pretty stupid to refuse to link modules using the same ABI but different -march values. Perhaps fixing binutils and undoing some of this is the right way to go. Modified: user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Modified: user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h ============================================================================== --- user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Thu Mar 11 01:35:38 2010 (r204992) +++ user/jmallett/octeon/contrib/gcc/config/mips/freebsd.h Thu Mar 11 01:47:59 2010 (r204993) @@ -255,23 +255,37 @@ Boston, MA 02110-1301, USA. */ while (0) /* Default ABI and ISA */ +/* + * XXX/juli + * Shouldn't this also be dependent on !mips*? + */ +#ifdef MIPS_CPU_STRING_DEFAULT +#define DRIVER_SELF_ISA_SPEC "{!march=*: -march=" MIPS_CPU_STRING_DEFAULT "}" +#else +#define DRIVER_SELF_ISA_SPEC "{!march=*: -march=from-abi}" +#endif + #undef DRIVER_SELF_SPECS #if MIPS_ABI_DEFAULT == ABI_N32 #define DRIVER_SELF_SPECS \ "%{!EB:%{!EL:%(endian_spec)}}", \ - "%{!mabi=*: -mabi=n32}" + "%{!mabi=*: -mabi=n32}", \ + DRIVER_SELF_ISA_SPEC #elif MIPS_ABI_DEFAULT == ABI_64 #define DRIVER_SELF_SPECS \ "%{!EB:%{!EL:%(endian_spec)}}", \ - "%{!mabi=*: -mabi=64}" + "%{!mabi=*: -mabi=64}", \ + DRIVER_SELF_ISA_SPEC #elif MIPS_ABI_DEFAULT == ABI_O64 #define DRIVER_SELF_SPECS \ "%{!EB:%{!EL:%(endian_spec)}}", \ - "%{!mabi=*: -mabi=o64}" + "%{!mabi=*: -mabi=o64}", \ + DRIVER_SELF_ISA_SPEC #else /* default to o32 */ #define DRIVER_SELF_SPECS \ "%{!EB:%{!EL:%(endian_spec)}}", \ - "%{!mabi=*: -mabi=32}" + "%{!mabi=*: -mabi=32}", \ + DRIVER_SELF_ISA_SPEC #endif #if 0