# HG changeset patch # Parent 9d93af300c26987f30551eb33de88fff8bba0770 diff -r 9d93af300c26 -r d05695b1c059 lib/msun/Makefile --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -12,16 +12,20 @@ # # -.if ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" ARCH_SUBDIR= i387 .else +.if exists(${MACHINE_CPUARCH}/Makefile.inc) ARCH_SUBDIR= ${MACHINE_CPUARCH} +.else +ARCH_SUBDIR= ${MACHINE_ARCH} +.endif .endif .include "${ARCH_SUBDIR}/Makefile.inc" .PATH: ${.CURDIR}/${ARCH_SUBDIR} -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" .PATH: ${.CURDIR}/x86 CFLAGS+= -I${.CURDIR}/x86 .endif diff -r 9d93af300c26 -r d05695b1c059 lib/msun/tests/Makefile --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -6,13 +6,9 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/msun -.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ - || ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm" \ - || ${MACHINE} == "sparc64" CFLAGS+= -DHAVE_FENV_H -.endif -.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif @@ -45,10 +41,14 @@ LIBADD+= m #COPTS+= -Wfloat-equal # Copied from lib/msun/Makefile -.if ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" ARCH_SUBDIR= i387 .else +.if exists(${MACHINE_CPUARCH}/Makefile.inc) ARCH_SUBDIR= ${MACHINE_CPUARCH} +.else +ARCH_SUBDIR= ${MACHINE_ARCH} +.endif .endif .include "../${ARCH_SUBDIR}/Makefile.inc" diff -r 9d93af300c26 -r d05695b1c059 share/mk/sys.mk --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -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/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/i386/x86/:C/amd64/x86/} .endif # If the special target .POSIX appears (without prerequisites or