]>
Commit | Line | Data |
---|---|---|
39a8cd10 A |
1 | |
2 | TESTROOT = ../.. | |
3 | include ${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 | ||
12 | all-check: all check | |
13 | ||
14 | check: | |
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 | ||
26 | all: main | |
27 | ||
28 | main : main.c | |
29 | ${CC} ${CCFLAGS} -I${TESTROOT}/include -Wl,-pie -o main main.c | |
30 | ||
31 | ||
32 | clean: | |
33 | ${RM} ${RMFLAGS} *~ main main.out | |
34 |