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