freebsd-src/lib/libcxxrt/Makefile
Brooks Davis da77a1b4f0 libcxxrt: don't export nonexistant symbols
Remove version entries that we don't build.

Add an arm specific Version.map and for other targets run the files
through sed to handle int vs long in new and delete.

Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp,
but it doesn't currently handle C++ symbols so be annoyingly duplicative
for now.

Differential Revision:	https://reviews.freebsd.org/D44325
2024-04-16 22:14:21 +01:00

44 lines
786 B
Makefile

.include <bsd.own.mk>
PACKAGE= clibs
SRCDIR= ${SRCTOP}/contrib/libcxxrt
SHLIB_MAJOR= 1
SHLIBDIR?= /lib
.PATH: ${SRCDIR}
LIB= cxxrt
SRCS+= auxhelper.cc
SRCS+= dynamic_cast.cc
SRCS+= exception.cc
SRCS+= guard.cc
SRCS+= libelftc_dem_gnu3.c
SRCS+= memory.cc
SRCS+= stdexcept.cc
SRCS+= terminate.cc
SRCS+= typeinfo.cc
WARNS?= 0
CFLAGS+= -isystem ${SRCDIR} -nostdinc++
CXXSTD?= c++14
.if exists(Version.map.${MACHINE})
VERSION_MAP= ${.CURDIR}/Version.map.${MACHINE}
.else
.if ${MACHINE_ABI:Mlong32}
VERSION_MAP= Version-32.map
.else
VERSION_MAP= Version-64.map
.endif
Version-32.map: Version.map
sed 's/%%NEW_DELETE_TYPE%%/int/' ${.ALLSRC} > ${.TARGET}
Version-64.map: Version.map
sed 's/%%NEW_DELETE_TYPE%%/long/' ${.ALLSRC} > ${.TARGET}
.endif
.include <bsd.lib.mk>