Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2011 20:26:33 +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: r217123 - in head: . gnu/lib/libgcc gnu/lib/libgomp gnu/usr.bin/binutils gnu/usr.bin/binutils/ld gnu/usr.bin/binutils/libbfd gnu/usr.bin/cc gnu/usr.bin/gdb gnu/usr.bin/gdb/libgdb lib/li...
Message-ID:  <201101072026.p07KQXKe064774@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Jan  7 20:26:33 2011
New Revision: 217123
URL: http://svn.freebsd.org/changeset/base/217123

Log:
  Retire TARGET_ABI.
  
  Implement MACHINE_ARCH=mips64e[lb] to build N64 images.  This replaces
  MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.
  
  MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
  WITHOUT_CDDL due to atomic issues in libzfs.  I've not investigated
  this much, but implemented this to preserve as much of the TARGET_ABI
  functionality that I could.  Since its presence doesn't affect the
  working cases, I've kept it in for now.
  
  Added mips64e[lb] to make universe, so more kernels build.
  
  And I think this (finally) closes the curtain on the tbemd tree.

Modified:
  head/Makefile
  head/Makefile.inc1
  head/Makefile.mips
  head/gnu/lib/libgcc/Makefile
  head/gnu/lib/libgomp/Makefile
  head/gnu/usr.bin/binutils/Makefile.inc0
  head/gnu/usr.bin/binutils/ld/Makefile.mips
  head/gnu/usr.bin/binutils/libbfd/Makefile.mips
  head/gnu/usr.bin/cc/Makefile.inc
  head/gnu/usr.bin/cc/Makefile.tgt
  head/gnu/usr.bin/gdb/Makefile.inc
  head/gnu/usr.bin/gdb/libgdb/Makefile
  head/lib/libc/Makefile
  head/share/mk/bsd.endian.mk
  head/share/mk/sys.mk
  head/usr.bin/xlint/Makefile.inc
  head/usr.sbin/Makefile.mips

Modified: head/Makefile
==============================================================================
--- head/Makefile	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/Makefile	Fri Jan  7 20:26:33 2011	(r217123)
@@ -283,7 +283,7 @@ tinderbox:
 .if make(universe) || make(universe_kernels) || make(tinderbox)
 TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
 TARGET_ARCHES_arm?=	arm armeb
-TARGET_ARCHES_mips?=	mipsel mipseb
+TARGET_ARCHES_mips?=	mipsel mipseb mips64el mips64eb
 TARGET_ARCHES_powerpc?=	powerpc powerpc64
 TARGET_ARCHES_pc98?=	i386
 TARGET_ARCHES_sun4v?=	sparc64

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/Makefile.inc1	Fri Jan  7 20:26:33 2011	(r217123)
@@ -121,7 +121,7 @@ VERSION+=	${OSRELDATE}
 TARGET_ARCH=	${TARGET:S/pc98/i386/:S/sun4v/sparc64/:S/mips/mipsel/}
 .elif !defined(TARGET) && defined(TARGET_ARCH) && \
     ${TARGET_ARCH} != ${MACHINE_ARCH}
-TARGET=		${TARGET_ARCH:C/mipse[lb]/mips/:C/armeb/arm/}
+TARGET=		${TARGET_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/}
 .endif
 # Legacy names, for a transition period mips:mips -> mipsel:mips
 .if defined(TARGET) && defined(TARGET_ARCH) && \
@@ -142,7 +142,7 @@ TARGET_ARCH=armeb
 TARGET?=	${MACHINE}
 TARGET_ARCH?=	${MACHINE_ARCH}
 
-KNOWN_ARCHES?=	amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
+KNOWN_ARCHES?=	amd64 arm armeb/arm i386 i386/pc98 ia64 mipsel/mips mipseb/mips mips64el/mips mips64eb/mips mipsn32el/mips mipsn32eb/mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
 .if ${TARGET} == ${TARGET_ARCH}
 _t=		${TARGET}
 .else

Modified: head/Makefile.mips
==============================================================================
--- head/Makefile.mips	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/Makefile.mips	Fri Jan  7 20:26:33 2011	(r217123)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} == "n64"
+.if ${MACHINE_ARCH} != "mipsel" && ${MACHINE_ARCH} != "mipseb"
 MK_RESCUE=no
 .endif

Modified: head/gnu/lib/libgcc/Makefile
==============================================================================
--- head/gnu/lib/libgcc/Makefile	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/lib/libgcc/Makefile	Fri Jan  7 20:26:33 2011	(r217123)
@@ -119,9 +119,10 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatuns
 #	_fixsfsi _fixunssfsi _floatdidf _floatdisf
 .endif
 
