# $NetBSD: Makefile.common,v 1.13 2019/02/28 01:11:04 mrg Exp $ DIST= ${GCCDIST} GNUHOSTDIST= ${DIST} GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5/earm/} # Support src/compat builds .if defined(MLIBDIR) && exists(${.CURDIR}/../libstdc++-v3/arch/${MLIBDIR}/defs.mk) LIBSTDCXX_MACHINE_ARCH=${MLIBDIR} .else LIBSTDCXX_MACHINE_ARCH=${GCC_MACHINE_ARCH} .endif # Make sure we get G_*_SOURCES, etc.*, for the .for loops .include "${.CURDIR}/../libstdc++-v3/arch/${LIBSTDCXX_MACHINE_ARCH}/defs.mk" LIBSTDCXXSRCS= ${G_SRC_SOURCES} ${G_CPP98_SOURCES} ${G_CPP11_SOURCES} # XXX XXX dir.o doesn't have <deque> stuff properly, leave it out for now #LIBSTDCXXSRCS+= ${G_FILESYSTEM_SOURCES} LIBSUPCXXSRCS= ${G_LIBSUPCXX_SOURCES} ${G_LIBSUPCXX_C_SOURCES} CPPFLAGS+= -I${DIST}/gcc CPPFLAGS+= -I${DIST}/include CPPFLAGS+= -I${DIST}/libstdc++-v3/libsupc++ CPPFLAGS+= -I${DIST}/libgcc CPPFLAGS+= -I${.CURDIR}/../libstdc++-v3/arch/${LIBSTDCXX_MACHINE_ARCH} -I. CPPFLAGS+= -DHAVE_STDLIB_H -DHAVE_STRING_H CPPFLAGS.cp-demangle.c=-DIN_GLIBCPP_V3 .for _f in ${G_CPP98_SOURCES} COPTS.${_f}+= -std=gnu++98 .endfor STD_GNU11= \ bad_array_length.cc \ bad_array_new.cc \ eh_aux_runtime.cc \ eh_ptr.cc \ eh_terminate.cc \ eh_throw.cc \ guard.cc \ atexit_thread.cc \ nested_exception.cc \ new_handler.cc \ new_op.cc \ new_opnt.cc .for _f in ${STD_GNU11} ${G_CPP11_SOURCES:M*.cc} COPTS.${_f}+= -std=gnu++11 .endfor STD_GNU14= \ del_ops.cc \ del_opvs.cc .for _f in ${STD_GNU14} ${G_FILESYSTEM_SOURCES:M*.cc} COPTS.${_f}+= -std=gnu++14 -Wno-sized-deallocation .endfor STD_GNU1Z= \ new_opa.cc \ new_opant.cc \ new_opva.cc \ new_opvant.cc \ del_opa.cc \ del_opant.cc \ del_opsa.cc \ del_opva.cc \ del_opvant.cc \ del_opvsa.cc .for _f in ${STD_GNU1Z} COPTS.${_f}+= -std=gnu++1z .endfor |