aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-08-25 20:48:24 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-08-25 20:48:24 +0000
commitf61ce5684543171aecae5890fc2ae9d115441ba6 (patch)
tree19fec32abeaa13fe06ab34c34b110b7606d538c8 /lib
parent8bddaf900773c80269d0416da191e8b50ff695a3 (diff)
downloadsrc-f61ce5684543171aecae5890fc2ae9d115441ba6.tar.gz
src-f61ce5684543171aecae5890fc2ae9d115441ba6.zip
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
Notes
Notes: svn path=/head/; revision=211822
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
index e29c7d99b7ca..dae4db3c8e6c 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}