-.if ${TARGET_CPUARCH} == "mips"
+.if ${TARGET_CPUARCH} == mips
 LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
+# XXX do we need n32 here?
+.if ${TARGET_ARCH:Mmips64*} != ""
 LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c
 LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c
 LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c

Modified: head/gnu/lib/libgomp/Makefile
==============================================================================
--- head/gnu/lib/libgomp/Makefile	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/lib/libgomp/Makefile	Fri Jan  7 20:26:33 2011	(r217123)
@@ -25,8 +25,7 @@ VERSION_MAP=	${SRCDIR}/libgomp.map
 # Target-specific OpenMP configuration
 .if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \
     ${MACHINE_ARCH} == powerpc || \
-    (${MACHINE_CPUARCH} == mips && \
-	(!defined(TARGET_ABI) || ${TARGET_ABI} != "n64"))
+    ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb
 OMP_LOCK_ALIGN	=	4
 OMP_LOCK_KIND=		4
 OMP_LOCK_SIZE=		4

Modified: head/gnu/usr.bin/binutils/Makefile.inc0
==============================================================================
--- head/gnu/usr.bin/binutils/Makefile.inc0	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/binutils/Makefile.inc0	Fri Jan  7 20:26:33 2011	(r217123)
@@ -7,14 +7,14 @@
 VERSION=	"2.15 [FreeBSD] 2004-05-23"
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif
 TARGET_ARCH?=	${MACHINE_ARCH}
 BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
 TARGET_TUPLE?=	${BINUTILS_ARCH}-obrien-freebsd
-.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb"
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
 TARGET_BIG_ENDIAN=t
 .endif
 
@@ -28,8 +28,7 @@ SRCDIR=	${.CURDIR}/${RELSRC}
 
 .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
 	${TARGET_ARCH} == "powerpc" || \
