1 # $NetBSD: Makefile.inc,v 1.27 2014/09/03 19:29:14 matt Exp $
3 COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
5 .if ${LIBC_MACHINE_ARCH} == "powerpc" || ${LIBC_MACHINE_ARCH} == "powerpc64"
6 COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
7 COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/ppc
9 COMPILER_RT_CPU_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/${LIBC_MACHINE_CPU}
10 COMPILER_RT_ARCH_DIR= ${COMPILER_RT_SRCDIR}/lib/builtins/${LIBC_MACHINE_ARCH}
14 LIBC_MACHINE_CPU?= ${MACHINE_CPU}
15 .endif # defined(__MINIX)
17 .PATH: ${COMPILER_RT_CPU_DIR}
18 .PATH: ${COMPILER_RT_ARCH_DIR}
19 .PATH: ${COMPILER_RT_SRCDIR}/lib/builtins
20 .PATH: ${COMPILER_RT_SRCDIR}/lib/profile
22 # Complex support needs parts of libm
30 # Implemented on top of our atomic interface.
31 #GENERIC_SRCS+= atomic.c
33 .if ${HAVE_LIBGCC_EH} == "no"
39 # Conflicts with soft-float
127 .if ${MACHINE_ARCH} != "aarch64"
141 # These have h/w instructions which are always used.
142 .if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "aarch64" \
143 && ${LIBC_MACHINE_CPU} != "powerpc" && ${LIBC_MACHINE_CPU} != "or1k"
148 # These have h/w instructions which are always used.
149 .if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_ARCH} != "vax" \
150 && ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_CPU} != "powerpc" \
151 && ${LIBC_MACHINE_CPU} != "or1k"
156 # These have h/w instructions which are always used.
157 .if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc" \
158 && ${LIBC_MACHINE_CPU} != "aarch64" && ${LIBC_MACHINE_ARCH} != "vax"
166 . if ${LIBC_MACHINE_CPU} != "sh3"
167 # On sh3 __udivsi3 is gcc "millicode" with special calling convention
168 # (less registers clobbered than usual). Each DSO that needs it gets
169 # its own hidden copy from libgcc.a.
186 # These have h/w instructions which are always used.
187 .if ${LIBC_MACHINE_ARCH} != "alpha" && ${LIBC_MACHINE_CPU} != "powerpc64" \
188 && ${LIBC_MACHINE_ARCH} != "aarch64" && ${LIBC_MACHINE_CPU} != "or1k"
195 # Don't need these on 64-bit machines.
196 .if empty(LIBC_MACHINE_ARCH:M*64*) && ${LIBC_MACHINE_ARCH} != "alpha"
216 InstrProfilingBuffer.c \
217 InstrProfilingFile.c \
218 InstrProfilingPlatformOther.c
220 .if ${LIBC_MACHINE_ARCH} == "powerpc" || ${LIBC_MACHINE_ARCH} == "powerpc64"
232 .if ${LIBC_MACHINE_CPU} == "aarch64"
237 .if ${LIBC_MACHINE_CPU} == "arm"
238 .if !empty(LIBC_MACHINE_ARCH:Mearm*)
247 # Not yet, overlaps with softfloat
250 # Not yet, requires ARMv6
256 .for src in ${GENERIC_SRCS}
257 . if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \
258 exists(${COMPILER_RT_ARCH_DIR}/${src:R}.S)
262 . if ${src:E} != "cc"
263 COPTS.${src}+= -Wno-missing-prototypes \
264 -Wno-old-style-definition \
265 -Wno-strict-prototypes \