16077246eSBrooks DavisPACKAGE= clibs 2911a6479SDimitry AndricSHLIBDIR?= /lib 3911a6479SDimitry Andric 46077246eSBrooks Davis.include <src.opts.mk> 57a984708SDavid Chisnall 669877978SEnji CooperSRCDIR= ${SRCTOP}/contrib/libcxxrt 77a984708SDavid Chisnall 87a984708SDavid ChisnallSHLIB_MAJOR= 1 97a984708SDavid Chisnall 107a984708SDavid Chisnall.PATH: ${SRCDIR} 117a984708SDavid Chisnall 127a984708SDavid ChisnallLIB= cxxrt 137a984708SDavid Chisnall 143c3df366SDimitry AndricSRCS+= auxhelper.cc 153c3df366SDimitry AndricSRCS+= dynamic_cast.cc 163c3df366SDimitry AndricSRCS+= exception.cc 173c3df366SDimitry AndricSRCS+= guard.cc 183c3df366SDimitry AndricSRCS+= libelftc_dem_gnu3.c 193c3df366SDimitry AndricSRCS+= memory.cc 203c3df366SDimitry AndricSRCS+= stdexcept.cc 213c3df366SDimitry AndricSRCS+= terminate.cc 223c3df366SDimitry AndricSRCS+= typeinfo.cc 237a984708SDavid Chisnall 24ecebb3ccSKyle EvansWARNS?= 0 25f661dbeeSBryan DreweryCFLAGS+= -isystem ${SRCDIR} -nostdinc++ 26da77a1b4SBrooks Davis 27da77a1b4SBrooks Davis.if exists(Version.map.${MACHINE}) 28da77a1b4SBrooks DavisVERSION_MAP= ${.CURDIR}/Version.map.${MACHINE} 29da77a1b4SBrooks Davis.else 30da77a1b4SBrooks Davis.if ${MACHINE_ABI:Mlong32} 31da77a1b4SBrooks DavisVERSION_MAP= Version-32.map 32da77a1b4SBrooks Davis.else 33da77a1b4SBrooks DavisVERSION_MAP= Version-64.map 34da77a1b4SBrooks Davis.endif 35da77a1b4SBrooks Davis 36da77a1b4SBrooks DavisVersion-32.map: Version.map 37da77a1b4SBrooks Davis sed 's/%%NEW_DELETE_TYPE%%/int/' ${.ALLSRC} > ${.TARGET} 38da77a1b4SBrooks Davis 39da77a1b4SBrooks DavisVersion-64.map: Version.map 40da77a1b4SBrooks Davis sed 's/%%NEW_DELETE_TYPE%%/long/' ${.ALLSRC} > ${.TARGET} 41da77a1b4SBrooks Davis.endif 427a984708SDavid Chisnall 437a984708SDavid Chisnall.include <bsd.lib.mk> 44*1062db30SBrooks Davis 45*1062db30SBrooks Davis# gcc13 doesn't support _Float16 on riscv, powerpc64, and x86 or __int128 46*1062db30SBrooks Davis# on i386. Disable checks for missing symbols to allow this to link. 47*1062db30SBrooks Davis# 48*1062db30SBrooks Davis# XXX: This is a hack that hides an ABI divergence between clang and gcc. 49*1062db30SBrooks Davis.if ${COMPILER_TYPE} == "gcc" && \ 50*1062db30SBrooks Davis (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ 51*1062db30SBrooks Davis ${MACHINE_ARCH:Mpowerpc64*} || ${MACHINE_ARCH} == "riscv64") 52*1062db30SBrooks DavisLDFLAGS+= -Wl,--undefined-version 53*1062db30SBrooks Davis.endif 54