summaryrefslogtreecommitdiffstats
path: root/lib/libthr/support/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/support/Makefile.inc')
-rw-r--r--lib/libthr/support/Makefile.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libthr/support/Makefile.inc b/lib/libthr/support/Makefile.inc
index bcf4393..35a15f8 100644
--- a/lib/libthr/support/Makefile.inc
+++ b/lib/libthr/support/Makefile.inc
@@ -1,9 +1,16 @@
# $FreeBSD$
.PATH: ${.CURDIR}/support ${.CURDIR}/../libc/gen ${.CURDIR}/../libc/string
-.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
+# libc must search machine_arch, then machine_cpuarch, but libthr has all its
+# code implemented in machine_cpuarch. Cope.
+.if exists(${.CURDIR}/../libc/${MACHINE_ARCH}/sys)
+.PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/sys
CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_ARCH}
+.else
+.PATH: ${.CURDIR}/../libc/${MACHINE_CPUARCH}/sys
+CFLAGS+= -I${.CURDIR}/../libc/${MACHINE_CPUARCH}
+.endif
SYSCALLS= thr_new
OpenPOWER on IntegriCloud