1PACKAGE= clibs 2SHLIBDIR?= /lib 3 4.include <src.opts.mk> 5 6SRCDIR= ${SRCTOP}/contrib/libcxxrt 7 8SHLIB_MAJOR= 1 9 10.PATH: ${SRCDIR} 11 12LIB= cxxrt 13 14SRCS+= auxhelper.cc 15SRCS+= dynamic_cast.cc 16SRCS+= exception.cc 17SRCS+= guard.cc 18SRCS+= libelftc_dem_gnu3.c 19SRCS+= memory.cc 20SRCS+= stdexcept.cc 21SRCS+= terminate.cc 22SRCS+= typeinfo.cc 23 24WARNS?= 0 25CFLAGS+= -isystem ${SRCDIR} -nostdinc++ 26 27.if exists(Version.map.${MACHINE}) 28VERSION_MAP= ${.CURDIR}/Version.map.${MACHINE} 29.else 30.if ${MACHINE_ABI:Mlong32} 31VERSION_MAP= Version-32.map 32.else 33VERSION_MAP= Version-64.map 34.endif 35 36Version-32.map: Version.map 37 sed 's/%%NEW_DELETE_TYPE%%/int/' ${.ALLSRC} > ${.TARGET} 38 39Version-64.map: Version.map 40 sed 's/%%NEW_DELETE_TYPE%%/long/' ${.ALLSRC} > ${.TARGET} 41.endif 42 43.include <bsd.lib.mk> 44 45# gcc13 doesn't support _Float16 on riscv, powerpc64, and x86 or __int128 46# on i386. Disable checks for missing symbols to allow this to link. 47# 48# XXX: This is a hack that hides an ABI divergence between clang and gcc. 49.if ${COMPILER_TYPE} == "gcc" && \ 50 (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ 51 ${MACHINE_ARCH:Mpowerpc64*} || ${MACHINE_ARCH} == "riscv64") 52LDFLAGS+= -Wl,--undefined-version 53.endif 54