summaryrefslogtreecommitdiffstats
path: root/lib/libc/Makefile
diff options
context:
space:
mode:
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