blob: 40d05a9c74e8497d503805da88410f285b05cbca [file] [log] [blame]
Edward O'Callaghand9046352009-08-03 01:08:25 +00001#
2# Create a library called "CompilerRT" which includes the source files.
3
Edward O'Callaghan6c307f02009-08-03 05:59:48 +00004#INCLUDE_DIRECTORIES(
5# ${CMAKE_CURRENT_BINARY_DIR}
6#)
7
Edward O'Callaghand9046352009-08-03 01:08:25 +00008# Generic functions needed for each architecture
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +00009# libcompiler_rt.Generic.a libcompiler_rt.Optimized.a
Edward O'Callaghand9046352009-08-03 01:08:25 +000010
11SET( SRCS
12 absvdi2.c cmpdi2.c fixdfdi.c floatdidf.c moddi3.c negvti2.c ucmpdi2.c
13 absvsi2.c cmpti2.c fixdfti.c floatdisf.c modsi3.c paritydi2.c ucmpti2.c
14 absvti2.c ctzdi2.c fixsfdi.c floatdixf.c modti3.c paritysi2.c udivdi3.c
15 addvdi3.c ctzsi2.c fixsfti.c floattidf.c muldc3.c parityti2.c udivmoddi4.c
16 addvsi3.c ctzti2.c fixunsdfdi.c floattisf.c muldi3.c popcountdi2.c udivmodti4.c
17 addvti3.c divdc3.c fixunsdfsi.c floattixf.c mulsc3.c popcountsi2.c udivsi3.c
18 apple_versioning.c divdi3.c fixunsdfti.c floatundidf.c multi3.c popcountti2.c udivti3.c
19 ashldi3.c divsc3.c fixunssfdi.c floatundisf.c mulvdi3.c powidf2.c umoddi3.c
20 ashlti3.c divsi3.c fixunssfsi.c floatundixf.c mulvsi3.c powisf2.c umodsi3.c
21 ashrdi3.c divti3.c fixunssfti.c floatuntidf.c mulvti3.c powitf2.c umodti3.c
22 ashrti3.c divxc3.c fixunsxfdi.c floatuntisf.c mulxc3.c powixf2.c
23 clear_cache.c enable_execute_stack.c fixunsxfsi.c floatuntixf.c negdi2.c subvdi3.c
24 clzdi2.c eprintf.c fixunsxfti.c gcc_personality_v0.c negti2.c subvsi3.c
25 clzsi2.c ffsdi2.c fixxfdi.c lshrdi3.c negvdi2.c subvti3.c
26 clzti2.c ffsti2.c fixxfti.c lshrti3.c negvsi2.c trampoline_setup.c
27 )
28
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000029# Generic
30SET( Common_SRCS
31 absvdi2.c absvsi2.c addvdi3.c addvsi3.c ashldi3.c ashrdi3.c
32 clear_cache.c clzdi2.c clzsi2.c cmpdi2.c ctzdi2.c ctzsi2.c
33 divdc3.c divdi3.c divsc3.c enable_execute_stack.c ffsdi2.c
34 fixdfdi.c fixsfdi.c fixunsdfdi.c fixunsdfsi.c fixunssfdi.c
35 fixunssfsi.c floatdidf.c floatdisf.c floatundidf.c floatundisf.c
36 gcc_personality_v0.c lshrdi3.c moddi3.c muldc3.c muldi3.c
37 mulsc3.c mulvdi3.c mulvsi3.c negdi2.c negvdi2.c negvsi2.c
38 paritydi2.c paritysi2.c popcountdi2.c popcountsi2.c powidf2.c
39 powisf2.c subvdi3.c subvsi3.c ucmpdi2.c udivdi3.c
40 udivmoddi4.c umoddi3.c apple_versioning.c eprintf.c
41 )
42
43SET( i386_Functions
44 divxc3.c fixunsxfdi.c fixunsxfsi.c fixxfdi.c
45 floatdixf.c floatundixf.c mulxc3.c powixf2.c
46 )
47
Edward O'Callaghand9046352009-08-03 01:08:25 +000048# Optimized functions for each architecture
49
50# Commenting out for the min until the basics are working first.
51# ADD_SUBDIRECTORY( ppc )
52# ADD_SUBDIRECTORY( x86_64 )
53# ADD_SUBDIRECTORY( i386 )
Edward O'Callaghan880cafc2009-08-03 02:15:06 +000054
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000055#FOREACH( LOOP_VAR ${Achitectures} )
56# See ARCHIVE_OUTPUT_DIRECTORY docs.
57#${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${LOOP_VAR}
58#ENDFOREACH
59
60ADD_LIBRARY( ${PROJECT_NAME}-Common STATIC ${Common_SRCS} )
61#ADD_LIBRARY( ${PROJECT_NAME}-i386 STATIC ${i386_Functions} )
62
63# [[debug|optimized|general]
64#TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${PROJECT_NAME}-Common optimized ${PROJECT_NAME}-i386 )
65