3 include ${TESTROOT}/include/common.makefile
7 # <rdar://problem/5807857> there should be some way to temporarily turn off -pie
9 # run a PIE four times and verify its load address was the same every time
15 export DYLD_NO_PIE=1 && ./main > main.out
16 export DYLD_NO_PIE=1 && ./main >> main.out
17 export DYLD_NO_PIE=1 && ./main >> main.out
18 export DYLD_NO_PIE=1 && ./main >> main.out
19 if [ `sort main.out -u | wc -l` == 1 ]; \
21 echo "PASS pie-DYLD_NO_PIE"; \
23 echo "FAIL pie-DYLD_NO_PIE"; \
29 ${CC} ${CCFLAGS} -I${TESTROOT}/include -Wl,-pie -o main main.c
33 ${RM} ${RMFLAGS} *~ main main.out