]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/big-stack/Makefile
dyld-132.13.tar.gz
[apple/dyld.git] / unit-tests / test-cases / big-stack / Makefile
index cc85b8598eb5c1f3631b61f65ee9fb18606c914a..b6f9489a6cf9346e3d9c9db7a80857106fc3c4d4 100644 (file)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (c) 2006-2008 Apple Inc. All rights reserved.
 #
 # @APPLE_LICENSE_HEADER_START@
 # 
 TESTROOT = ../..
 include ${TESTROOT}/include/common.makefile
 
-run: all
+# rosetta does not support very large stack sizes
+STACK_SIZE = 0x83000000
+ifeq "ppc" "$(ARCH)"
+       MACHINE =  $(shell arch)
+       ifeq "i386" "$(MACHINE)"
+               STACK_SIZE = 0x02100000
+       endif
+endif
+
+
+ifeq "armv6" "$(ARCH)"
+       STACK_SIZE = 0x20000000
+endif
+
+
+all-check: all check
+
+check:
        ${TESTROOT}/bin/exit-zero-pass.pl "big stack" "big stack failed" ./main
 
 all:
-       ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c -Wl,-w -Wl,-stack_size -Wl,0x83000000
+       ${CC} ${CCFLAGS} -I${TESTROOT}/include -o main main.c -Wl,-w -Wl,-stack_size -Wl,${STACK_SIZE} -DSTACK_SIZE=${STACK_SIZE}
 
 clean:
        ${RM} ${RMFLAGS} main