2002-05-06 22:07:27 +00:00
|
|
|
# $FreeBSD$
|
2002-05-07 01:01:38 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2013-03-22 21:50:32 +00:00
|
|
|
|
2010-05-12 19:59:32 +00:00
|
|
|
GCCVER= 4.2
|
2002-05-29 00:45:51 +00:00
|
|
|
GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
2007-05-19 04:25:59 +00:00
|
|
|
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
|
2002-05-29 00:45:51 +00:00
|
|
|
SRCDIR= ${.CURDIR}/../../../contrib/libstdc++/libsupc++
|
2002-05-07 01:01:38 +00:00
|
|
|
|
2010-05-12 19:59:32 +00:00
|
|
|
.PATH: ${SRCDIR} ${GCCLIB}/libiberty
|
2002-05-29 00:45:51 +00:00
|
|
|
|
|
|
|
LIB= supc++
|
2012-03-31 14:25:12 +00:00
|
|
|
SHLIB_MAJOR=1
|
2007-05-19 04:25:59 +00:00
|
|
|
SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
|
|
|
|
eh_aux_runtime.cc eh_call.cc eh_catch.cc eh_exception.cc eh_globals.cc \
|
2006-08-19 00:52:54 +00:00
|
|
|
eh_personality.cc eh_term_handler.cc eh_terminate.cc eh_throw.cc \
|
|
|
|
eh_type.cc eh_unex_handler.cc guard.cc new_handler.cc new_op.cc \
|
|
|
|
new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc \
|
|
|
|
vec.cc vterminate.cc
|
2002-05-07 01:01:38 +00:00
|
|
|
|
|
|
|
# from libiberty:
|
2004-07-28 05:27:21 +00:00
|
|
|
SRCS+= cp-demangle.c
|
2002-05-07 01:01:38 +00:00
|
|
|
|
|
|
|
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
|
2007-05-19 04:25:59 +00:00
|
|
|
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
|
|
|
|
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
|
2005-08-17 15:46:18 +00:00
|
|
|
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
|
2002-05-29 00:45:51 +00:00
|
|
|
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections
|
2010-01-22 14:09:15 +00:00
|
|
|
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
|
2002-05-07 01:01:38 +00:00
|
|
|
|
|
|
|
HDRS= exception new typeinfo cxxabi.h exception_defines.h
|
2002-05-12 16:01:00 +00:00
|
|
|
INCS= ${HDRS:S;^;${SRCDIR}/;}
|
2010-05-12 19:59:32 +00:00
|
|
|
INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
|
2007-05-19 04:25:59 +00:00
|
|
|
|
2014-10-01 08:26:51 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
2013-03-22 21:50:32 +00:00
|
|
|
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
|
|
|
|
.else
|
2007-05-19 04:25:59 +00:00
|
|
|
unwind.h: ${GCCDIR}/unwind-generic.h
|
2013-03-22 21:50:32 +00:00
|
|
|
.endif
|
|
|
|
|
2015-11-25 19:44:43 +00:00
|
|
|
unwind.h: .NOMETA
|
2007-05-19 04:25:59 +00:00
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
|
|
|
|
SRCS+= unwind.h
|
|
|
|
CLEANFILES+= unwind.h
|
2002-05-07 01:01:38 +00:00
|
|
|
|
2012-03-31 14:25:12 +00:00
|
|
|
# Symbol versioning
|
|
|
|
|
|
|
|
VERSION_MAP= ${.CURDIR}/Version.map
|
|
|
|
|
2014-05-11 21:07:00 +00:00
|
|
|
CXXFLAGS.clang+= -stdlib=libstdc++
|
2012-03-31 14:25:12 +00:00
|
|
|
|
2002-05-07 01:01:38 +00:00
|
|
|
.include <bsd.lib.mk>
|
2012-10-23 18:57:20 +00:00
|
|
|
|
|
|
|
# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98.
|
|
|
|
CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
|