From 7b87c35ebac4e41875a932a4d55fba39c9905900 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Thu, 27 Jan 2011 14:16:12 +0000 Subject: [PATCH] Fix n32 compile. These changes are needed to fix n32 compile after the recent change of mips n32 MACHINE_ARCH to mipsn32eb/mipsn32el. Reviewed by: imp, bz (earlier version) --- gnu/lib/libgcc/Makefile | 4 ++-- gnu/lib/libgomp/Makefile | 2 +- gnu/usr.bin/binutils/Makefile.inc0 | 2 +- lib/libc/Makefile | 1 + usr.sbin/Makefile.mips | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 32f537e8f430..7f6fc0d8ff64 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -121,8 +121,8 @@ LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c .if ${TARGET_CPUARCH} == mips LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c -# XXX do we need n32 here? -.if ${TARGET_ARCH:Mmips64*} != "" +# ABIs other than o32 need this +.if ${TARGET_ARCH:Mmipse[lb]} == "" 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 8a863b83c250..011982b98e76 100644 --- a/gnu/lib/libgomp/Makefile +++ b/gnu/lib/libgomp/Makefile @@ -25,7 +25,7 @@ VERSION_MAP= ${SRCDIR}/libgomp.map # Target-specific OpenMP configuration .if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == i386 || \ ${MACHINE_ARCH} == powerpc || \ - ${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb + (${MACHINE_CPUARCH} == mips && ${MACHINE_ARCH:Mmips64*} == "") 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 1dbbcf25a8ea..db11f1ff0b93 100644 --- a/gnu/usr.bin/binutils/Makefile.inc0 +++ b/gnu/usr.bin/binutils/Makefile.inc0 @@ -28,7 +28,7 @@ SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ ${TARGET_ARCH} == "powerpc" || \ - ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb" + (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 diff --git a/lib/libc/Makefile b/lib/libc/Makefile index dcb094365edc..4eb57de6acd2 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -68,6 +68,7 @@ NOASM= ${LIBC_ARCH} != "ia64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "sparc64" && \ + ${MACHINE_ARCH:Mmipsn32*} == "" && \ ${MACHINE_ARCH:Mmips64*} == "" .include "${.CURDIR}/quad/Makefile.inc" .endif diff --git a/usr.sbin/Makefile.mips b/usr.sbin/Makefile.mips index 5b8fbd9ec03e..a946f3e36197 100644 --- a/usr.sbin/Makefile.mips +++ b/usr.sbin/Makefile.mips @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR:= ${SUBDIR:Nsysinstall} -.if ${MACHINE_ARCH:Mmips64*} != "" +# uathload broken for n32 and n64 due to toolchain issues +.if ${MACHINE_ARCH:Mmipse[lb]} == "" SUBDIR:= ${SUBDIR:Nuathload} .endif