2 include ${TESTROOT}/include/common.makefile
5 # <rdar://problem/6050482> If pie, ignore preferred load address
7 # run a PIE four times and verify libfoo.dylib load address was different every time
10 FOO_ADDRESS = 0x10000000
12 ifeq "x86_64" "$(ARCH)"
13 FOO_ADDRESS = 0x300000000
24 if [ `sort main.out -u | wc -l` == 4 ]; \
26 echo "PASS pie-dylib"; \
28 echo "FAIL pie-dylib"; \
33 main : main.c libfoo.dylib
34 ${CC} ${CCFLAGS} -I${TESTROOT}/include -Wl,-pie libfoo.dylib -o main main.c
37 ${CC} ${CCFLAGS} foo.c -dynamiclib -o libfoo.dylib -seg1addr ${FOO_ADDRESS}
40 ${RM} ${RMFLAGS} *~ main main.out libfoo.dylib