Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 2010 21:15:00 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r208758 - head/gnu/usr.bin/cc
Message-ID:  <201006022115.o52LF0Aj070329@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Wed Jun  2 21:15:00 2010
New Revision: 208758
URL: http://svn.freebsd.org/changeset/base/208758

Log:
  Fix build for O32 systems without a TARGET_CPUTYPE defined.  We must default to
  MIPS-III because FreeBSD relies on a number of MIPS-III features; the ABI
  default would be MIPS-I which we don't intend to support.  Our old default
  before I switched to using the ABI default was MIPS32.

Modified:
  head/gnu/usr.bin/cc/Makefile.inc

Modified: head/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.inc	Wed Jun  2 21:00:18 2010	(r208757)
+++ head/gnu/usr.bin/cc/Makefile.inc	Wed Jun  2 21:15:00 2010	(r208758)
@@ -49,6 +49,14 @@ MIPS_ABI_DEFAULT=ABI_64
 MIPS_ABI_DEFAULT?=ABI_32
 CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT}
 
+# If we are compiling for the O32 ABI, we need to default to MIPS-III rather
+# than taking the ISA from the ABI requirements, since FreeBSD is built with
+# a number of MIPS-III features/instructions and that is the minimum ISA we
+# support, not the O32 default MIPS-I.
+.if ${MIPS_ABI_DEFAULT} == "ABI_32"
+TARGET_CPUTYPE?=mips3
+.endif
+
 # GCC by default takes the ISA from the ABI's requirements.  If world is built
 # with a superior ISA, since we lack multilib, we have to set the right
 # default ISA to be able to link against what's in /usr/lib.  Terrible stuff.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006022115.o52LF0Aj070329>