As it's done for libstdc++, use SJLJ-based exceptions on arm when we're not

using EABI, and use unwind-arm.h instead of unwind-generic.h when using EABI.
This commit is contained in:
Olivier Houchard 2013-03-22 21:50:32 +00:00
parent baa12a84a7
commit 621cd62921
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248624

View File

@ -1,5 +1,7 @@
# $FreeBSD$
.include <bsd.own.mk>
GCCVER= 4.2
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
@ -20,6 +22,9 @@ SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc eh_alloc.cc eh_arm.cc \
SRCS+= cp-demangle.c
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
@ -30,7 +35,13 @@ HDRS= exception new typeinfo cxxabi.h exception_defines.h
INCS= ${HDRS:S;^;${SRCDIR}/;}
INCSDIR=${INCLUDEDIR}/c++/${GCCVER}
.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
.else
unwind.h: ${GCCDIR}/unwind-generic.h
.endif
unwind.h:
ln -sf ${.ALLSRC} ${.TARGET}
SRCS+= unwind.h