Date: Fri, 5 Mar 2010 16:56:08 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204762 - head/contrib/gcc/config/mips Message-ID: <201003051656.o25Gu8ca055865@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003051656.o25Gu8ca055865>