Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gdb Adjust to gdb-8.0.1 which uses c++



details:   https://anonhg.NetBSD.org/src/rev/6958028e3455
branches:  trunk
changeset: 828115:6958028e3455
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 28 22:25:16 2017 +0000

description:
Adjust to gdb-8.0.1 which uses c++
XXX: quoting of variables that contain paths and versions is broken.

diffstat:

 tools/gdb/Makefile |  49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diffs (82 lines):

diff -r 38559d92ad66 -r 6958028e3455 tools/gdb/Makefile
--- a/tools/gdb/Makefile        Tue Nov 28 22:05:57 2017 +0000
+++ b/tools/gdb/Makefile        Tue Nov 28 22:25:16 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.31 2017/07/01 12:23:09 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.32 2017/11/28 22:25:16 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -20,6 +20,25 @@
 #GDB_MACHINE_ARCH=       ${MACHINE_ARCH:C/e?armv[4-7]h?f?/arm/}
 
 .include "${.CURDIR}/../Makefile.gmakehost"
+BUILD_MAKE=${TOOL_GMAKE}
+
+BINENV=                /usr/bin/env -i
+
+
+MKNATIVE_ENV=  ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
+                       CC_FOR_BUILD=${HOST_CC:Q} \
+                       CC=${CC:Q}' '${CCADDFLAGS:Q} \
+                       CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
+                       CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \
+                       MAKE=${BUILD_MAKE:Q} \
+                       CFLAGS= CPPFLAGS= CXXFLAGS=${CXXADDFLAGS:Q} \
+                       LDFLAGS=${LDADDFLAGS:Q} \
+                       MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
+                       XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
+                       LIBS=-lintl \
+                       ${MKNATIVE_CONFIGURE_PRESET}
+
+MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
 
 CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
 LDADDFLAGS+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib
@@ -65,36 +84,28 @@
 
 native-gdb: .native/.configure_done
        @echo 'Extracting GDB configury for a native toolchain.'
-       MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
+       MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \
                ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} \
                ${GDB_MACHINE_ARCH}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
        mkdir ${.OBJDIR}/.native 2>/dev/null || true
        PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
-               (cd ${.OBJDIR}/.native && ${CONFIGURE_ENV:NC*:NLD*} \
-                       CC_FOR_BUILD=${HOST_CC:Q} \
-                       CC=${CC:Q}' '${CCADDFLAGS:Q} \
-                       CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
-                       CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \
-                       CFLAGS= CPPFLAGS= CXXFLAGS=${CXXADDFLAGS:Q} \
-                       LDFLAGS=${LDADDFLAGS:Q} \
-                       MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
-                       XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
-                       LIBS=-lintl \
-                       ${MKNATIVE_CONFIGURE_PRESET} \
-                       ${HOST_SH} ${GNUHOSTDIST}/configure \
+               (cd ${.OBJDIR}/.native && \
+                       ${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
                        --prefix=/usr \
                        --with-separate-debug-dir=/usr/libdata/debug \
                        ${CONFIGURE_ARGS_SIM} \
                        --build=`${GNUHOSTDIST}/config.guess` \
                        --host=${MACHINE_GNU_PLATFORM} \
-                       --target=${MACHINE_GNU_PLATFORM}) && \
+                       --target=${MACHINE_GNU_PLATFORM})
+       PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
                (cd ${.OBJDIR}/.native && \
-                       /usr/bin/env ${MKNATIVE_CONFIGURE_PRESET} \
-                               ${MAKE} configure-host) && \
-               (cd ${.OBJDIR}/.native/bfd && ${MAKE} bfd.h bfdver.h) && \
-               (cd ${.OBJDIR}/.native/gdb && ${MAKE} init.c version.c)
+                       ${MKENV_BUILD_MAKE} configure-host) && \
+               (cd ${.OBJDIR}/.native/bfd && \
+                       ${MKENV_BUILD_MAKE} bfd.h bfdver.h) && \
+               (cd ${.OBJDIR}/.native/gdb && \
+                       ${MKENV_BUILD_MAKE} init.c version.c)
        @touch $@
 
 clean: clean.native



Home | Main Index | Thread Index | Old Index