From 071256a8380288a00be54e1c355dee5e70dfc39a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 15 May 2012 12:08:22 -0400 Subject: [PATCH] Build PIE executable on Mac OS X 10.5 and above. --- mkpkg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkpkg b/mkpkg index f99119225..327712354 100755 --- a/mkpkg +++ b/mkpkg @@ -238,6 +238,10 @@ case "$osversion" in fi export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS" export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS" + if [ $osrelease -ge 105 ]; then + CFLAGS="$CFLAGS $F_PIE" + LDFLAGS="$LDFLAGS -Wl,-pie" + fi # Note, must indent with tabs, not spaces due to IFS trickery configure_opts="--prefix=$prefix --with-pam