-	(${TARGET_CPUARCH} == "mips" && \
-		(!defined(TARGET_ABI) || ${TARGET_ABI} != "n64"))
+	${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
 .else
 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64

Modified: head/gnu/usr.bin/binutils/ld/Makefile.mips
==============================================================================
--- head/gnu/usr.bin/binutils/ld/Makefile.mips	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/binutils/ld/Makefile.mips	Fri Jan  7 20:26:33 2011	(r217123)
@@ -1,19 +1,18 @@
 # $FreeBSD$
 
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 _EMULATION_ENDIAN=l
 .else
 _EMULATION_ENDIAN=b
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
-.endif
-.endif
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
+.else
 NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
+.endif
 
 MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \
     elf32btsmipn32_fbsd elf32ltsmipn32_fbsd

Modified: head/gnu/usr.bin/binutils/libbfd/Makefile.mips
==============================================================================
--- head/gnu/usr.bin/binutils/libbfd/Makefile.mips	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/binutils/libbfd/Makefile.mips	Fri Jan  7 20:26:33 2011	(r217123)
@@ -1,19 +1,18 @@
 # $FreeBSD$
 
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 _EMULATION_ENDIAN=little
 .else
 _EMULATION_ENDIAN=big
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-DEFAULT_VECTOR=	bfd_elf32_ntrad${_EMULATION_ENDIAN}mips_vec
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 DEFAULT_VECTOR=	bfd_elf64_trad${_EMULATION_ENDIAN}mips_vec
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+DEFAULT_VECTOR=	bfd_elf32_ntrad${_EMULATION_ENDIAN}mips_vec
+.else
+DEFAULT_VECTOR=bfd_elf32_trad${_EMULATION_ENDIAN}mips_vec
 .endif
-.endif
-DEFAULT_VECTOR?=bfd_elf32_trad${_EMULATION_ENDIAN}mips_vec
 
 SRCS+=	coff-mips.c \
 	cpu-mips.c \

Modified: head/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.inc	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/cc/Makefile.inc	Fri Jan  7 20:26:33 2011	(r217123)
@@ -36,21 +36,18 @@ CFLAGS+=	-DCROSS_COMPILE
 CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
 .endif
 
-
 .if ${TARGET_CPUARCH} == "mips"
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
 CFLAGS += -DTARGET_ENDIAN_DEFAULT=0
 .endif
 
-.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
-.if ${TARGET_ABI} == "n32"
-MIPS_ABI_DEFAULT=ABI_N32
-.elif ${TARGET_ABI} == "n64"
+.if ${TARGET_ARCH:Mmips64*} != ""
 MIPS_ABI_DEFAULT=ABI_64
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+MIPS_ABI_DEFAULT=ABI_N32
+.else
+MIPS_ABI_DEFAULT=ABI_32
 .endif
-.endif
-
-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

Modified: head/gnu/usr.bin/cc/Makefile.tgt
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.tgt	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/cc/Makefile.tgt	Fri Jan  7 20:26:33 2011	(r217123)
@@ -4,7 +4,7 @@
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif
@@ -17,7 +17,7 @@ TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU
 .if ${TARGET_ARCH} == "sparc64"
 TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
 .endif
-.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" || ${TARGET_ARCH} == "mips64eb"
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
 TARGET_BIG_ENDIAN=t
 .endif
 .if ${TARGET_ARCH} == "powerpc64"

Modified: head/gnu/usr.bin/gdb/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/gdb/Makefile.inc	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/gdb/Makefile.inc	Fri Jan  7 20:26:33 2011	(r217123)
@@ -20,7 +20,7 @@ OBJ_GDB= ${OBJ_ROOT}/gdb
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif

Modified: head/gnu/usr.bin/gdb/libgdb/Makefile
==============================================================================
--- head/gnu/usr.bin/gdb/libgdb/Makefile	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/gnu/usr.bin/gdb/libgdb/Makefile	Fri Jan  7 20:26:33 2011	(r217123)
@@ -4,7 +4,7 @@
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .else
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 .endif

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/lib/libc/Makefile	Fri Jan  7 20:26:33 2011	(r217123)
@@ -68,11 +68,7 @@ NOASM=
     ${LIBC_ARCH} != "ia64" && \
     ${LIBC_ARCH} != "powerpc64" && \
     ${LIBC_ARCH} != "sparc64" && \
-    ${LIBC_ARCH} != "mips"
-.include "${.CURDIR}/quad/Makefile.inc"
-.endif
-.if ${LIBC_ARCH} == "mips" && \
-    (!defined(TARGET_ABI) || ${TARGET_ABI} == "o32")
+    ${MACHINE_ARCH:Mmips64*} == ""
 .include "${.CURDIR}/quad/Makefile.inc"
 .endif
 .include "${.CURDIR}/regex/Makefile.inc"

Modified: head/share/mk/bsd.endian.mk
==============================================================================
--- head/share/mk/bsd.endian.mk	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/share/mk/bsd.endian.mk	Fri Jan  7 20:26:33 2011	(r217123)
@@ -4,12 +4,12 @@
     ${MACHINE_ARCH} == "i386" || \
     ${MACHINE_ARCH} == "ia64" || \
     ${MACHINE_ARCH} == "arm"  || \
-    ${MACHINE_ARCH} == "mipsel"
+    ${MACHINE_ARCH:Mmips*el} != ""
 TARGET_ENDIANNESS= 1234
 .elif ${MACHINE_ARCH} == "powerpc" || \
     ${MACHINE_ARCH} == "powerpc64" || \
     ${MACHINE_ARCH} == "sparc64" || \
     ${MACHINE_ARCH} == "armeb" || \
-    ${MACHINE_ARCH} == "mipseb"
+    ${MACHINE_ARCH:Mmips*eb} != ""
 TARGET_ENDIANNESS= 4321
 .endif

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/share/mk/sys.mk	Fri Jan  7 20:26:33 2011	(r217123)
@@ -13,7 +13,7 @@ unix		?=	We run FreeBSD, not UNIX.
 # and/or endian.  This is called MACHINE_CPU in NetBSD, but that's used
 # for something different in FreeBSD.
 #
-MACHINE_CPUARCH=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+MACHINE_CPUARCH=${MACHINE_ARCH:C/mips.*e[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
 .endif
 
 # If the special target .POSIX appears (without prerequisites or

Modified: head/usr.bin/xlint/Makefile.inc
==============================================================================
--- head/usr.bin/xlint/Makefile.inc	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/usr.bin/xlint/Makefile.inc	Fri Jan  7 20:26:33 2011	(r217123)
@@ -8,7 +8,7 @@ WARNS?=		0
 # These assignments duplicate much of the functionality of
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=	${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
+TARGET_CPUARCH=	${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/}
 .else
 TARGET_CPUARCH=	${MACHINE_CPUARCH}
 TARGET_ARCH=	${MACHINE_ARCH}

Modified: head/usr.sbin/Makefile.mips
==============================================================================
--- head/usr.sbin/Makefile.mips	Fri Jan  7 20:07:30 2011	(r217122)
+++ head/usr.sbin/Makefile.mips	Fri Jan  7 20:26:33 2011	(r217123)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
 SUBDIR:=	${SUBDIR:Nsysinstall}
-.if defined(TARGET_ABI) && ${TARGET_ABI} == "n64"
+.if ${MACHINE_ARCH:Mmips64*} != ""
 SUBDIR:=	${SUBDIR:Nuathload}
 .endif



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