d61b3d7a72
:U:Mfoo expands to :Mfoo, apparently. Explicit check for CPUTYPE being defined, and test for it's value not containing *soft* before calling CRTARCH armhf. Tested, somewhat. Unfortunately recent changes appear to have affected cross-builds where it no longer works, per my tests after universe12a being upgraded from 07/2017 to 11/2017 sources (DESTDIR isn't being used in WORLDTMP; MK_SYSTEM_COMPILER might be causing issues right now). MFC after: 1 week MFC with: r325502 Reported by: imp
39 lines
789 B
Makefile
39 lines
789 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.compiler.mk>
|
|
|
|
.if ${MACHINE} == "arm"
|
|
.if ${MACHINE_ARCH:Marmv[67]*} != "" && \
|
|
(defined(CPUTYPE) && ${CPUTYPE:M*soft*} == "")
|
|
CRTARCH= armhf
|
|
.endif
|
|
.endif
|
|
CRTARCH?= ${MACHINE_CPUARCH:C/amd64/x86_64/}
|
|
CRTSRC= ${SRCTOP}/contrib/compiler-rt
|
|
|
|
.PATH: ${CRTSRC}/lib
|
|
|
|
CLANGDIR= /usr/lib/clang/5.0.0
|
|
LIBDIR= ${CLANGDIR}/lib/freebsd
|
|
|
|
NO_PIC=
|
|
MK_PROFILE= no
|
|
|
|
WARNS?= 0
|
|
|
|
SSP_CFLAGS=
|
|
CFLAGS+= -DNDEBUG
|
|
CFLAGS+= ${PICFLAG}
|
|
CFLAGS+= -fno-builtin
|
|
CFLAGS+= -fno-exceptions
|
|
CXXFLAGS+= -fno-rtti
|
|
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
|
|
CFLAGS+= -fno-sanitize=safe-stack
|
|
.endif
|
|
CFLAGS+= -fno-stack-protector
|
|
CFLAGS+= -funwind-tables
|
|
CXXFLAGS+= -fvisibility-inlines-hidden
|
|
CXXFLAGS+= -fvisibility=hidden
|
|
CFLAGS+= -I${CRTSRC}/lib
|
|
CXXFLAGS+= -std=c++11
|