1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/devel/boost-all/compiled.mk
Jan Beich 3f842ac12c devel/boost-all: switch to C++17 on FreeBSD >= 11.2
PR:		231077
Exp-run by:	antoine
2018-09-08 00:53:10 +00:00

55 lines
1.6 KiB
Makefile

USE_LDCONFIG= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
MAKE_CMD= bjam
MAKEFILE= #
MAKE_FLAGS= #
ALL_TARGET= stage
# XXX Drop conditional after 10.4 EOL as both libstdc++ 7 and libc++ 6
# have near complete C++17 support.
.if exists(/usr/lib/libstdc++.so) || exists(/usr/include/c++/v1/__undef_macros)
USES+= compiler:c++17-lang
USE_CXXSTD= gnu++17
.else
USES+= compiler:c++14-lang
USE_CXXSTD= gnu++14
.endif
PLIST_SUB+= BOOST_SHARED_LIB_VER=${PORTVERSION}
PKG_MESSAGE_FILE_THREADS= ${PORTSDIR}/devel/boost-all/pkg-message.threads
PKG_MESSAGE_FILE_PYTHON= ${PORTSDIR}/devel/boost-all/pkg-message.python
MAKE_ARGS= --layout=system \
--prefix=${PREFIX} \
-d2
# Our compiler-flags will be added AFTER those set by bjam. We remove
# the optimization level, because Boost sets it itself (to -O3 in case
# of gcc/g++):
MAKE_ARGS+= cxxflags="${CXXFLAGS:N-O*}" cflags="${CFLAGS:N-O*}"
MAKE_ARGS+= --toolset=${CHOSEN_COMPILER_TYPE} \
${_MAKE_JOBS}
DEBUG_MAKE_ARGS= debug
DEBUG_MAKE_ARGS_OFF= release
MAKE_ARGS+= threading=multi \
link=shared,static
MAKE_ARGS+= optimization=speed
OPTIMIZED_CFLAGS_MAKE_ARGS= inlining=full
# ccache build fails when using precompiled headers, on a cached build.
#
# base gcc 4.2.1 fails when using precompiled headers on 11.0+ kernel.
# https://lists.freebsd.org/pipermail/svn-src-all/2015-March/101722.html
MAKE_ARGS+= pch=off
post-patch:
.if defined(USE_BINUTILS)
@${ECHO} "using ${CHOSEN_COMPILER_TYPE} : : ${CXX} : <linkflags>-B${LOCALBASE}/bin ;" >> ${WRKSRC}/tools/build/src/user-config.jam
.else
@${ECHO} "using ${CHOSEN_COMPILER_TYPE} : : ${CXX} ;" >> ${WRKSRC}/tools/build/src/user-config.jam
.endif