From owner-svn-src-all@FreeBSD.ORG Fri Mar 5 16:56:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2154A1065678; Fri, 5 Mar 2010 16:56:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8C018FC24; Fri, 5 Mar 2010 16:56:08 +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 o25Gu80J055867; Fri, 5 Mar 2010 16:56:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25Gu8ca055865; Fri, 5 Mar 2010 16:56:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201003051656.o25Gu8ca055865@svn.freebsd.org> From: Warner Losh Date: Fri, 5 Mar 2010 16:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204762 - head/contrib/gcc/config/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 16:56:09 -0000 Author: imp Date: Fri Mar 5 16:56:08 2010 New Revision: 204762 URL: http://svn.freebsd.org/changeset/base/204762 Log: Add support for o32 (when it isn't the default), n32, n64, and o64 to the linker spec. Provide the ability to have a default ABI that's different than o32 (again, for all 4). Submitted by: C. Jayachandran (JC) with tweaks for o64/o32 by me Modified: head/contrib/gcc/config/mips/freebsd.h Modified: head/contrib/gcc/config/mips/freebsd.h ============================================================================== --- head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 15:23:01 2010 (r204761) +++ head/contrib/gcc/config/mips/freebsd.h Fri Mar 5 16:56:08 2010 (r204762) @@ -65,12 +65,17 @@ Boston, MA 02110-1301, USA. */ #undef LINK_SPEC #define LINK_SPEC "\ - %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips32r2} %{mips64} \ + %{G*} %{mips1} %{mips2} %{mips3} %{mips4} \ + %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ - %(fbsd_link_spec) " -#if 0 - %(endian_spec) -#endif + %{mabi=32:-melf32%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32_fbsd} \ + %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %{mabi=o64:-melf64%{EB:b}%{EL:l}tsmip_fbsd} \ + %(fbsd_link_spec) \ + %(endian_spec) \ + %(fbsd_link_spec)" + /* Reset our STARTFILE_SPEC which was properly set in config/freebsd.h but trashed by config/mips/elf.h. */ @@ -250,12 +255,28 @@ Boston, MA 02110-1301, USA. */ } \ while (0) -/* Default to the mips32 ISA */ -#undef DRIVER_SELF_SPECS +/* Default ABI and ISA */ +#undef DRIVER_SELF_SPECS +#if MIPS_ABI_DEFAULT == ABI_N32 #define DRIVER_SELF_SPECS \ - "%{!march=*: -march=mips32}" -#if 0 - "%{!EB:%{!EL:%(endian_spec)}}", + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=n32}" +#elif MIPS_ABI_DEFAULT == ABI_64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=64}" +#elif MIPS_ABI_DEFAULT == ABI_O64 +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips64}", \ + "%{!mabi=*: -mabi=o64}" +#else /* default to o32 */ +#define DRIVER_SELF_SPECS \ + "%{!EB:%{!EL:%(endian_spec)}}", \ + "%{!march=*: -march=mips32}", \ + "%{!mabi=*: -mabi=32}" #endif #if 0