Changeset View
Standalone View
lib/libc++/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
Lint: Bad Filename: Name files using only letters, numbers, period, hyphen and underscore. | |||||
.include <src.opts.mk> | .include <src.opts.mk> | ||||
PACKAGE= clibs | PACKAGE= clibs | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
_LIBCXXABIDIR= ${SRCTOP}/contrib/libcxxabi | |||||
.else | |||||
_LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt | _LIBCXXRTDIR= ${SRCTOP}/contrib/libcxxrt | ||||
.endif | |||||
HDRDIR= ${SRCTOP}/contrib/libc++/include | HDRDIR= ${SRCTOP}/contrib/libc++/include | ||||
SRCDIR= ${SRCTOP}/contrib/libc++/src | SRCDIR= ${SRCTOP}/contrib/libc++/src | ||||
CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} | CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} | ||||
.if ${MACHINE_CPUARCH} == "arm" | .if ${MACHINE_CPUARCH} == "arm" | ||||
STATIC_CXXFLAGS+= -mlong-calls | STATIC_CXXFLAGS+= -mlong-calls | ||||
.endif | .endif | ||||
.PATH: ${SRCDIR} | .PATH: ${SRCDIR} | ||||
LIB= c++ | LIB= c++ | ||||
SHLIB_MAJOR= 1 | SHLIB_MAJOR= 1 | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
SHLIB_LDSCRIPT= libc++.ldscript.cxxabi | |||||
Done Inline ActionsSo this might not be what we want to do. Ugh. Because we use a linker script here for libc++, existing binaries have DT_NEEDED entries explicitly for libcxxrt.so.1. I guess we had a good reason for doing that rather than having libc++.so.1 have a DT_NEEDED. Anyway, this means that the current approach here will require us to keep providing a libcxxrt.so.1 as a compat library (maybe in compatX packages) and that new binaries will explicitly depend on libcxxabi.so.1. We could perhaps instead install libcxxabi.so.1 as libcxxrt.so.1 instead. Not sure which is better / worse. Perhaps I will end up adjusting this patch so that we build and install both libraries for now and the knob just affects what libc++ builds against and what the ldscript is. Blech. jhb: So this might not be what we want to do. Ugh. Because we use a linker script here for libc++… | |||||
Not Done Inline ActionsThe reason for the script was to make it possible for users to edit it, so they could switch between libsupc++ and libcxxrt, as far as I remember. Maybe it's best for the future to have libc++.so.1 requiring libc++abi.so now, or add some sort of compat symlink. dim: The reason for the script was to make it possible for users to edit it, so they could switch… | |||||
.else | |||||
SHLIB_LDSCRIPT= libc++.ldscript | SHLIB_LDSCRIPT= libc++.ldscript | ||||
.endif | |||||
SRCS+= algorithm.cpp | SRCS+= algorithm.cpp | ||||
SRCS+= any.cpp | SRCS+= any.cpp | ||||
SRCS+= bind.cpp | SRCS+= bind.cpp | ||||
SRCS+= charconv.cpp | SRCS+= charconv.cpp | ||||
SRCS+= chrono.cpp | SRCS+= chrono.cpp | ||||
SRCS+= condition_variable.cpp | SRCS+= condition_variable.cpp | ||||
SRCS+= debug.cpp | SRCS+= debug.cpp | ||||
Show All 20 Lines | |||||
SRCS+= utility.cpp | SRCS+= utility.cpp | ||||
SRCS+= valarray.cpp | SRCS+= valarray.cpp | ||||
SRCS+= variant.cpp | SRCS+= variant.cpp | ||||
SRCS+= vector.cpp | SRCS+= vector.cpp | ||||
SRCS+= filesystem/directory_iterator.cpp | SRCS+= filesystem/directory_iterator.cpp | ||||
SRCS+= filesystem/int128_builtins.cpp | SRCS+= filesystem/int128_builtins.cpp | ||||
SRCS+= filesystem/operations.cpp | SRCS+= filesystem/operations.cpp | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
.else | |||||
CXXRT_SRCS+= auxhelper.cc | CXXRT_SRCS+= auxhelper.cc | ||||
CXXRT_SRCS+= dynamic_cast.cc | CXXRT_SRCS+= dynamic_cast.cc | ||||
CXXRT_SRCS+= exception.cc | CXXRT_SRCS+= exception.cc | ||||
CXXRT_SRCS+= guard.cc | CXXRT_SRCS+= guard.cc | ||||
CXXRT_SRCS+= libelftc_dem_gnu3.c | CXXRT_SRCS+= libelftc_dem_gnu3.c | ||||
CXXRT_SRCS+= memory.cc | CXXRT_SRCS+= memory.cc | ||||
CXXRT_SRCS+= stdexcept.cc | CXXRT_SRCS+= stdexcept.cc | ||||
CXXRT_SRCS+= terminate.cc | CXXRT_SRCS+= terminate.cc | ||||
CXXRT_SRCS+= typeinfo.cc | CXXRT_SRCS+= typeinfo.cc | ||||
.for _S in ${CXXRT_SRCS} | .for _S in ${CXXRT_SRCS} | ||||
CLEANFILES+= cxxrt_${_S} | CLEANFILES+= cxxrt_${_S} | ||||
STATICOBJS+= cxxrt_${_S:R}.o | STATICOBJS+= cxxrt_${_S:R}.o | ||||
cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA | cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA | ||||
ln -sf ${.ALLSRC} ${.TARGET} | ln -sf ${.ALLSRC} ${.TARGET} | ||||
.endfor | .endfor | ||||
.endif | |||||
WARNS= 0 | WARNS= 0 | ||||
CFLAGS+= -isystem ${HDRDIR} | CFLAGS+= -isystem ${HDRDIR} | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
CFLAGS+= -isystem ${_LIBCXXABIDIR}/include | |||||
.else | |||||
CFLAGS+= -isystem ${_LIBCXXRTDIR} | CFLAGS+= -isystem ${_LIBCXXRTDIR} | ||||
.endif | |||||
CFLAGS+= -nostdinc++ | CFLAGS+= -nostdinc++ | ||||
CFLAGS+= -nostdlib | CFLAGS+= -nostdlib | ||||
CFLAGS+= -D_LIBCPP_BUILDING_LIBRARY | CFLAGS+= -D_LIBCPP_BUILDING_LIBRARY | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
CFLAGS+= -DLIBCXX_BUILDING_LIBCXXABI | |||||
.else | |||||
CFLAGS+= -DLIBCXXRT | CFLAGS+= -DLIBCXXRT | ||||
.endif | |||||
.if empty(CXXFLAGS:M-std=*) | .if empty(CXXFLAGS:M-std=*) | ||||
CXXFLAGS+= -std=c++11 | CXXFLAGS+= -std=c++11 | ||||
.endif | .endif | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
LIBADD+= cplusplusabi | |||||
.else | |||||
LIBADD+= cxxrt | LIBADD+= cxxrt | ||||
.endif | |||||
INCSGROUPS= STD EXP EXT | INCSGROUPS= STD EXP EXT | ||||
STD_HEADERS+= __bit_reference | STD_HEADERS+= __bit_reference | ||||
STD_HEADERS+= __bsd_locale_defaults.h | STD_HEADERS+= __bsd_locale_defaults.h | ||||
STD_HEADERS+= __bsd_locale_fallbacks.h | STD_HEADERS+= __bsd_locale_fallbacks.h | ||||
STD_HEADERS+= __config | STD_HEADERS+= __config | ||||
STD_HEADERS+= __debug | STD_HEADERS+= __debug | ||||
STD_HEADERS+= __errc | STD_HEADERS+= __errc | ||||
▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
STD_HEADERS+= utility | STD_HEADERS+= utility | ||||
STD_HEADERS+= valarray | STD_HEADERS+= valarray | ||||
STD_HEADERS+= variant | STD_HEADERS+= variant | ||||
STD_HEADERS+= vector | STD_HEADERS+= vector | ||||
STD_HEADERS+= version | STD_HEADERS+= version | ||||
STD_HEADERS+= wchar.h | STD_HEADERS+= wchar.h | ||||
STD_HEADERS+= wctype.h | STD_HEADERS+= wctype.h | ||||
.if ${MK_LIBCXXABI} != "no" | |||||
.else | |||||
RT_HEADERS+= cxxabi.h | RT_HEADERS+= cxxabi.h | ||||
RT_HEADERS+= unwind-arm.h | RT_HEADERS+= unwind-arm.h | ||||
RT_HEADERS+= unwind-itanium.h | RT_HEADERS+= unwind-itanium.h | ||||
RT_HEADERS+= unwind.h | RT_HEADERS+= unwind.h | ||||
.for hdr in ${RT_HEADERS} | |||||
STD+= ${_LIBCXXRTDIR}/${hdr} | |||||
.endfor | |||||
.endif | |||||
.for hdr in ${STD_HEADERS} | .for hdr in ${STD_HEADERS} | ||||
STD+= ${HDRDIR}/${hdr} | STD+= ${HDRDIR}/${hdr} | ||||
INCSLINKS+= ../${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} | INCSLINKS+= ../${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} | ||||
.endfor | |||||
.for hdr in ${RT_HEADERS} | |||||
STD+= ${_LIBCXXRTDIR}/${hdr} | |||||
.endfor | .endfor | ||||
STDDIR= ${CXXINCLUDEDIR} | STDDIR= ${CXXINCLUDEDIR} | ||||
EXP_HEADERS+= __config | EXP_HEADERS+= __config | ||||
EXP_HEADERS+= __memory | EXP_HEADERS+= __memory | ||||
EXP_HEADERS+= algorithm | EXP_HEADERS+= algorithm | ||||
EXP_HEADERS+= any | EXP_HEADERS+= any | ||||
EXP_HEADERS+= chrono | EXP_HEADERS+= chrono | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
Name files using only letters, numbers, period, hyphen and underscore.