##
-# Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (c) 2006-2007 Apple Inc. All rights reserved.
#
# @APPLE_LICENSE_HEADER_START@
#
TESTROOT = ../..
include ${TESTROOT}/include/common.makefile
-SHELL = bash # use bash shell so we can redirect just stderr
#
-# The point of this test is a check that ld
-# can figure out which architecture is needed
-# by looking at the .o files when -arch is not used.
+# Check that ld can figure out architecture from .o files without -arch option
#
run: all
all:
- ${CC} ${CCFLAGS} hello.c -c -o hello.o -mmacosx-version-min=10.4
+ ${CC} ${CCFLAGS} hello.c -c -o hello.o
${FAIL_IF_BAD_OBJ} hello.o
- ${LD} -r -lcrt1.o hello.o -o hello-r.o -lSystem
- ${FAIL_IF_ERROR} ${OBJECTDUMP} hello-r.o >/dev/null
- file hello-r.o | grep ${ARCH} | ${PASS_IFF_STDIN}
+ ${LD} ${LDFLAGS} -lcrt1.o hello.o -o hello -lSystem
+ file hello | grep ${FILEARCH} | ${PASS_IFF_STDIN}
clean:
- rm -rf *.o
+ rm -rf hello.o hello