Module Name: src
Committed By: joerg
Date: Tue Dec 3 16:15:22 UTC 2013
Added Files:
src/sys/lib/libkern: Makefile.compiler-rt
Log Message:
libkern build glue for compiler-rt.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/lib/libkern/Makefile.compiler-rt
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: src/sys/lib/libkern/Makefile.compiler-rt
diff -u /dev/null src/sys/lib/libkern/Makefile.compiler-rt:1.1
--- /dev/null Tue Dec 3 16:15:22 2013
+++ src/sys/lib/libkern/Makefile.compiler-rt Tue Dec 3 16:15:22 2013
@@ -0,0 +1,106 @@
+# $NetBSD: Makefile.compiler-rt,v 1.1 2013/12/03 16:15:22 joerg Exp $
+
+COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
+
+.if ${MACHINE_ARCH} == "powerpc"
+COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc
+COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/ppc
+.else
+COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_CPU}
+COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/${MACHINE_ARCH}
+.endif
+
+.PATH: ${COMPILER_RT_CPU_DIR}
+.PATH: ${COMPILER_RT_ARCH_DIR}
+.PATH: ${COMPILER_RT_SRCDIR}/lib
+
+GENERIC_SRCS+= \
+ absvdi2.c \
+ absvsi2.c \
+ absvti2.c \
+ addvdi3.c \
+ addvsi3.c \
+ addvti3.c \
+ ashldi3.c \
+ ashlti3.c \
+ ashrdi3.c \
+ ashrti3.c \
+ clzdi2.c \
+ clzsi2.c \
+ clzti2.c \
+ cmpdi2.c \
+ cmpti2.c \
+ ctzdi2.c \
+ ctzsi2.c \
+ ctzti2.c \
+ divdi3.c \
+ divmoddi4.c \
+ divmodsi4.c \
+ divsi3.c \
+ divti3.c \
+ ffsdi2.c \
+ ffsti2.c \
+ int_util.c \
+ lshrdi3.c \
+ lshrti3.c \
+ moddi3.c \
+ modsi3.c \
+ modti3.c \
+ muldi3.c \
+ mulodi4.c \
+ mulosi4.c \
+ muloti4.c \
+ multi3.c \
+ mulvdi3.c \
+ mulvsi3.c \
+ mulvti3.c \
+ negdi2.c \
+ negti2.c \
+ negvdi2.c \
+ negvsi2.c \
+ negvti2.c \
+ paritydi2.c \
+ paritysi2.c \
+ parityti2.c \
+ popcountdi2.c \
+ popcountsi2.c \
+ popcountti2.c \
+ subvdi3.c \
+ subvsi3.c \
+ subvti3.c \
+ ucmpdi2.c \
+ ucmpti2.c \
+ udivdi3.c \
+ udivmoddi4.c \
+ udivmodsi4.c \
+ udivmodti4.c \
+ udivsi3.c \
+ udivti3.c \
+ umoddi3.c \
+ umodsi3.c \
+ umodti3.c
+
+.if ${MACHINE_CPU} == "arm"
+. if !empty(LIBC_MACHINE_ARCH:Mearm*)
+GENERIC_SRCS+= \
+ aeabi_idivmod.S \
+ aeabi_ldivmod.S \
+ aeabi_uidivmod.S \
+ aeabi_uldivmod.S
+. endif
+.endif
+
+.for src in ${GENERIC_SRCS}
+. if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
+ exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
+SRCS+= ${src:R}.S
+. else
+SRCS+= ${src}
+COPTS.${src}+= -Wno-missing-prototypes \
+ -Wno-old-style-definition \
+ -Wno-strict-prototypes \
+ -Wno-uninitialized
+. endif
+.endfor
+
+CPPFLAGS.int_util.c+= -DKERNEL_USE