aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-08-24 23:19:14 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-08-24 23:19:14 +0000
commit789e85458b0d26acfae7ca2701b2a2e6173d8cc8 (patch)
treecdf846a10fc632e35024918f5d9e4264095e3456 /libexec
parent025f9d5b15e92dbf41bc58fcbd90e4a6895a98c4 (diff)
downloadsrc-789e85458b0d26acfae7ca2701b2a2e6173d8cc8.tar.gz
src-789e85458b0d26acfae7ca2701b2a2e6173d8cc8.zip
Make RTLD work on powerpc64 again. If there is a sub-directory named
MACHINE_ARCH, use that specific one, otherwise use MACHINE_CPUARCH. Reviewed by: imp
Notes
Notes: svn path=/head/; revision=211785
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
index 6cf09bed281e..a798f3aeaca2 100644
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -10,7 +10,12 @@ SRCS= rtld_start.S \
MAN= rtld.1
CSTD?= gnu99
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD
-CFLAGS+= -I${.CURDIR}/${MACHINE_CPUARCH} -I${.CURDIR}
+.if exists(${.CURDIR}/${MACHINE_ARCH})
+RTLD_ARCH= ${MACHINE_ARCH}
+.else
+RTLD_ARCH= ${MACHINE_CPUARCH}
+.endif
+CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR}
.if ${MACHINE_ARCH} == "powerpc64"
LDFLAGS+= -nostdlib -e _rtld_start
.else
@@ -39,15 +44,13 @@ LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
${PROG}: ${VERSION_MAP}
-.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map)
-SYMBOL_MAPS+= ${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map
+.if exists(${.CURDIR}/${RTLD_ARCH}/Symbol.map)
+SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map
.endif
.endif
.endif
-.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc)
-.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc"
-.endif
+.sinclude "${.CURDIR}/${RTLD_ARCH}/Makefile.inc"
# Since moving rtld-elf to /libexec, we need to create a symlink.
# Fixup the existing binary that's there so we can symlink over it.
@@ -56,7 +59,7 @@ beforeinstall:
-chflags noschg ${DESTDIR}/usr/libexec/${PROG}
.endif
-.PATH: ${.CURDIR}/${MACHINE_CPUARCH}
+.PATH: ${.CURDIR}/${RTLD_ARCH}
.include <bsd.symver.mk>
.include <bsd.prog.mk>