X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/f410558f5d60087e4c310119a1751b437121c3b9..HEAD:/unit-tests/test-cases/undefined-dynamic-lookup/Makefile diff --git a/unit-tests/test-cases/undefined-dynamic-lookup/Makefile b/unit-tests/test-cases/undefined-dynamic-lookup/Makefile index 69b40c7..1f82773 100644 --- a/unit-tests/test-cases/undefined-dynamic-lookup/Makefile +++ b/unit-tests/test-cases/undefined-dynamic-lookup/Makefile @@ -27,34 +27,45 @@ include ${TESTROOT}/include/common.makefile # Check that -U and -undefined dynamic_lookup work # +ALL = all-mac + +# -undefined dynamic_lookup is deprecated on iOS +ifeq ($(ARCH),arm64) + ALL = all-ios +else +ifeq ($(ARCH),armv7) + ALL = all-ios +endif +endif + + run: all -all: +all: ${ALL} + +all-mac: ${CC} ${CCFLAGS} main.c -o main -undefined dynamic_lookup nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} - ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} ${FAIL_IF_BAD_MACHO} main ${CC} ${CCFLAGS} main.c -o main -Wl,-U,_foo nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} - ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} ${FAIL_IF_BAD_MACHO} main ${CC} ${CCFLAGS} main.c -o main -flat_namespace -Wl,-U,_foo nm -m main | grep _foo | grep "dynamically looked up" | ${FAIL_IF_STDIN} ${DYLDINFO} -lazy_bind -bind main | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} - ${DYLDINFO} -lazy_bind -bind main | grep _exit | grep "flat-namespace" | ${FAIL_IF_EMPTY} ${FAIL_IF_BAD_MACHO} main ${CC} ${CCFLAGS} main.c -bundle -o main.bundle -nodefaultlibs -undefined dynamic_lookup nm -m main.bundle | grep _foo | grep "dynamically looked up" | ${FAIL_IF_EMPTY} ${DYLDINFO} -lazy_bind -bind main.bundle | grep _foo | grep "flat-namespace" | ${FAIL_IF_EMPTY} - ${DYLDINFO} -lazy_bind -bind main.bundle | grep _exit | grep "flat-namespace" | ${FAIL_IF_STDIN} ${PASS_IFF_GOOD_MACHO} main.bundle - +all-ios: + ${PASS_IFF} true clean: rm -f main main.bundle