blob: e29474a1da6d666151098e2c81631bbd4d7a0386 [file] [log] [blame]
Edward O'Callaghan6912ed02009-08-03 01:08:25 +00001#
2# Create a library called "CompilerRT" which includes the source files.
3
Edward O'Callaghan7578f802009-08-03 05:59:48 +00004#INCLUDE_DIRECTORIES(
5# ${CMAKE_CURRENT_BINARY_DIR}
6#)
7
Edward O'Callaghan6912ed02009-08-03 01:08:25 +00008# Generic functions needed for each architecture
Edward O'Callaghanccf48132009-08-09 18:41:02 +00009# libcompiler_rt.Generic.a libcompiler_rt.Optimized.a
Edward O'Callaghan6912ed02009-08-03 01:08:25 +000010
Edward O'Callaghanccf48132009-08-09 18:41:02 +000011# Generic
Edward O'Callaghana55dd002009-10-29 00:07:46 +000012SET( Generic_SRCS
13 absvdi2.c absvsi2.c addvdi3.c addvsi3.c ashldi3.c ashrdi3.c
14 clzdi2.c clzsi2.c cmpdi2.c ctzdi2.c ctzsi2.c
15 divdc3.c divdi3.c divsc3.c ffsdi2.c
16 fixdfdi.c fixsfdi.c fixunsdfdi.c fixunsdfsi.c fixunssfdi.c
17 fixunssfsi.c floatdidf.c floatdisf.c floatundidf.c floatundisf.c
18 gcc_personality_v0.c lshrdi3.c moddi3.c muldc3.c muldi3.c
19 mulsc3.c mulvdi3.c mulvsi3.c negdi2.c negvdi2.c negvsi2.c
20 paritydi2.c paritysi2.c popcountdi2.c popcountsi2.c powidf2.c
21 powisf2.c subvdi3.c subvsi3.c ucmpdi2.c udivdi3.c
22 udivmoddi4.c umoddi3.c apple_versioning.c eprintf.c
Edward O'Callaghanccf48132009-08-09 18:41:02 +000023 )
24
Edward O'Callaghan6912ed02009-08-03 01:08:25 +000025# Optimized functions for each architecture
26
27# Commenting out for the min until the basics are working first.
28# ADD_SUBDIRECTORY( ppc )
29# ADD_SUBDIRECTORY( x86_64 )
30# ADD_SUBDIRECTORY( i386 )
Edward O'Callaghan2e2d1a82009-09-14 12:45:07 +000031# ADD_SUBDIRECTORY( arm )
Edward O'Callaghan43fb93a2009-08-03 02:15:06 +000032
Edward O'Callaghana55dd002009-10-29 00:07:46 +000033# List of functions needed for each architecture.
34SET( i386_Functions
35 divxc3.c fixunsxfdi.c fixunsxfsi.c fixxfdi.c floatdixf.c
36 floatundixf.c mulxc3.c powixf2.c clear_cache.c enable_execute_stack.c
37 )
38
39SET( x86_64_Functions
40 absvti2.c addvti3.c ashlti3.c ashrti3.c clzti2.c cmpti2.c
41 ctzti2.c divti3.c divxc3.c ffsti2.c fixdfti.c fixsfti.c
42 fixunsdfti.c fixunssfti.c fixunsxfdi.c fixunsxfsi.c
43 fixunsxfti.c fixxfdi.c fixxfti.c floatdixf.c floattidf.c
44 floattisf.c floattixf.c floatundixf.c floatuntidf.c
45 floatuntisf.c floatuntixf.c lshrti3.c modti3.c multi3.c
46 mulvti3.c mulxc3.c negti2.c negvti2.c parityti2.c
47 popcountti2.c powixf2.c subvti3.c ucmpti2.c udivmodti4.c
48 udivti3.c umodti3.c clear_cache.c enable_execute_stack.c
49 )
50
51SET( PPC_Functions
52 divtc3.c fixtfdi.c fixunstfdi.c floatditf.c floatunditf.c
53 gcc_qadd.c gcc_qdiv.c gcc_qmul.c gcc_qsub.c multc3.c
54 powitf2.c restFP.c saveFP.c trampoline_setup.c
55 clear_cache.c enable_execute_stack.c
56 )
57
58SET( ARM_Functions
59 adddf3vfp.c addsf3vfp.c bswapdi2.c bswapsi2.c divdf3vfp.c
60 divsf3vfp.c eqdf2vfp.c eqsf2vfp.c extendsfdf2vfp.c
61 fixdfsivfp.c fixsfsivfp.c fixunsdfsivfp.c fixunssfsivfp.c
62 floatsidfvfp.c floatsisfvfp.c floatunssidfvfp.c floatunssisfvfp.c
63 gedf2vfp.c gesf2vfp.c gtdf2vfp.c gtsf2vfp.c
64 ledf2vfp.c lesf2vfp.c ltdf2vfp.c ltsf2vfp.c
65 muldf3vfp.c mulsf3vfp.c
66 nedf2vfp.c negdf2vfp.c negsf2vfp.c nesf2vfp.c
67 subdf3vfp.c subsf3vfp.c truncdfsf2vfp.c unorddf2vfp.c unordsf2vfp.c
68 modsi3.c umodsi3.c udivsi3.c divsi3.c switch.c
69 )
70
Edward O'Callaghanccf48132009-08-09 18:41:02 +000071#FOREACH( LOOP_VAR ${Achitectures} )
72# See ARCHIVE_OUTPUT_DIRECTORY docs.
73#${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${LOOP_VAR}
74#ENDFOREACH
75
Edward O'Callaghana55dd002009-10-29 00:07:46 +000076ADD_LIBRARY( ${PROJECT_NAME}-Generic STATIC ${Generic_SRCS} )
Edward O'Callaghanccf48132009-08-09 18:41:02 +000077#ADD_LIBRARY( ${PROJECT_NAME}-i386 STATIC ${i386_Functions} )
78
79# [[debug|optimized|general]
80#TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${PROJECT_NAME}-Common optimized ${PROJECT_NAME}-i386 )
81