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