For building GNU libstdc++ and libsupc++, filter out libc++-specific and

-std= flags above c++98 or gnu++98 from CXXFLAGS *after* including
bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might
not be preserved.

MFC after:	1 week
This commit is contained in:
dim 2012-10-23 18:57:20 +00:00
parent 99da76dc3d
commit 36e49e1816
2 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR}/include -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
-Wno-deprecated
CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
DPADD= ${LIBM}
@ -626,3 +625,6 @@ ${VERSION_MAP}: ${SRCDIR}/config/abi/pre/gnu.ver
CLEANFILES+= ${VERSION_MAP}
.include <bsd.lib.mk>
# 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]}

View File

@ -24,7 +24,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} -I${GCCDIR}
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections
CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
HDRS= exception new typeinfo cxxabi.h exception_defines.h
@ -43,3 +42,6 @@ VERSION_MAP= ${.CURDIR}/Version.map
.include <bsd.lib.mk>
# 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]}