CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Sat Dec 5 21:27:31 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb Log Message: Don't bother with gdbserver for archs that don't build it. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.14 src/tools/gdb/mknative-gdb:1.15 --- src/tools/gdb/mknative-gdb:1.14 Thu Sep 24 10:53:17 2020 +++ src/tools/gdb/mknative-gdb Sat Dec 5 16:27:31 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp $ +# $NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -218,6 +218,10 @@ get_gdb_libgdb () { get_gdb_bingdbserver () { local _CTF=$_GDB/bin/gdbserver + + if [ ! -f $_CTF/arch/$_MACHINE_SUBDIR/config.h ]; then + return + fi mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \
CVS commit: src/tools/gdb
Module Name:src Committed By: rin Date: Fri Oct 9 23:48:42 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb.old Log Message: Correct target directory; src/external/gpl3/gdb.old not gdb. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/gdb/mknative-gdb.old Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb.old diff -u src/tools/gdb/mknative-gdb.old:1.1 src/tools/gdb/mknative-gdb.old:1.2 --- src/tools/gdb/mknative-gdb.old:1.1 Thu Sep 17 02:14:48 2020 +++ src/tools/gdb/mknative-gdb.old Fri Oct 9 23:48:42 2020 @@ -1,8 +1,8 @@ #!/bin/sh -# $NetBSD: mknative-gdb.old,v 1.1 2020/09/17 02:14:48 christos Exp $ +# $NetBSD: mknative-gdb.old,v 1.2 2020/10/09 23:48:42 rin Exp $ # # Shell script for generating all the constants needed for a native -# platform build of src/external/gpl3/gdb +# platform build of src/external/gpl3/gdb.old # # initialise @@ -12,7 +12,7 @@ _TOP=$3 _PLATFORM=$4 _MACHINE_SUBDIR=$5 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'` -_GDB=external/gpl3/gdb +_GDB=external/gpl3/gdb.old . $_TOP/tools/gcc/mknative.common
CVS commit: src/tools/gdb
Module Name:src Committed By: rin Date: Fri Oct 9 23:44:46 UTC 2020 Modified Files: src/tools/gdb: README.mknative Log Message: Nowadays, mknative-gdb puts files into external/gpl3/gdb/lib, instead of external/gpl3/gdb/bin/gdb. Also, we need to nbmake-MACHINE in external/gpl3/gdb in order to build dependent libraries correctly. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tools/gdb/README.mknative Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/README.mknative diff -u src/tools/gdb/README.mknative:1.6 src/tools/gdb/README.mknative:1.7 --- src/tools/gdb/README.mknative:1.6 Fri Jun 21 07:05:02 2019 +++ src/tools/gdb/README.mknative Fri Oct 9 23:44:46 2020 @@ -1,4 +1,4 @@ -$NetBSD: README.mknative,v 1.6 2019/06/21 07:05:02 maya Exp $ +$NetBSD: README.mknative,v 1.7 2020/10/09 23:44:46 rin Exp $ This file describes how to use the cross-compiler to generate the native files for GDB on a target platform. @@ -34,11 +34,11 @@ work. native-to-NetBSD GDB on a cross host, and mknative pulls glue data from this. - NOTE: this step writes files under src/external/gpl3/gdb/bin/gdb, so you + NOTE: this step writes files under src/external/gpl3/gdb/lib, so you need to do it in a writable src tree! 6. Try out a full build using "nbmake-MACHINE" in - src/external/gpl3/gdb/bin; the result should include a native GDB. + src/external/gpl3/gdb; the result should include a native GDB. 7. If all is well, commit the glue files and directories added to - src/external/gpl3/gdb/bin/gdb. + src/external/gpl3/gdb/lib.
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Sep 24 14:53:17 UTC 2020 Modified Files: src/tools/gdb: Makefile mknative-gdb Log Message: grab the gdbserver version To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/tools/gdb/Makefile cvs rdiff -u -r1.13 -r1.14 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.39 src/tools/gdb/Makefile:1.40 --- src/tools/gdb/Makefile:1.39 Wed Sep 23 19:21:29 2020 +++ src/tools/gdb/Makefile Thu Sep 24 10:53:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2020/09/23 23:21:29 christos Exp $ +# $NetBSD: Makefile,v 1.40 2020/09/24 14:53:17 christos Exp $ .include @@ -117,7 +117,10 @@ native-gdb: .native/.configure_done (cd ${.OBJDIR}/.native/bfd && \ ${MKENV_BUILD_MAKE} bfd.h bfdver.h) && \ (cd ${.OBJDIR}/.native/gdb && \ - ${MKENV_BUILD_MAKE} init.c version.c) + ${MKENV_BUILD_MAKE} init.c version.c) && \ + (if [ -d ${.OBJDIR}/.native/gdbserver ]; then \ + cd ${.OBJDIR}/.native/gdbserver && \ + ${MKENV_BUILD_MAKE} version-generated.cc; fi) @touch $@ clean: clean.native Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.13 src/tools/gdb/mknative-gdb:1.14 --- src/tools/gdb/mknative-gdb:1.13 Wed Sep 23 19:21:29 2020 +++ src/tools/gdb/mknative-gdb Thu Sep 24 10:53:17 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.13 2020/09/23 23:21:29 christos Exp $ +# $NetBSD: mknative-gdb,v 1.14 2020/09/24 14:53:17 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -222,6 +222,8 @@ get_gdb_bingdbserver () { write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \ <$_TMPDIR/gdbserver/config.h + write_c $_CTF/arch/$_MACHINE_SUBDIR/version.cc \ + <$_TMPDIR/gdbserver/version-generated.cc } # main #
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Wed Sep 23 23:21:29 UTC 2020 Modified Files: src/tools/gdb: Makefile mknative-gdb Log Message: Add gdbserver To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/tools/gdb/Makefile cvs rdiff -u -r1.12 -r1.13 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.38 src/tools/gdb/Makefile:1.39 --- src/tools/gdb/Makefile:1.38 Sun Jun 2 19:28:32 2019 +++ src/tools/gdb/Makefile Wed Sep 23 19:21:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2019/06/02 23:28:32 christos Exp $ +# $NetBSD: Makefile,v 1.39 2020/09/23 23:21:29 christos Exp $ .include @@ -87,6 +87,12 @@ CONFIGURE_ARGS_SIM= CONFIGURE_ARGS_SIM+= --disable-sim .endif +CONFIGURE_ARGS_GDBSERVER= +.if \ +${MACHINE_CPU} == "x86_64" +CONFIGURE_ARGS_GDBSERVER+= --enable-gdbserver +.endif + native-gdb: .native/.configure_done @echo 'Extracting GDB configury for a native toolchain.' MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \ @@ -101,6 +107,7 @@ native-gdb: .native/.configure_done --prefix=/usr \ --with-separate-debug-dir=/usr/libdata/debug \ ${CONFIGURE_ARGS_SIM} \ + ${CONFIGURE_ARGS_GDBSERVER} \ --build=`${GNUHOSTDIST}/config.guess` \ --host=${MACHINE_GNU_PLATFORM} \ --target=${MACHINE_GNU_PLATFORM}) Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.12 src/tools/gdb/mknative-gdb:1.13 --- src/tools/gdb/mknative-gdb:1.12 Thu Sep 17 12:54:31 2020 +++ src/tools/gdb/mknative-gdb Wed Sep 23 19:21:29 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp $ +# $NetBSD: mknative-gdb,v 1.13 2020/09/23 23:21:29 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -151,6 +151,8 @@ get_gdb_libgnulib () { done } +# gdb/lib/libgdb # + get_gdb_libgdb () { local _GDBP=$_GDB/lib/libgdb @@ -212,6 +214,16 @@ get_gdb_libgdb () { esac } +# gdb/bin/gdbserver` + +get_gdb_bingdbserver () { + local _CTF=$_GDB/bin/gdbserver + mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR + + write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \ + <$_TMPDIR/gdbserver/config.h +} + # main # case $1 in @@ -225,6 +237,7 @@ all|gdb) # everything (uses "canadian cr get_gdb_libiberty get_gdb_libreadline get_gdb_libdecnumber + get_gdb_bingdbserver exit 0 ;;
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Sep 17 16:54:31 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb Log Message: put gnulib stuff under gnulib/ because things import "gnulib/config.h" To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.11 src/tools/gdb/mknative-gdb:1.12 --- src/tools/gdb/mknative-gdb:1.11 Thu Sep 17 12:09:18 2020 +++ src/tools/gdb/mknative-gdb Thu Sep 17 12:54:31 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.11 2020/09/17 16:09:18 christos Exp $ +# $NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -126,7 +126,7 @@ get_gdb_libctf () { get_gdb_libgnulib () { local _GNULIB=$_GDB/lib/libgnulib - mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/import + mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/gnulib/import (getvars gnulib/Makefile gl_LIBOBJS | sed -e s/gl_LIB// && @@ -146,7 +146,7 @@ get_gdb_libgnulib () { import/unistd.h import/wchar.h \ import/wctype.h do - write_c $_GNULIB/arch/$_MACHINE_SUBDIR/$i \ + write_c $_GNULIB/arch/$_MACHINE_SUBDIR/gnulib/$i \ < $_TMPDIR/gnulib/$i done }
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Sep 17 16:09:18 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb Log Message: remove obsolete To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.10 src/tools/gdb/mknative-gdb:1.11 --- src/tools/gdb/mknative-gdb:1.10 Thu Sep 17 12:05:34 2020 +++ src/tools/gdb/mknative-gdb Thu Sep 17 12:09:18 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.10 2020/09/17 16:05:34 christos Exp $ +# $NetBSD: mknative-gdb,v 1.11 2020/09/17 16:09:18 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -153,8 +153,6 @@ get_gdb_libgnulib () { get_gdb_libgdb () { local _GDBP=$_GDB/lib/libgdb - mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gnulib/import - mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gdbsupport/import { getvars gdb/Makefile \
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Sep 17 16:05:34 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb Log Message: refine To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.9 src/tools/gdb/mknative-gdb:1.10 --- src/tools/gdb/mknative-gdb:1.9 Wed Sep 16 22:14:48 2020 +++ src/tools/gdb/mknative-gdb Thu Sep 17 12:05:34 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.9 2020/09/17 02:14:48 christos Exp $ +# $NetBSD: mknative-gdb,v 1.10 2020/09/17 16:05:34 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -85,8 +85,7 @@ get_gdb_libdecnumber () { local _DECNUMBER=$_GDB/lib/libdecnumber mkdir -p $_TOP/$_DECNUMBER/arch/$_MACHINE_SUBDIR - getvars libdecnumber/Makefile \ - libdecnumber_a_OBJS | + getvars libdecnumber/Makefile libdecnumber_a_OBJS | sed -e s/libdecnumber_a_// | write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk @@ -97,7 +96,60 @@ get_gdb_libdecnumber () { < $_TMPDIR/libdecnumber/gstdint.h } -# gdb/lib/libgdb # +# gdb/lib/libgdbsupport # + +get_gdb_libgdbsupport () { + local _GDBSUPPORT=$_GDB/lib/libgdbsupport + mkdir -p $_TOP/$_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport + + getvars gdbsupport/Makefile libgdbsupport_a_OBJECTS | + sed -e s/libgdbsupport_a_// | + write_mk $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/defs.mk + + write_c $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport/config.h \ + <$_TMPDIR/gdbsupport/config.h +} + +get_gdb_libctf () { + local _CTF=$_GDB/lib/libctf + mkdir -p $_TOP/$_CTF/arch/$_MACHINE_SUBDIR + + getvars libctf/Makefile libctf_la_OBJECTS | + sed -e s/libctf_la_// -e 's/\.lo/.o/g' -e s/libctf_la-//g | + write_mk $_CTF/arch/$_MACHINE_SUBDIR/defs.mk + + write_c $_CTF/arch/$_MACHINE_SUBDIR/config.h \ + <$_TMPDIR/libctf/config.h +} + +# gdb/lib/libgnulib # + +get_gdb_libgnulib () { + local _GNULIB=$_GDB/lib/libgnulib + mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/import + + (getvars gnulib/Makefile gl_LIBOBJS | + sed -e s/gl_LIB// && + getvars gnulib/import/Makefile libgnu_a_OBJECTS | + sed -e s/libgnu_a_// -e s@glthread/@@g -e s@malloc/@@g) | + write_mk $_GNULIB/arch/$_MACHINE_SUBDIR/defs.mk + + for i in config.h \ + import/alloca.h import/ctype.h \ + import/dirent.h import/fcntl.h \ + import/fnmatch.h import/glob.h \ + import/inttypes.h import/limits.h \ + import/locale.h import/math.h \ + import/signal.h import/stdint.h \ + import/stdio.h import/stdlib.h \ + import/string.h import/time.h \ + import/unistd.h import/wchar.h \ + import/wctype.h + do + write_c $_GNULIB/arch/$_MACHINE_SUBDIR/$i \ + < $_TMPDIR/gnulib/$i + done +} get_gdb_libgdb () { local _GDBP=$_GDB/lib/libgdb @@ -124,21 +176,6 @@ get_gdb_libgdb () { < $_TMPDIR/gdb/$i done - for i in gnulib/config.h gdbsupport/config.h \ - gnulib/import/alloca.h gnulib/import/ctype.h \ - gnulib/import/dirent.h gnulib/import/fcntl.h \ - gnulib/import/fnmatch.h gnulib/import/glob.h \ - gnulib/import/inttypes.h gnulib/import/limits.h \ - gnulib/import/locale.h gnulib/import/math.h \ - gnulib/import/signal.h gnulib/import/stdint.h \ - gnulib/import/stdio.h gnulib/import/stdlib.h \ - gnulib/import/string.h gnulib/import/time.h \ - gnulib/import/unistd.h gnulib/import/wchar.h \ - gnulib/import/wctype.h - do - write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \ - < $_TMPDIR/$i - done for f in nm tm xm; do if [ ! -f $_TMPDIR/gdb/$f.h ]; then @@ -182,6 +219,9 @@ get_gdb_libgdb () { case $1 in all|gdb) # everything (uses "canadian cross" temp environment) get_gdb_libgdb + get_gdb_libgdbsupport + get_gdb_libctf + get_gdb_libgnulib get_gdb_libbfd get_gdb_libopcodes get_gdb_libiberty
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Sep 17 02:14:49 UTC 2020 Modified Files: src/tools/gdb: mknative-gdb Added Files: src/tools/gdb: mknative-gdb.old Log Message: Save the mknative-gdb for 8.3 and prepare the mknative-gdb for 10.x To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tools/gdb/mknative-gdb cvs rdiff -u -r0 -r1.1 src/tools/gdb/mknative-gdb.old Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.8 src/tools/gdb/mknative-gdb:1.9 --- src/tools/gdb/mknative-gdb:1.8 Tue May 28 21:56:06 2019 +++ src/tools/gdb/mknative-gdb Wed Sep 16 22:14:48 2020 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp $ +# $NetBSD: mknative-gdb,v 1.9 2020/09/17 02:14:48 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -71,12 +71,12 @@ get_gdb_libreadline () { mkdir -p $_TOP/$_READLINE/arch/$_MACHINE_SUBDIR { - getvars readline/Makefile \ + getvars readline/readline/Makefile \ CCFLAGS OBJECTS } | write_mk $_READLINE/arch/$_MACHINE_SUBDIR/defs.mk write_c $_READLINE/arch/$_MACHINE_SUBDIR/config.h \ - <$_TMPDIR/readline/config.h + <$_TMPDIR/readline/readline/config.h } # gdb/lib/libdecnumber # @@ -91,7 +91,7 @@ get_gdb_libdecnumber () { write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/config.h \ - <$_TMPDIR/readline/config.h + <$_TMPDIR/readline/readline/config.h write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/gstdint.h \ < $_TMPDIR/libdecnumber/gstdint.h @@ -101,7 +101,8 @@ get_gdb_libdecnumber () { get_gdb_libgdb () { local _GDBP=$_GDB/lib/libgdb - mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/build-gnulib + mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gnulib/import + mkdir -p $_TOP/$_GDBP/arch/$_MACHINE_SUBDIR/gdbsupport/import { getvars gdb/Makefile \ @@ -109,6 +110,7 @@ get_gdb_libgdb () { } | sed -e s@arch/@@g -e s@cli/@@g -e s@common/agent@common-agent@ \ -e s@common/@@g -e s@compile/@@g -e s@guile/@@g -e s@mi/@@g \ -e s@nat/@@g -e s@python/@@g -e s@target/@@g \ + -e s@dwarf2/@@g -e s@unittests/@@g \ -e s@tui/@@g | write_mk $_GDBP/arch/$_MACHINE_SUBDIR/defs.mk # getvars gdb/gdbserver/Makefile \ @@ -116,17 +118,35 @@ get_gdb_libgdb () { # | write_mk $_GDB/bin/gdb/arch/$_MACHINE_SUBDIR/gdbserver.mk for i in config.h version.c init.c \ - xml-builtin.c build-gnulib/config.h jit-reader.h + xml-builtin.c jit-reader.h do write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \ < $_TMPDIR/gdb/$i done + + for i in gnulib/config.h gdbsupport/config.h \ + gnulib/import/alloca.h gnulib/import/ctype.h \ + gnulib/import/dirent.h gnulib/import/fcntl.h \ + gnulib/import/fnmatch.h gnulib/import/glob.h \ + gnulib/import/inttypes.h gnulib/import/limits.h \ + gnulib/import/locale.h gnulib/import/math.h \ + gnulib/import/signal.h gnulib/import/stdint.h \ + gnulib/import/stdio.h gnulib/import/stdlib.h \ + gnulib/import/string.h gnulib/import/time.h \ + gnulib/import/unistd.h gnulib/import/wchar.h \ + gnulib/import/wctype.h + do + write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \ + < $_TMPDIR/$i + done for f in nm tm xm; do - if [ -f $_TMPDIR/gdb/$f.h ]; then - ls -l $_TMPDIR/gdb/$f.h | sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' \ -| write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h + if [ ! -f $_TMPDIR/gdb/$f.h ]; then + continue fi + ls -l $_TMPDIR/gdb/$f.h | \ + sed 's,^.*->.*/gdb/,,;s,^,#include <,;s,$,>,' | \ + write_c $_GDBP/arch/$_MACHINE_SUBDIR/$f.h done local _LIBSIM=$_GDB/lib/libsim Added files: Index: src/tools/gdb/mknative-gdb.old diff -u /dev/null src/tools/gdb/mknative-gdb.old:1.1 --- /dev/null Wed Sep 16 22:14:49 2020 +++ src/tools/gdb/mknative-gdb.old Wed Sep 16 22:14:48 2020 @@ -0,0 +1,174 @@ +#!/bin/sh +# $NetBSD: mknative-gdb.old,v 1.1 2020/09/17 02:14:48 christos Exp $ +# +# Shell script for generating all the constants needed for a native +# platform build of src/external/gpl3/gdb +# + +# initialise + +_TMPDIR=$2 +_TOP=$3 +_PLATFORM=$4 +_MACHINE_SUBDIR=$5 +_VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'` +_GDB=external/gpl3/gdb + +. $_TOP/tools/gcc/mknative.common + +# gdb/lib/libbfd # + +get_gdb_libbfd () { + local _BFD=$_GDB/lib/libbfd + mkdir -p $_TOP/$_BFD/arch/$_MACHINE_SUBDIR + + { + getvars bfd/Makefile \ + libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \ + INCLUDES TDEFAULTS + } | write_mk $_BFD/arch/$_MACHINE_SUBDIR/defs.mk + + for i in bfd-in3.h bfd_stdint.h config.h bfd.h bfdver.h targmatch.h + do + write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i + done +} + +# gdb/lib/libopcodes # + +get_gdb_libopcodes () { + local _OPCODES=$_GDB/lib/libopcodes +
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Wed Nov 29 04:24:35 UTC 2017 Modified Files: src/tools/gdb: Makefile Log Message: we want no-iconv for the tools build, but we want iconv for mknative. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.33 src/tools/gdb/Makefile:1.34 --- src/tools/gdb/Makefile:1.33 Tue Nov 28 22:33:01 2017 +++ src/tools/gdb/Makefile Tue Nov 28 23:24:35 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2017/11/29 03:33:01 christos Exp $ +# $NetBSD: Makefile,v 1.34 2017/11/29 04:24:35 christos Exp $ .include @@ -25,7 +25,7 @@ BUILD_MAKE=${TOOL_GMAKE} BINENV= /usr/bin/env -i -MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \ +MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*:Nam_cv_func_iconv*} \ CC_FOR_BUILD=${HOST_CC:Q} \ CXX_FOR_BUILD=${HOST_CXX:Q} \ CFLAGS_FOR_BUILD="-I${TOOLDIR}/include" \ @@ -64,7 +64,7 @@ MKNATIVE_CONFIGURE_PRESET= \ bash_cv_func_strcoll_broken=no \ bash_cv_must_reinstall_sighandlers=no -#CONFIGURE_ENV+= am_cv_func_iconv=no +CONFIGURE_ENV+= am_cv_func_iconv=no # Recent versions of Solaris have ncurses, but they hide the lib in an # odd directory. Prevent configure from finding the ncurses headers,
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Wed Nov 29 03:33:01 UTC 2017 Modified Files: src/tools/gdb: Makefile Log Message: Changes for gdb-8.0.1 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.32 src/tools/gdb/Makefile:1.33 --- src/tools/gdb/Makefile:1.32 Tue Nov 28 17:25:16 2017 +++ src/tools/gdb/Makefile Tue Nov 28 22:33:01 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2017/11/28 22:25:16 christos Exp $ +# $NetBSD: Makefile,v 1.33 2017/11/29 03:33:01 christos Exp $ .include @@ -27,13 +27,15 @@ BINENV= /usr/bin/env -i MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \ CC_FOR_BUILD=${HOST_CC:Q} \ + CXX_FOR_BUILD=${HOST_CXX:Q} \ + CFLAGS_FOR_BUILD="-I${TOOLDIR}/include" \ 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} \ + CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \ + CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ + CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \ + AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \ MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \ + NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \ XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \ LIBS=-lintl \ ${MKNATIVE_CONFIGURE_PRESET} @@ -62,7 +64,7 @@ MKNATIVE_CONFIGURE_PRESET= \ bash_cv_func_strcoll_broken=no \ bash_cv_must_reinstall_sighandlers=no -CONFIGURE_ENV+= am_cv_func_iconv=no +#CONFIGURE_ENV+= am_cv_func_iconv=no # Recent versions of Solaris have ncurses, but they hide the lib in an # odd directory. Prevent configure from finding the ncurses headers,
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Tue Nov 28 22:25:17 UTC 2017 Modified Files: src/tools/gdb: Makefile Log Message: Adjust to gdb-8.0.1 which uses c++ XXX: quoting of variables that contain paths and versions is broken. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.31 src/tools/gdb/Makefile:1.32 --- src/tools/gdb/Makefile:1.31 Sat Jul 1 08:23:09 2017 +++ src/tools/gdb/Makefile Tue Nov 28 17:25:16 2017 @@ -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 @@ -20,6 +20,25 @@ INSTALL_TARGET= install-gdb #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 @@ CONFIGURE_ARGS_SIM+= --disable-sim 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
CVS commit: src/tools/gdb
Module Name:src Committed By: jmcneill Date: Sat Jul 1 12:23:09 UTC 2017 Modified Files: src/tools/gdb: Makefile Log Message: --disable-nls does not work in gdb subdir, so add am_cv_func_iconv=no to configure env. Fixes build on FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.30 src/tools/gdb/Makefile:1.31 --- src/tools/gdb/Makefile:1.30 Sun Oct 16 04:37:42 2016 +++ src/tools/gdb/Makefile Sat Jul 1 12:23:09 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2016/10/16 04:37:42 mrg Exp $ +# $NetBSD: Makefile,v 1.31 2017/07/01 12:23:09 jmcneill Exp $ .include @@ -43,6 +43,8 @@ MKNATIVE_CONFIGURE_PRESET= \ bash_cv_func_strcoll_broken=no \ bash_cv_must_reinstall_sighandlers=no +CONFIGURE_ENV+= am_cv_func_iconv=no + # Recent versions of Solaris have ncurses, but they hide the lib in an # odd directory. Prevent configure from finding the ncurses headers, # Solaris curses is sufficient.
CVS commit: src/tools/gdb
Module Name:src Committed By: mrg Date: Sun Oct 16 04:37:42 UTC 2016 Modified Files: src/tools/gdb: Makefile mknative-gdb Log Message: pass GDB_MACHINE_ARCH to mknative-gdb and use that as the subdir. obtain GDB_MACHINE_ARCH from the new gdb Makefile.gdb_arch. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/tools/gdb/Makefile cvs rdiff -u -r1.6 -r1.7 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.29 src/tools/gdb/Makefile:1.30 --- src/tools/gdb/Makefile:1.29 Fri Oct 14 14:41:59 2016 +++ src/tools/gdb/Makefile Sun Oct 16 04:37:42 2016 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.29 2016/10/14 14:41:59 christos Exp $ +# $NetBSD: Makefile,v 1.30 2016/10/16 04:37:42 mrg Exp $ .include MODULE= gdb -GNUHOSTDIST=${.CURDIR}/../../external/gpl3/${EXTERNAL_GDB_SUBDIR}/dist +GDBDIR= ${.CURDIR}/../../external/gpl3/${EXTERNAL_GDB_SUBDIR} +GNUHOSTDIST=${GDBDIR}/dist FIND_ARGS= \! \( -type d -name sim -prune \) @@ -15,6 +16,9 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKE ALL_TARGET= all-gdb INSTALL_TARGET= install-gdb +.include "${GDBDIR}/Makefile.gdb_arch" +#GDB_MACHINE_ARCH= ${MACHINE_ARCH:C/e?armv[4-7]h?f?/arm/} + .include "${.CURDIR}/../Makefile.gmakehost" CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include @@ -60,7 +64,8 @@ CONFIGURE_ARGS_SIM+= --disable-sim native-gdb: .native/.configure_done @echo 'Extracting GDB configury for a native toolchain.' MAKE=${MAKE:Q} ${HOST_SH} ${MKNATIVE} gdb \ - ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} + ${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} \ + ${GDB_MACHINE_ARCH} .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile mkdir ${.OBJDIR}/.native 2>/dev/null || true Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.6 src/tools/gdb/mknative-gdb:1.7 --- src/tools/gdb/mknative-gdb:1.6 Thu Oct 3 18:58:37 2013 +++ src/tools/gdb/mknative-gdb Sun Oct 16 04:37:42 2016 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp $ +# $NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -10,6 +10,7 @@ _TMPDIR=$2 _TOP=$3 _PLATFORM=$4 +_MACHINE_SUBDIR=$5 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'` _GDB=external/gpl3/gdb @@ -19,17 +20,17 @@ _GDB=external/gpl3/gdb get_gdb_libbfd () { local _BFD=$_GDB/lib/libbfd - mkdir -p $_TOP/$_BFD/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_BFD/arch/$_MACHINE_SUBDIR { getvars bfd/Makefile \ libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \ INCLUDES TDEFAULTS - } | write_mk $_BFD/arch/$MACHINE_ARCH/defs.mk + } | write_mk $_BFD/arch/$_MACHINE_SUBDIR/defs.mk for i in bfd-in3.h bfd_stdint.h config.h bfd.h bfdver.h targmatch.h do - write_c $_BFD/arch/$MACHINE_ARCH/$i <$_TMPDIR/bfd/$i + write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i done } @@ -37,29 +38,29 @@ get_gdb_libbfd () { get_gdb_libopcodes () { local _OPCODES=$_GDB/lib/libopcodes - mkdir -p $_TOP/$_OPCODES/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_OPCODES/arch/$_MACHINE_SUBDIR { getvars opcodes/Makefile \ archdefs BFD_MACHINES libopcodes_la_SOURCES - } | write_mk $_GDB/lib/libopcodes//arch/$MACHINE_ARCH/defs.mk + } | write_mk $_GDB/lib/libopcodes//arch/$_MACHINE_SUBDIR/defs.mk { cat $_TMPDIR/opcodes/config.h - } | write_c $_OPCODES/arch/$MACHINE_ARCH/config.h + } | write_c $_OPCODES/arch/$_MACHINE_SUBDIR/config.h } # gdb/lib/libiberty # get_gdb_libiberty () { local _IBERTY=$_GDB/lib/libiberty - mkdir -p $_TOP/$_IBERTY/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_IBERTY/arch/$_MACHINE_SUBDIR getvars libiberty/Makefile \ ALLOCA EXTRA_OFILES LIBOBJS REQUIRED_OFILES \ - | write_mk $_IBERTY/arch/$MACHINE_ARCH/defs.mk + | write_mk $_IBERTY/arch/$_MACHINE_SUBDIR/defs.mk - write_c $_IBERTY/arch/$MACHINE_ARCH/config.h \ + write_c $_IBERTY/arch/$_MACHINE_SUBDIR/config.h \ <$_TMPDIR/libiberty/config.h } @@ -67,14 +68,14 @@ get_gdb_libiberty () { get_gdb_libreadline () { local _READLINE=$_GDB/lib/libreadline - mkdir -p $_TOP/$_READLINE/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_READLINE/arch/$_MACHINE_SUBDIR { getvars readline/Makefile \ CCFLAGS OBJECTS - } | write_mk $_READLINE/arch/$MACHINE_ARCH/defs.mk + } | write_mk $_READLINE/arch/$_MACHINE_SUBDIR/defs.mk - write_c $_READLINE/arch/$MACHINE_ARCH/config.h \ + write_c $_READLINE/arch/$_MACHINE_SUBDIR/config.h \ <$_TMPDIR/readline/config.h } @@ -82,17 +83,17 @@ get_gdb_libreadline () { get_gdb_libdecnumber () { local _DECNUMBER=$_GDB/lib/libdecnumber - mkdir -p $_TOP/$_DECNUMBER/arch/$MACHINE_ARCH + mkdir -p
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Fri Oct 14 14:41:59 UTC 2016 Modified Files: src/tools/gdb: Makefile Log Message: Fix the host build of aarch64 with clang To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.28 src/tools/gdb/Makefile:1.29 --- src/tools/gdb/Makefile:1.28 Wed Oct 12 14:43:40 2016 +++ src/tools/gdb/Makefile Fri Oct 14 10:41:59 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2016/10/12 18:43:40 christos Exp $ +# $NetBSD: Makefile,v 1.29 2016/10/14 14:41:59 christos Exp $ .include @@ -17,10 +17,12 @@ INSTALL_TARGET= install-gdb .include "${.CURDIR}/../Makefile.gmakehost" -CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include +CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include +LDADDFLAGS+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib CXXADDFLAGS+= -D__STDC_FORMAT_MACROS CXXADDFLAGS+= -D__STDC_LIMIT_MACROS CXXADDFLAGS+= -D__STDC_CONSTANT_MACROS +HOST_CXXFLAGS+= ${CXXADDFLAGS} NEWCONFIGDIR?= ${.CURDIR}/../.. MKNATIVE?= ${.CURDIR}/mknative-gdb
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Wed Oct 12 18:43:40 UTC 2016 Modified Files: src/tools/gdb: Makefile Log Message: Define __STDC_{LIMIT,CONSTANT,FORMAT}_MACROS in CXXFLAGS. The problem is that the gnulib interception of and does not really work because we implement those internally with and and those internal headers are used by other internal headers *before* they get a chance to be intercepted (where the __STDC_ macros are defined). Another way to fix this is to move the inclusion of the other headers in and outside multiple inclusion protection. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.27 src/tools/gdb/Makefile:1.28 --- src/tools/gdb/Makefile:1.27 Tue Jan 26 12:48:31 2016 +++ src/tools/gdb/Makefile Wed Oct 12 14:43:40 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2016/01/26 17:48:31 christos Exp $ +# $NetBSD: Makefile,v 1.28 2016/10/12 18:43:40 christos Exp $ .include @@ -18,6 +18,9 @@ INSTALL_TARGET= install-gdb .include "${.CURDIR}/../Makefile.gmakehost" CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include +CXXADDFLAGS+= -D__STDC_FORMAT_MACROS +CXXADDFLAGS+= -D__STDC_LIMIT_MACROS +CXXADDFLAGS+= -D__STDC_CONSTANT_MACROS NEWCONFIGDIR?= ${.CURDIR}/../.. MKNATIVE?= ${.CURDIR}/mknative-gdb @@ -65,7 +68,8 @@ native-gdb: .native/.configure_done CC=${CC:Q}' '${CCADDFLAGS:Q} \ CXX=${CXX:Q}' '${CCADDFLAGS:Q} \ CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \ - CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS=${LDADDFLAGS:Q} \ + CFLAGS= CPPFLAGS= CXXFLAGS=${CXXADDFLAGS:Q} \ + LDFLAGS=${LDADDFLAGS:Q} \ MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \ XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \ LIBS=-lintl \
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Sun Aug 16 09:14:53 UTC 2015 Modified Files: src/tools/gdb: Makefile Log Message: handle gdb-7.9.1 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.23 src/tools/gdb/Makefile:1.24 --- src/tools/gdb/Makefile:1.23 Sat Aug 15 17:12:28 2015 +++ src/tools/gdb/Makefile Sun Aug 16 05:14:53 2015 @@ -1,9 +1,13 @@ -# $NetBSD: Makefile,v 1.23 2015/08/15 21:12:28 mrg Exp $ +# $NetBSD: Makefile,v 1.24 2015/08/16 09:14:53 christos Exp $ .include bsd.own.mk MODULE= gdb +.if ${HAVE_GDB} == 79 +GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb/dist +.else GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb.old/dist +.endif FIND_ARGS= \! \( -type d -name sim -prune \)
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Sun Aug 16 09:17:49 UTC 2015 Modified Files: src/tools/gdb: Makefile Log Message: add double quotes for consistency To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.24 src/tools/gdb/Makefile:1.25 --- src/tools/gdb/Makefile:1.24 Sun Aug 16 05:14:53 2015 +++ src/tools/gdb/Makefile Sun Aug 16 05:17:49 2015 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.24 2015/08/16 09:14:53 christos Exp $ +# $NetBSD: Makefile,v 1.25 2015/08/16 09:17:49 christos Exp $ .include bsd.own.mk MODULE= gdb -.if ${HAVE_GDB} == 79 +.if ${HAVE_GDB} == 79 GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb/dist .else GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb.old/dist
CVS commit: src/tools/gdb
Module Name:src Committed By: mrg Date: Sat Aug 15 21:12:28 UTC 2015 Modified Files: src/tools/gdb: Makefile Log Message: for now, use gdb.old. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.22 src/tools/gdb/Makefile:1.23 --- src/tools/gdb/Makefile:1.22 Mon Oct 1 19:27:04 2012 +++ src/tools/gdb/Makefile Sat Aug 15 21:12:28 2015 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.22 2012/10/01 19:27:04 bouyer Exp $ +# $NetBSD: Makefile,v 1.23 2015/08/15 21:12:28 mrg Exp $ .include bsd.own.mk MODULE= gdb -GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb/dist +GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb.old/dist FIND_ARGS= \! \( -type d -name sim -prune \)
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Thu Oct 3 18:58:37 UTC 2013 Modified Files: src/tools/gdb: mknative-gdb Log Message: more files needed To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.5 src/tools/gdb/mknative-gdb:1.6 --- src/tools/gdb/mknative-gdb:1.5 Sun Nov 6 14:46:12 2011 +++ src/tools/gdb/mknative-gdb Thu Oct 3 14:58:37 2013 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.5 2011/11/06 19:46:12 christos Exp $ +# $NetBSD: mknative-gdb,v 1.6 2013/10/03 18:58:37 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -100,7 +100,7 @@ get_gdb_libdecnumber () { get_gdb_libgdb () { local _GDBP=$_GDB/lib/libgdb - mkdir -p $_TOP/$_GDBP/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_GDBP/arch/$MACHINE_ARCH/build-gnulib { getvars gdb/Makefile \ @@ -111,7 +111,8 @@ get_gdb_libgdb () { # INTERNAL_CFLAGS OBS \ # | write_mk $_GDB/bin/gdb/arch/$MACHINE_ARCH/gdbserver.mk - for i in config.h observer.h observer.inc version.c init.c xml-builtin.c + for i in config.h observer.h observer.inc version.c init.c \ + xml-builtin.c build-gnulib/config.h jit-reader.h do write_c $_GDBP/arch/$MACHINE_ARCH/$i \ $_TMPDIR/gdb/$i
CVS commit: src/tools/gdb
Module Name:src Committed By: skrll Date: Thu Feb 9 15:15:58 UTC 2012 Modified Files: src/tools/gdb: Makefile Log Message: Disable the sim on mips for next person running gdb7 mknative. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.20 src/tools/gdb/Makefile:1.21 --- src/tools/gdb/Makefile:1.20 Mon Sep 26 21:16:14 2011 +++ src/tools/gdb/Makefile Thu Feb 9 15:15:58 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2011/09/26 21:16:14 christos Exp $ +# $NetBSD: Makefile,v 1.21 2012/02/09 15:15:58 skrll Exp $ .include bsd.own.mk @@ -47,7 +47,6 @@ CONFIGURE_ENV+= ac_cv_header_ncurses_h=n # enable sim if supported). CONFIGURE_ARGS_SIM= .if \ -${MACHINE_CPU} != mips \ ${MACHINE_CPU} != powerpc \ ${MACHINE_CPU} != powerpc64 CONFIGURE_ARGS_SIM+= --disable-sim
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Sun Nov 6 19:46:12 UTC 2011 Modified Files: src/tools/gdb: mknative-gdb Log Message: mkdir the proper sim dirs! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.4 src/tools/gdb/mknative-gdb:1.5 --- src/tools/gdb/mknative-gdb:1.4 Sat Oct 8 22:03:30 2011 +++ src/tools/gdb/mknative-gdb Sun Nov 6 14:46:12 2011 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.4 2011/10/09 02:03:30 christos Exp $ +# $NetBSD: mknative-gdb,v 1.5 2011/11/06 19:46:12 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -127,7 +127,7 @@ get_gdb_libgdb () { local _LIBSIM=$_GDB/lib/libsim case $MACHINE_ARCH in powerpc*) - mkdir -p $_LIBSIM/arch/$MACHINE_ARCH + mkdir -p $_TOP/$_LIBSIM/arch/$MACHINE_ARCH write_c $_LIBSIM/arch/$MACHINE_ARCH/config.h \ $_TMPDIR/sim/ppc/config.h write_c $_LIBSIM/arch/$MACHINE_ARCH/build-config.h \ @@ -135,8 +135,8 @@ get_gdb_libgdb () { write_c $_LIBSIM/arch/$MACHINE_ARCH/cconfig.h \ $_TMPDIR/sim/common/cconfig.h ;; - xxmips*) - mkdir -p $_LIBSIM/arch/$MACHINE_ARCH + xxmips*) # Disabled for now + mkdir -p $_TOP/$_LIBSIM/arch/$MACHINE_ARCH write_c $_LIBSIM/arch/$MACHINE_ARCH/config.h \ $_TMPDIR/sim/mips/config.h write_c $_LIBSIM/arch/$MACHINE_ARCH/cconfig.h \
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Sun Oct 9 02:03:32 UTC 2011 Modified Files: src/tools/gdb: mknative-gdb Log Message: add psim support To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.3 src/tools/gdb/mknative-gdb:1.4 --- src/tools/gdb/mknative-gdb:1.3 Sun Sep 25 22:36:20 2011 +++ src/tools/gdb/mknative-gdb Sat Oct 8 22:03:30 2011 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.3 2011/09/26 02:36:20 christos Exp $ +# $NetBSD: mknative-gdb,v 1.4 2011/10/09 02:03:30 christos Exp $ # # Shell script for generating all the constants needed for a native # platform build of src/external/gpl3/gdb @@ -130,6 +130,8 @@ get_gdb_libgdb () { mkdir -p $_LIBSIM/arch/$MACHINE_ARCH write_c $_LIBSIM/arch/$MACHINE_ARCH/config.h \ $_TMPDIR/sim/ppc/config.h + write_c $_LIBSIM/arch/$MACHINE_ARCH/build-config.h \ + $_TMPDIR/sim/ppc/build-config.h write_c $_LIBSIM/arch/$MACHINE_ARCH/cconfig.h \ $_TMPDIR/sim/common/cconfig.h ;;
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Mon Sep 26 02:36:20 UTC 2011 Modified Files: src/tools/gdb: Makefile README.mknative mknative-gdb Log Message: mknative for gdb7 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tools/gdb/Makefile cvs rdiff -u -r1.4 -r1.5 src/tools/gdb/README.mknative cvs rdiff -u -r1.2 -r1.3 src/tools/gdb/mknative-gdb Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.18 src/tools/gdb/Makefile:1.19 --- src/tools/gdb/Makefile:1.18 Fri Dec 24 08:12:09 2010 +++ src/tools/gdb/Makefile Sun Sep 25 22:36:19 2011 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.18 2010/12/24 13:12:09 njoly Exp $ +# $NetBSD: Makefile,v 1.19 2011/09/26 02:36:19 christos Exp $ .include bsd.own.mk -MODULE= gdb6 +MODULE= gdb +GNUHOSTDIST=${.CURDIR}/../../external/gpl3/gdb/dist FIND_ARGS= \! \( -type d -name sim -prune \) @@ -16,8 +17,11 @@ INSTALL_TARGET= install-gdb .include ${.CURDIR}/../Makefile.gnuhost -CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -B${DESTDIR}/usr/lib/ -LDADDFLAGS= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -Wl,-rpath-link,${DESTDIR}/usr/lib +.if ${HAVE_GCC} = 45 +CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include +.else +CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ +.endif NEWCONFIGDIR?= ${.CURDIR}/../.. MKNATIVE?= ${.CURDIR}/mknative-gdb Index: src/tools/gdb/README.mknative diff -u src/tools/gdb/README.mknative:1.4 src/tools/gdb/README.mknative:1.5 --- src/tools/gdb/README.mknative:1.4 Thu Nov 23 18:33:56 2006 +++ src/tools/gdb/README.mknative Sun Sep 25 22:36:19 2011 @@ -1,4 +1,4 @@ -$NetBSD: README.mknative,v 1.4 2006/11/23 23:33:56 uwe Exp $ +$NetBSD: README.mknative,v 1.5 2011/09/26 02:36:19 christos Exp $ This file describes how to use the cross-compiler to generate the native files for GDB on a target platform. @@ -37,11 +37,11 @@ work. native-to-NetBSD GDB on a cross host, and mknative pulls glue data from this. - NOTE: this step writes files under src/gnu/usr.bin/gdb6, so you + NOTE: this step writes files under src/external/gpl3/gdb/bin/gdb, so you need to do it in a writable src tree! 7. Try out a full build using nbmake-MACHINE in - src/gnu/usr.bin/gdb6; the result should include a native GDB. + src/external/gpl3/bin/gdb; the result should include a native GDB. 8. If all is well, commit the glue files and directories added to - src/gnu/usr.bin/gdb6. + src/external/gpl3/gdb/bin/gdb. Index: src/tools/gdb/mknative-gdb diff -u src/tools/gdb/mknative-gdb:1.2 src/tools/gdb/mknative-gdb:1.3 --- src/tools/gdb/mknative-gdb:1.2 Mon Feb 19 13:26:22 2007 +++ src/tools/gdb/mknative-gdb Sun Sep 25 22:36:20 2011 @@ -1,8 +1,8 @@ #!/bin/sh -# $NetBSD: mknative-gdb,v 1.2 2007/02/19 18:26:22 chs Exp $ +# $NetBSD: mknative-gdb,v 1.3 2011/09/26 02:36:20 christos Exp $ # # Shell script for generating all the constants needed for a native -# platform build of src/gnu/dist/gdb6. +# platform build of src/external/gpl3/gdb # # initialise @@ -11,117 +11,139 @@ _TMPDIR=$2 _TOP=$3 _PLATFORM=$4 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'` +_GDB=external/gpl3/gdb . $_TOP/tools/gcc/mknative.common -# gnu/usr.bin/gdb6/bfd # +# gdb/lib/libbfd # get_gdb_libbfd () { - mkdir -p $_TOP/gnu/usr.bin/gdb6/bfd/arch/$MACHINE_ARCH + local _BFD=$_GDB/lib/libbfd + mkdir -p $_TOP/$_BFD/arch/$MACHINE_ARCH { getvars bfd/Makefile \ libbfd_la_DEPENDENCIES libbfd_la_OBJECTS DEFS \ INCLUDES TDEFAULTS - } | write_mk gnu/usr.bin/gdb6/bfd/arch/$MACHINE_ARCH/defs.mk + } | write_mk $_BFD/arch/$MACHINE_ARCH/defs.mk - write_c gnu/usr.bin/gdb6/bfd/arch/$MACHINE_ARCH/bfd.h $_TMPDIR/bfd/bfd.h - write_c gnu/usr.bin/gdb6/bfd/arch/$MACHINE_ARCH/bfdver.h $_TMPDIR/bfd/bfdver.h - - { - cat $_TMPDIR/bfd/config.h - } | write_c gnu/usr.bin/gdb6/bfd/arch/$MACHINE_ARCH/config.h + for i in bfd-in3.h bfd_stdint.h config.h bfd.h bfdver.h targmatch.h + do + write_c $_BFD/arch/$MACHINE_ARCH/$i $_TMPDIR/bfd/$i + done } -# gnu/lib/opcodes # +# gdb/lib/libopcodes # get_gdb_libopcodes () { - mkdir -p $_TOP/gnu/usr.bin/gdb6/opcodes/arch/$MACHINE_ARCH + local _OPCODES=$_GDB/lib/libopcodes + mkdir -p $_TOP/$_OPCODES/arch/$MACHINE_ARCH { getvars opcodes/Makefile \ archdefs BFD_MACHINES libopcodes_la_SOURCES - } | write_mk gnu/usr.bin/gdb6/opcodes/arch/$MACHINE_ARCH/defs.mk + } | write_mk $_GDB/lib/libopcodes//arch/$MACHINE_ARCH/defs.mk { cat $_TMPDIR/opcodes/config.h - } | write_c gnu/usr.bin/gdb6/opcodes/arch/$MACHINE_ARCH/config.h + } | write_c $_OPCODES/arch/$MACHINE_ARCH/config.h } -# gnu/lib/libiberty # +# gdb/lib/libiberty #
CVS commit: src/tools/gdb
Module Name:src Committed By: hans Date: Sat May 8 23:18:44 UTC 2010 Modified Files: src/tools/gdb: Makefile Log Message: Fix tools build on Solaris with MKCROSSGDB=YES. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.16 src/tools/gdb/Makefile:1.17 --- src/tools/gdb/Makefile:1.16 Wed Dec 23 20:17:13 2009 +++ src/tools/gdb/Makefile Sat May 8 23:18:44 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2009/12/23 20:17:13 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2010/05/08 23:18:44 hans Exp $ .include bsd.own.mk @@ -33,6 +33,15 @@ bash_cv_func_strcoll_broken=no \ bash_cv_must_reinstall_sighandlers=no +# Recent versions of Solaris have ncurses, but they hide the lib in an +# odd directory. Prevent configure from finding the ncurses headers, +# Solaris curses is sufficient. +.if ${BUILD_OSTYPE} == SunOS +CONFIGURE_ENV+= ac_cv_header_ncurses_h=no \ + ac_cv_header_ncurses_ncurses_h=no \ + ac_cv_header_ncurses_term_h=no +.endif + # Disable sim unless it's known to work (configure's default is to # enable sim if supported). CONFIGURE_ARGS_SIM=
CVS commit: src/tools/gdb
Module Name:src Committed By: uebayasi Date: Mon Dec 14 08:51:31 UTC 2009 Modified Files: src/tools/gdb: Makefile Log Message: Disable parallel build, which always fails at compiling itable.c / interp.c. Only affect MKCROSSGDB=yes. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.11 src/tools/gdb/Makefile:1.12 --- src/tools/gdb/Makefile:1.11 Fri Dec 5 05:12:02 2008 +++ src/tools/gdb/Makefile Mon Dec 14 08:51:31 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2008/12/05 05:12:02 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2009/12/14 08:51:31 uebayasi Exp $ .include bsd.own.mk @@ -11,6 +11,7 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} +.MAKEFLAGS: -B # XXX otherwise fails with itable.c / interp.c build ALL_TARGET= all-gdb INSTALL_TARGET= install-gdb
CVS commit: src/tools/gdb
Module Name:src Committed By: christos Date: Mon Dec 14 14:13:17 UTC 2009 Modified Files: src/tools/gdb: Makefile Log Message: disable only parallel make. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tools/gdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gdb/Makefile diff -u src/tools/gdb/Makefile:1.12 src/tools/gdb/Makefile:1.13 --- src/tools/gdb/Makefile:1.12 Mon Dec 14 03:51:31 2009 +++ src/tools/gdb/Makefile Mon Dec 14 09:13:16 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2009/12/14 08:51:31 uebayasi Exp $ +# $NetBSD: Makefile,v 1.13 2009/12/14 14:13:16 christos Exp $ .include bsd.own.mk @@ -11,7 +11,7 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} -.MAKEFLAGS: -B # XXX otherwise fails with itable.c / interp.c build +.NOTPARALLEL: # XXX otherwise fails with itable.c / interp.c build ALL_TARGET= all-gdb INSTALL_TARGET= install-gdb