From 54d5c7e86fd36ddd2ea33b3ec25fdc3e4b71f0f4 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 7 Jan 2011 20:26:33 +0000 Subject: 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. --- gnu/lib/libgcc/Makefile | 5 +++-- gnu/lib/libgomp/Makefile | 3 +-- gnu/usr.bin/binutils/Makefile.inc0 | 7 +++---- gnu/usr.bin/binutils/ld/Makefile.mips | 13 ++++++------- gnu/usr.bin/binutils/libbfd/Makefile.mips | 13 ++++++------- gnu/usr.bin/cc/Makefile.inc | 15 ++++++--------- gnu/usr.bin/cc/Makefile.tgt | 4 ++-- gnu/usr.bin/gdb/Makefile.inc | 2 +- gnu/usr.bin/gdb/libgdb/Makefile | 2 +- 9 files changed, 29 insertions(+), 35 deletions(-) (limited to 'gnu') diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 4a9d12f..32f537e 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -119,9 +119,10 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c # _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 diff --git a/gnu/lib/libgomp/Makefile b/gnu/lib/libgomp/Makefile index 1489a30..8a863b8 100644 --- a/gnu/lib/libgomp/Makefile +++ b/gnu/lib/libgomp/Makefile @@ -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 diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0 index 414af81..1dbbcf2 100644 --- a/gnu/usr.bin/binutils/Makefile.inc0 +++ b/gnu/usr.bin/binutils/Makefile.inc0 @@ -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 diff --git a/gnu/usr.bin/binutils/ld/Makefile.mips b/gnu/usr.bin/binutils/ld/Makefile.mips index de0ec94..e510a7d 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.mips +++ b/gnu/usr.bin/binutils/ld/Makefile.mips @@ -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 diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.mips b/gnu/usr.bin/binutils/libbfd/Makefile.mips index bf21130..02026ba 100644 --- a/gnu/usr.bin/binutils/libbfd/Makefile.mips +++ b/gnu/usr.bin/binutils/libbfd/Makefile.mips @@ -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 \ diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 9d3ee2d..a42609a 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -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 diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index f0f15d1..e50abd0 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -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_LD .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" diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc index 965dfe3..ea02c28 100644 --- a/gnu/usr.bin/gdb/Makefile.inc +++ b/gnu/usr.bin/gdb/Makefile.inc @@ -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 diff --git a/gnu/usr.bin/gdb/libgdb/Makefile b/gnu/usr.bin/gdb/libgdb/Makefile index 8e86bf4..ce16b2a 100644 --- a/gnu/usr.bin/gdb/libgdb/Makefile +++ b/gnu/usr.bin/gdb/libgdb/Makefile @@ -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 -- cgit v1.1