svn commit: r214195 - user/ed/compiler-rt/lib/libcompiler_rt
Ed Schouten
ed at FreeBSD.org
Fri Oct 22 06:39:15 UTC 2010
Author: ed
Date: Fri Oct 22 06:39:14 2010
New Revision: 214195
URL: http://svn.freebsd.org/changeset/base/214195
Log:
Add infrastructure to build per-arch files.
When assembly-files are present in the per-arch directory, they will be
preferred over the C-version.
Modified:
user/ed/compiler-rt/lib/libcompiler_rt/Makefile
Modified: user/ed/compiler-rt/lib/libcompiler_rt/Makefile
==============================================================================
--- user/ed/compiler-rt/lib/libcompiler_rt/Makefile Fri Oct 22 04:43:04 2010 (r214194)
+++ user/ed/compiler-rt/lib/libcompiler_rt/Makefile Fri Oct 22 06:39:14 2010 (r214195)
@@ -6,31 +6,44 @@ LIB= compiler_rt
NO_PIC=
WARNS?= 2
-.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib
+.if ${MACHINE_CPUARCH} == "amd64"
+CRTARCH=x86_64
+.elif ${MACHINE_CPUARCH} == "powerpc"
+CRTARCH=ppc
+.else
+CRTARCH=${MACHINE_CPUARCH}
+.endif
+
+CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib
+
+.PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC}
+
+SRCF= absvdi2 absvsi2 absvti2 adddf3 addsf3 addvdi3 addvsi3 addvti3 \
+ apple_versioning ashldi3 ashlti3 ashrdi3 ashrti3 clear_cache \
+ clzdi2 clzsi2 clzti2 cmpdi2 cmpti2 comparedf2 comparesf2 \
+ ctzdi2 ctzsi2 ctzti2 divdc3 divdf3 divdi3 divsc3 divsf3 divsi3 \
+ divti3 divxc3 enable_execute_stack eprintf extendsfdf2 ffsdi2 \
+ ffsti2 fixdfdi fixdfsi fixdfti fixsfdi fixsfsi fixsfti \
+ fixunsdfdi fixunsdfsi fixunsdfti fixunssfdi fixunssfsi \
+ fixunssfti fixunsxfdi fixunsxfsi fixunsxfti fixxfdi fixxfti \
+ floatdidf floatdisf floatdixf floatsidf floatsisf floattidf \
+ floattisf floattixf floatundidf floatundisf floatundixf \
+ floatunsidf floatunsisf floatuntidf floatuntisf floatuntixf \
+ gcc_personality_v0 lshrdi3 lshrti3 moddi3 modsi3 modti3 muldc3 \
+ muldf3 muldi3 mulsc3 mulsf3 multi3 mulvdi3 mulvsi3 mulvti3 \
+ mulxc3 negdf2 negdi2 negsf2 negti2 negvdi2 negvsi2 negvti2 \
+ paritydi2 paritysi2 parityti2 popcountdi2 popcountsi2 \
+ popcountti2 powidf2 powisf2 powitf2 powixf2 subvdi3 subvsi3 \
+ subvti3 trampoline_setup truncdfsf2 ucmpdi2 ucmpti2 udivdi3 \
+ udivmoddi4 udivmodti4 udivsi3 udivti3 umoddi3 umodsi3 umodti3
-SRCS+= absvdi2.c absvsi2.c absvti2.c adddf3.c addsf3.c addvdi3.c \
- addvsi3.c addvti3.c apple_versioning.c ashldi3.c ashlti3.c \
- ashrdi3.c ashrti3.c clear_cache.c clzdi2.c clzsi2.c clzti2.c \
- cmpdi2.c cmpti2.c comparedf2.c comparesf2.c ctzdi2.c ctzsi2.c \
- ctzti2.c divdc3.c divdf3.c divdi3.c divsc3.c divsf3.c divsi3.c \
- divti3.c divxc3.c enable_execute_stack.c eprintf.c \
- extendsfdf2.c ffsdi2.c ffsti2.c fixdfdi.c fixdfsi.c fixdfti.c \
- fixsfdi.c fixsfsi.c fixsfti.c fixunsdfdi.c fixunsdfsi.c \
- fixunsdfti.c fixunssfdi.c fixunssfsi.c fixunssfti.c \
- fixunsxfdi.c fixunsxfsi.c fixunsxfti.c fixxfdi.c fixxfti.c \
- floatdidf.c floatdisf.c floatdixf.c floatsidf.c floatsisf.c \
- floattidf.c floattisf.c floattixf.c floatundidf.c \
- floatundisf.c floatundixf.c floatunsidf.c floatunsisf.c \
- floatuntidf.c floatuntisf.c floatuntixf.c gcc_personality_v0.c \
- lshrdi3.c lshrti3.c moddi3.c modsi3.c modti3.c muldc3.c \
- muldf3.c muldi3.c mulsc3.c mulsf3.c multi3.c mulvdi3.c \
- mulvsi3.c mulvti3.c mulxc3.c negdf2.c negdi2.c negsf2.c \
- negti2.c negvdi2.c negvsi2.c negvti2.c paritydi2.c paritysi2.c \
- parityti2.c popcountdi2.c popcountsi2.c popcountti2.c \
- powidf2.c powisf2.c powitf2.c powixf2.c subvdi3.c subvsi3.c \
- subvti3.c trampoline_setup.c truncdfsf2.c ucmpdi2.c ucmpti2.c \
- udivdi3.c udivmoddi4.c udivmodti4.c udivsi3.c udivti3.c \
- umoddi3.c umodsi3.c umodti3.c
+.for file in ${SRCF}
+. if exists(${CRTSRC}/${CRTARCH}/${file}.S)
+SRCS+= ${file}.S
+. else
+SRCS+= ${file}.c
+. endif
+.endfor
.if ${MK_INSTALLLIB} != "no"
SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a
More information about the svn-src-user
mailing list