1 1.10 christos # $NetBSD: Makefile,v 1.10 2026/03/14 22:17:29 christos Exp $ 2 1.1 christos 3 1.1 christos NOCTF= 4 1.1 christos .include <bsd.own.mk> 5 1.1 christos .include "../Makefile.inc" 6 1.8 christos GDBLIBDIR=${.CURDIR}/../../lib 7 1.8 christos 8 1.1 christos 9 1.1 christos PROG= gdbserver 10 1.1 christos 11 1.6 christos SERVER_SRCS+= ax.cc debug.cc dll.cc hostio.cc inferiors.cc 12 1.10 christos SERVER_SRCS+= notif.cc mem-break.cc target.c 13 1.7 christos SERVER_SRCS+= regcache.cc remote-utils.cc server.cc symbol.cc target-ser.cc 14 1.3 christos SERVER_SRCS+= tdesc.cc tracepoint.cc utils.cc waitstatus.c version.cc 15 1.2 kamil 16 1.1 christos NETBSD_SRCS= netbsd-low.cc fork-child.cc fork-inferior.c netbsd-nat.c 17 1.1 christos ARCH_SRCS= netbsd-${MACHINE}-low.cc ${MACHINE}.c 18 1.1 christos SRCS= ${SERVER_SRCS} ${NETBSD_SRCS} ${ARCH_SRCS} 19 1.1 christos CPPFLAGS+= -I${.CURDIR} \ 20 1.1 christos -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \ 21 1.8 christos -I${GDBLIBDIR}/libbfd/arch/${GDB_MACHINE_ARCH} \ 22 1.8 christos -I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib \ 23 1.1 christos -I${DIST}/gdb \ 24 1.1 christos -I${DIST}/gdbserver \ 25 1.1 christos -I${DIST}/gdbsupport \ 26 1.1 christos -I${DIST}/gdb/regformats \ 27 1.1 christos -I${DIST}/gdb/config \ 28 1.1 christos -I${DIST}/gnulib/import \ 29 1.1 christos -I${DIST} \ 30 1.8 christos -I${GDBLIBDIR}/libgdbsupport/arch/${GDB_MACHINE_ARCH} \ 31 1.8 christos -I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH} \ 32 1.8 christos -I${GDBLIBDIR}/libgnulib/arch/${GDB_MACHINE_ARCH}/gnulib/import \ 33 1.1 christos -I${DIST}/include \ 34 1.8 christos -include ${DIST}/gdbserver/server.h \ 35 1.8 christos -D_GLIBCXX_USE_CXX11_ABI=1 \ 36 1.8 christos -DPROG='"gdbserver"' \ 37 1.1 christos ${GCPPFLAGS:M-D*} 38 1.1 christos 39 1.4 riastrad # /usr/src/current/external/gpl3/gdb/bin/gdbserver/../../dist/gdb/nat/fork-inferior.c:497:15: error: 6 enumeration values not handled in switch: 'TARGET_WAITKIND_VFORK_DONE', 'TARGET_WAITKIND_IGNORE', 'TARGET_WAITKIND_NO_HISTORY'... [-Werror,-Wswitch] 40 1.4 riastrad CXXFLAGS+= ${${ACTIVE_CC} == "clang":? -Wno-error=switch : } 41 1.4 riastrad 42 1.1 christos .include "../../Makefile.inc" 43 1.1 christos .include <bsd.info.mk> 44 1.1 christos 45 1.1 christos LIBBFD!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR} 46 1.1 christos LIBGNULIBDIR!= cd ${.CURDIR}/../../lib/libgnulib && ${PRINTOBJDIR} 47 1.1 christos LIBGDBSUPPORTDIR!= cd ${.CURDIR}/../../lib/libgdbsupport && ${PRINTOBJDIR} 48 1.1 christos LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR} 49 1.1 christos 50 1.2 kamil LDADD+= -L${LIBGDBSUPPORTDIR} -lgdbsupport \ 51 1.1 christos -L${LIBGNULIBDIR} -lgnulib \ 52 1.1 christos -L${LIBIBERTYDIR} -liberty \ 53 1.2 kamil -lintl 54 1.1 christos 55 1.2 kamil DPADD+= ${LIBGDBSUPPORTDIR}/libgdbsupport.a \ 56 1.1 christos ${LIBGNULIBDIR}/libgnulib.a \ 57 1.1 christos ${LIBIBERTYDIR}/libiberty.a \ 58 1.2 kamil ${LIBINTL} 59 1.1 christos 60 1.1 christos .include <bsd.prog.mk> 61 1.1 christos 62 1.1 christos # Force c++ 63 1.1 christos CWARNFLAGS.clang+= -Wno-deprecated 64 1.1 christos HOST_CC:= ${HOST_CXX} 65 1.5 christos HOST_CFLAGS+= ${HOST_CXXFLAGS} 66 1.1 christos CC:= ${CXX} 67 1.8 christos CFLAGS:= ${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector -pthread 68 1.1 christos 69 1.9 rin .PATH: ${DIST}/gdbserver ${DIST}/gdb/nat ${DIST}/gdb/arch ${DIST}/gdb/doc \ 70 1.6 christos ${.CURDIR}/arch/${GDB_MACHINE_ARCH} ${DIST}/gdb/target \ 71 1.2 kamil ${DIST}/../lib/libgdbsupport/arch/${GDB_MACHINE_ARCH} 72