2015-01-08 22:40:56 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-11-07 04:55:23 +00:00
|
|
|
.include <bsd.compiler.mk>
|
2015-01-08 22:40:56 +00:00
|
|
|
|
2017-11-07 09:47:05 +00:00
|
|
|
# armv[67] is a bit special since we allow a soft-floating version via
|
2017-12-02 17:39:04 +00:00
|
|
|
# CPUTYPE matching *soft*. This variant may not actually work though.
|
2017-11-07 06:26:48 +00:00
|
|
|
.if ${MACHINE_ARCH:Marmv[67]*} != "" && \
|
2017-11-07 09:47:05 +00:00
|
|
|
(!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
|
2017-12-02 17:39:04 +00:00
|
|
|
CRTARCH?= armhf
|
|
|
|
.else
|
2017-11-05 20:38:40 +00:00
|
|
|
CRTARCH?= ${MACHINE_CPUARCH:C/amd64/x86_64/}
|
2017-12-02 17:39:04 +00:00
|
|
|
.endif
|
2016-09-03 21:41:29 +00:00
|
|
|
CRTSRC= ${SRCTOP}/contrib/compiler-rt
|
2015-01-08 22:40:56 +00:00
|
|
|
|
2016-09-03 21:41:29 +00:00
|
|
|
.PATH: ${CRTSRC}/lib
|
|
|
|
|
2017-12-20 20:27:59 +00:00
|
|
|
CLANGDIR= /usr/lib/clang/6.0.0
|
2016-09-03 21:41:29 +00:00
|
|
|
LIBDIR= ${CLANGDIR}/lib/freebsd
|
2015-01-08 22:40:56 +00:00
|
|
|
|
|
|
|
NO_PIC=
|
2016-09-03 21:41:29 +00:00
|
|
|
MK_PROFILE= no
|
2015-01-08 22:40:56 +00:00
|
|
|
|
2016-09-03 21:41:29 +00:00
|
|
|
WARNS?= 0
|
2015-01-08 22:40:56 +00:00
|
|
|
|
|
|
|
SSP_CFLAGS=
|
2016-09-03 21:41:29 +00:00
|
|
|
CFLAGS+= -DNDEBUG
|
|
|
|
CFLAGS+= ${PICFLAG}
|
|
|
|
CFLAGS+= -fno-builtin
|
|
|
|
CFLAGS+= -fno-exceptions
|
2017-11-05 19:25:06 +00:00
|
|
|
CXXFLAGS+= -fno-rtti
|
|
|
|
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
|
2016-09-03 21:41:29 +00:00
|
|
|
CFLAGS+= -fno-sanitize=safe-stack
|
2015-09-10 20:35:47 +00:00
|
|
|
.endif
|
2016-09-03 21:41:29 +00:00
|
|
|
CFLAGS+= -fno-stack-protector
|
|
|
|
CFLAGS+= -funwind-tables
|
2017-11-05 19:25:06 +00:00
|
|
|
CXXFLAGS+= -fvisibility-inlines-hidden
|
|
|
|
CXXFLAGS+= -fvisibility=hidden
|
2016-09-03 21:41:29 +00:00
|
|
|
CFLAGS+= -I${CRTSRC}/lib
|
|
|
|
CXXFLAGS+= -std=c++11
|