]> git.saurik.com Git - apple/dyld.git/blame - unit-tests/test-cases/pie-DYLD_NO_PIE/Makefile
dyld-132.13.tar.gz
[apple/dyld.git] / unit-tests / test-cases / pie-DYLD_NO_PIE / Makefile
CommitLineData
39a8cd10
A
1
2TESTROOT = ../..
3include ${TESTROOT}/include/common.makefile
4
5
6#
7# <rdar://problem/5807857> there should be some way to temporarily turn off -pie
8#
9# run a PIE four times and verify its load address was the same every time
10#
11
12all-check: all check
13
14check:
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 ]; \
20 then \
21 echo "PASS pie-DYLD_NO_PIE"; \
22 else \
23 echo "FAIL pie-DYLD_NO_PIE"; \
24 fi; \
25
26all: main
27
28main : main.c
29 ${CC} ${CCFLAGS} -I${TESTROOT}/include -Wl,-pie -o main main.c
30
31
32clean:
33 ${RM} ${RMFLAGS} *~ main main.out
34