diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 2bed4c781a8b..8758c8d828b7 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -77,7 +77,7 @@ SYMBOL_MAPS+= ${.CURDIR}/${RTLD_ARCH}/Symbol.map # 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. beforeinstall: -.if exists(${DESTDIR}/usr/libexec/${PROG}) +.if exists(${DESTDIR}/usr/libexec/${PROG}) && ${MK_STAGING} == "no" -chflags -h noschg ${DESTDIR}/usr/libexec/${PROG} .endif