X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/39a8cd101b922f08058746122efff58c14b57605..a9a4db61c29ec8455dcb07f607391cd82e933936:/unit-tests/test-cases/text-relocs/Makefile?ds=sidebyside diff --git a/unit-tests/test-cases/text-relocs/Makefile b/unit-tests/test-cases/text-relocs/Makefile index cfadeda..1048e84 100644 --- a/unit-tests/test-cases/text-relocs/Makefile +++ b/unit-tests/test-cases/text-relocs/Makefile @@ -24,20 +24,18 @@ TESTROOT = ../.. include ${TESTROOT}/include/common.makefile ### -### This test case is to verify __TEXT reliocations work in dylibs +### This test case is to verify __TEXT relocations work in dylibs ### ### TEXT_RELOC_FLAGS = -mdynamic-no-pic -read_only_relocs suppress -Wl,-w +TEXT_STAT_FLAGS = -static -ifeq "ppc64" "$(ARCH)" - # ppc64 does not support text relocs - TEXT_RELOC_FLAGS = -endif -ifeq "armv6" "$(ARCH)" - # arm does not support text relocs +ifeq "iPhoneOS" "$(OS_NAME)" + # iOS does not support text relocs TEXT_RELOC_FLAGS = + TEXT_STAT_FLAGS = endif @@ -46,14 +44,12 @@ all-check: all check check: ./main -all: main - -main: main.c libbar.dylib - ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c libbar.dylib - -libbar.dylib: bar.c - ${CC} ${CCFLAGS} -dynamiclib -o libbar.dylib bar.c -Os ${TEXT_RELOC_FLAGS} +all: + ${CC} ${CCFLAGS} -dynamiclib bar.c space.s -Os -o libbar.dylib ${TEXT_RELOC_FLAGS} + ${CC} ${CCFLAGS} bind.c $(TEXT_STAT_FLAGS) -Os -c -o bind.o + ${CC} -dynamiclib bind.o libbar.dylib -o libbind.dylib ${TEXT_RELOC_FLAGS} + ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c libbar.dylib libbind.dylib clean: - ${RM} ${RMFLAGS} *~ main libbar.dylib + ${RM} ${RMFLAGS} *~ main libbar.dylib libbind.dylib bind.o