xref: /freebsd/lib/libgcc_s/Makefile (revision 105fd928b0b5b35ab529e5f6914788dc49582901)
1# $FreeBSD$
2
3PACKAGE=	clibs
4SHLIB_NAME=	libgcc_s.so.1
5SHLIBDIR?=	/lib
6
7# Enabling UBSan triggers "undefined reference to vtable for __cxxabiv1::__function_type_info"
8MK_UBSAN:=	no
9
10.include <bsd.opts.mk>
11
12MK_SSP=		no
13WARNS?=	2
14
15LDFLAGS+=	-nodefaultlibs
16LIBADD+=	c
17
18VERSION_DEF=	${.CURDIR}/Versions.def
19SYMBOL_MAPS=	${.CURDIR}/Symbol.map
20# Export ARM AEABI unwind routines needed by libc and libthr.
21.if exists(${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map)
22SYMBOL_MAPS+=	${.CURDIR}/${MACHINE_CPUARCH}/Symbol.map
23.else
24SYMBOL_MAPS+=	${.CURDIR}/SymbolDefault.map
25.endif
26
27.include "../libcompiler_rt/Makefile.inc"
28.include "../libgcc_eh/Makefile.inc"
29
30# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
31# no option to silence its warning, so make warnings non-fatal.
32MK_WERROR.gcc=	no
33
34LIBCSRCDIR=	${SRCTOP}/lib/libc
35LIBMSRCDIR=	${SRCTOP}/lib/msun/src
36CFLAGS+=	-I${LIBCSRCDIR}/include -I${LIBCSRCDIR}/${MACHINE_CPUARCH}
37CFLAGS+=	-I${LIBMSRCDIR}
38.PATH:		${LIBMSRCDIR}
39SRCS+=		s_fabs.c
40SRCS+=		s_fabsf.c
41SRCS+=		s_fabsl.c
42SRCS+=		s_fmax.c
43SRCS+=		s_fmaxf.c
44SRCS+=		s_logb.c
45SRCS+=		s_logbf.c
46SRCS+=		s_scalbn.c
47SRCS+=		s_scalbnf.c
48
49# Don't include long double routines on architectures where long double
50# is the same size as double.
51.if ${MACHINE_CPUARCH} != "mips" && ${MACHINE_CPUARCH} != "arm" && \
52    ${MACHINE_CPUARCH} != "powerpc"
53SRCS+=		s_fmaxl.c
54SRCS+=		s_logbl.c
55SRCS+=		s_scalbnl.c
56.endif
57
58.include <bsd.lib.mk>
59