]>
Commit | Line | Data |
---|---|---|
a645023d A |
1 | |
2 | TESTROOT = ../.. | |
3 | include ${TESTROOT}/include/common.makefile | |
4 | ||
5 | ||
6 | # | |
7 | # Verify -ObjC works with x86_64 categories | |
8 | # Verify stripped archives keep don't-strip bit | |
9 | # | |
10 | ||
11 | run: all | |
12 | ||
13 | all: | |
14 | ${CC} ${CCFLAGS} -g test.m -c -o test.o | |
ebf6f434 A |
15 | ${CC} ${CCFLAGS} -g test2.m -c -o test2.o |
16 | libtool -static test.o test2.o -o libtest.a | |
a645023d A |
17 | ${CC} ${CCFLAGS} main.m libtest.a -ObjC -o main -framework Foundation |
18 | nm main | grep mycatmethod1 | ${FAIL_IF_EMPTY} | |
19 | nm main | grep mycatmethod2 | ${FAIL_IF_EMPTY} | |
ebf6f434 A |
20 | nm main | grep mymethod2 | ${FAIL_IF_EMPTY} |
21 | ${LD} -arch ${ARCH} -r -S -keep_private_externs test.o test2.o -o test-stripped.o | |
a645023d A |
22 | libtool -static test-stripped.o -o libtest-stripped.a |
23 | ${CC} ${CCFLAGS} main.m libtest-stripped.a -all_load -dead_strip -o main2 -framework Foundation | |
24 | nm main2 | grep mycatmethod1 | ${FAIL_IF_EMPTY} | |
25 | nm main2 | grep mycatmethod2 | ${FAIL_IF_EMPTY} | |
ebf6f434 | 26 | nm main2 | grep mymethod2 | ${FAIL_IF_EMPTY} |
a645023d A |
27 | ${PASS_IFF_GOOD_MACHO} main2 |
28 | ||
29 | clean: | |
ebf6f434 | 30 | rm -rf test.o test2.o test-stripped.o libtest.a libtest-stripped.a main main2 |