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