summaryrefslogtreecommitdiffstats
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-08-25 20:48:24 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-08-25 20:48:24 +0000
commit9f660f20bb090dc6ab1392c1177568442f046fff (patch)
tree19fec32abeaa13fe06ab34c34b110b7606d538c8 /lib/libc/Makefile
parent07e59b2937d1dccc43050de9229ba43337e16390 (diff)
downloadFreeBSD-src-9f660f20bb090dc6ab1392c1177568442f046fff.zip
FreeBSD-src-9f660f20bb090dc6ab1392c1177568442f046fff.tar.gz
Allow ABIs to provide their own LIBC_ARCH in a more generic way. As a side
effect, this fixes the build on powerpc64. Reviewed by: imp
Diffstat (limited to 'lib/libc/Makefile')
-rw-r--r--lib/libc/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index e29c7d9..dae4db3 100644
--- a/lib/libc/Makefile
+++ b/lib/libc/Makefile
@@ -5,10 +5,11 @@ SHLIBDIR?= /lib
.include <bsd.own.mk>
-# We have to special case powerpc and powerpc64, since they mostly have
-# the same source implementation. libc is very different due to large
-# ABI differences.
-.if ${MACHINE_ARCH} == "powerpc"
+# Pick the current architecture directory for libc. In general, this is
+# named MACHINE_CPUARCH, but some ABIs are different enough to require
+# their own libc, so allow a directory named MACHINE_ARCH to override this.
+
+.if exists(${.CURDIR}/${MACHINE_ARCH})
LIBC_ARCH=${MACHINE_ARCH}
.else
LIBC_ARCH=${MACHINE_CPUARCH}
OpenPOWER on IntegriCloud