]> git.saurik.com Git - apple/ld64.git/blob - unit-tests/test-cases/strip-test2/Makefile
ld64-85.tar.gz
[apple/ld64.git] / unit-tests / test-cases / strip-test2 / Makefile
1 ##
2 # Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
3 #
4 # @APPLE_LICENSE_HEADER_START@
5 #
6 # This file contains Original Code and/or Modifications of Original Code
7 # as defined in and that are subject to the Apple Public Source License
8 # Version 2.0 (the 'License'). You may not use this file except in
9 # compliance with the License. Please obtain a copy of the License at
10 # http://www.opensource.apple.com/apsl/ and read it before using this
11 # file.
12 #
13 # The Original Code and all software distributed under the License are
14 # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 # Please see the License for the specific language governing rights and
19 # limitations under the License.
20 #
21 # @APPLE_LICENSE_HEADER_END@
22 ##
23 TESTROOT = ../..
24 include ${TESTROOT}/include/common.makefile
25
26 # Test strip: symbols referenced by indirect symbol table entries that can'tÊ
27 # be stripped in:
28 # __ZN9__gnu_cxx13new_allocatorIiE7destroyEPi
29 # __ZNKSt12_Vector_baseIiSaIiEE13get_allocatorEv
30 # __ZN9__gnu_cxx13new_allocatorIiEC2ERKS1_
31 # __ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim
32 # __ZN9__gnu_cxx13new_allocatorIiED2Ev
33 # __ZNSt6vectorIiSaIiEEC1ERKS0_
34 # __ZNSaIiEC1ERKS_
35 # __ZN9__gnu_cxx13new_allocatorIiE10deallocateEPim
36 # __ZNSt12_Vector_baseIiSaIiEE12_Vector_implC1ERKS0_
37 # __ZNSaIiED2Ev
38 # __ZNSt12_Vector_baseIiSaIiEED2Ev
39 # __ZNSaIiEC1Ev
40 # __ZNSt12_Vector_baseIiSaIiEEC2ERKS0_
41 # __ZNSt6vectorIiSaIiEED1Ev
42 # __ZNSaIiED1Ev
43 # __ZSt8_DestroyIPiSaIiEEvT_S2_T0_
44 # __ZN9__gnu_cxx13new_allocatorIiEC2Ev
45 # __ZNSaIiEC2ERKS_
46 # __ZNSt12_Vector_baseIiSaIiEE12_Vector_implD1Ev
47
48
49 run: all
50
51
52 all:
53 $(CXX) main.cxx -arch ${ARCH} -o main
54 ${FAIL_IF_BAD_MACHO} main
55 ${FAIL_IF_ERROR} nm -j main >main-no-strip.nm
56 $(CXX) main.cxx -arch ${ARCH} -o main
57 ${FAIL_IF_BAD_MACHO} main
58
59 # Make sure there are no symbols in the stripped file that aren't
60 # in the unstripped
61 nm -j main | comm -23 - main-no-strip.nm | ${FAIL_IF_STDIN}
62
63 # Now make sure that all the __Z symbols exist
64 strip_cnt=`nm -j main | comm -12 - main-no-strip.nm | grep -c __Z`; \
65 nostrip_cnt=`nm -j main|grep -c __Z`; \
66 [ x"$$strip_cnt" = x"$$nostrip_cnt" ]
67 @echo PASS $$UNIT_TEST_NAME
68
69 clean:
70 rm -rf *.o main-* main