CVS commit: src/tools/gdb

2024-08-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 31 03:50:23 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Use MKGDBSERVER consistently, NFC for now


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-30 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 31 03:50:23 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Use MKGDBSERVER consistently, NFC for now


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 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.54 src/tools/gdb/Makefile:1.55
--- src/tools/gdb/Makefile:1.54	Tue Aug 27 21:50:20 2024
+++ src/tools/gdb/Makefile	Sat Aug 31 03:50:23 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.54 2024/08/27 21:50:20 christos Exp $
+#	$NetBSD: Makefile,v 1.55 2024/08/31 03:50:23 rin Exp $
 
 .include 
 
@@ -115,8 +115,7 @@ CONFIGURE_ARGS_SIM+= --disable-sim
 #.endif
 
 CONFIGURE_ARGS_GDBSERVER=
-.if \
-${MACHINE_CPU} == "x86_64"
+.if ${MKGDBSERVER} != "no"
 CONFIGURE_ARGS_GDBSERVER+= --enable-gdbserver
 .endif
 



CVS commit: src/tools/gdb

2024-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 21:50:20 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
disable sim on powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/tools/gdb/Makefile
cvs rdiff -u -r1.18 -r1.19 src/tools/gdb/mknative-gdb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 21:50:20 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
disable sim on powerpc


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/tools/gdb/Makefile
cvs rdiff -u -r1.18 -r1.19 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.53 src/tools/gdb/Makefile:1.54
--- src/tools/gdb/Makefile:1.53	Tue Aug 27 09:56:49 2024
+++ src/tools/gdb/Makefile	Tue Aug 27 17:50:20 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.53 2024/08/27 13:56:49 christos Exp $
+#	$NetBSD: Makefile,v 1.54 2024/08/27 21:50:20 christos Exp $
 
 .include 
 
@@ -108,11 +108,11 @@ CONFIGURE_ENV+=	ac_cv_header_ncurses_h=n
 # Disable sim unless it's known to work (configure's default is to
 # enable sim if supported).
 CONFIGURE_ARGS_SIM=
-.if \
-${MACHINE_CPU} != "powerpc" && \
-${MACHINE_CPU} != "powerpc64"
+#.if \
+#${MACHINE_CPU} != "powerpc" && \
+#${MACHINE_CPU} != "powerpc64"
 CONFIGURE_ARGS_SIM+= --disable-sim
-.endif
+#.endif
 
 CONFIGURE_ARGS_GDBSERVER=
 .if \

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.18 src/tools/gdb/mknative-gdb:1.19
--- src/tools/gdb/mknative-gdb:1.18	Tue Aug 27 10:58:45 2024
+++ src/tools/gdb/mknative-gdb	Tue Aug 27 17:50:20 2024
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.18 2024/08/27 14:58:45 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.19 2024/08/27 21:50:20 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -220,10 +220,10 @@ get_gdb_libgdb () {
 
 	local _LIBSIM=$_GDB/lib/libsim
 	case $_MACHINE_SUBDIR in
-	powerpc*)
+	xxpowerpc*)
 		mkdir -p $_TOP/$_LIBSIM/arch/$_MACHINE_SUBDIR
-		#write_c $_LIBSIM/arch/$_MACHINE_SUBDIR/config.h \
-		#	<$_TMPDIR/sim/ppc/config.h
+		write_c $_LIBSIM/arch/$_MACHINE_SUBDIR/config.h \
+			<$_TMPDIR/sim/config.h
 		#write_c $_LIBSIM/arch/$_MACHINE_SUBDIR/build-config.h \
 		#	<$_TMPDIR/sim/ppc/build-config.h
 		#write_c $_LIBSIM/arch/$_MACHINE_SUBDIR/cconfig.h \



CVS commit: src/tools/gdb

2024-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 14:58:45 UTC 2024

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
new gdb does not produce the sim config files.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tools/gdb/mknative-gdb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 13:56:50 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
copy the rest of the includes and stop using --with-foo=${TOOLDIR} because
it breaks static linking (it picks the tools version of the libraries when
cross building sun2)


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 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.52 src/tools/gdb/Makefile:1.53
--- src/tools/gdb/Makefile:1.52	Mon Aug 26 20:04:28 2024
+++ src/tools/gdb/Makefile	Tue Aug 27 09:56:49 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.52 2024/08/27 00:04:28 christos Exp $
+#	$NetBSD: Makefile,v 1.53 2024/08/27 13:56:49 christos Exp $
 
 .include 
 
@@ -131,15 +131,17 @@ native-gdb: .native/.configure_done
 	mkdir -p ${.OBJDIR}/.native/include
 	# we need to make a copy because ${GMPINC} has a config.h
 	cp -p ${GMPINC}/gmp.h ${.OBJDIR}/.native/include
+	# copy the rest because using --with-foo=${TOOLDIR} breaks with
+	# static linking because it picks the tools version of the libraries
+	cp -p ${MPFRINC}/mpfr.h ${.OBJDIR}/.native/include
+	cp -p ${MPFRINC}/mpf2mpfr.h ${.OBJDIR}/.native/include
+	cp -p ${MPCINC}/mpc.h ${.OBJDIR}/.native/include
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd ${.OBJDIR}/.native && \
 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
 			--prefix=/usr \
 			--with-separate-debug-dir=/usr/libdata/debug \
 			--with-zstd=no \
-			--with-mpfr=${TOOLDIR} \
-			--with-mpc=${TOOLDIR} \
-			--with-gmp=${TOOLDIR} \
 			${CONFIGURE_ARGS_SIM} \
 			${CONFIGURE_ARGS_GDBSERVER} \
 			--build=`${GNUHOSTDIST}/config.guess` \



CVS commit: src/tools/gdb

2024-08-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 13:56:50 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
copy the rest of the includes and stop using --with-foo=${TOOLDIR} because
it breaks static linking (it picks the tools version of the libraries when
cross building sun2)


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 00:04:28 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
For mknative, we need the native versions of MPFR and MPC, so provide them
in the link line, to override those in ${TOOLDIR}/lib


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 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.51 src/tools/gdb/Makefile:1.52
--- src/tools/gdb/Makefile:1.51	Sat Aug 17 23:47:55 2024
+++ src/tools/gdb/Makefile	Mon Aug 26 20:04:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.51 2024/08/18 03:47:55 rin Exp $
+#	$NetBSD: Makefile,v 1.52 2024/08/27 00:04:28 christos Exp $
 
 .include 
 
@@ -48,7 +48,7 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 			CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
 			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
 			CFLAGS= CPPFLAGS= \
-			CXXFLAGS= LDFLAGS=-L${GMPOBJ} \
+			CXXFLAGS= LDFLAGS='-L${GMPOBJ} -L${MPFROBJ} -L${MPCOBJ}'\
 			AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
 			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
 			NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \



CVS commit: src/tools/gdb

2024-08-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 27 00:04:28 UTC 2024

Modified Files:
src/tools/gdb: Makefile

Log Message:
For mknative, we need the native versions of MPFR and MPC, so provide them
in the link line, to override those in ${TOOLDIR}/lib


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 03:47:56 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
mknative-gdb: Generate *.info by using makeinfo(1) from pkgsrc

Unfortunately, our in-tree makeinfo(1) (latest GPLv2 version) is
too old for this purpose :(


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/tools/gdb/Makefile
cvs rdiff -u -r1.16 -r1.17 src/tools/gdb/mknative-gdb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2024-08-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 18 03:47:56 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
mknative-gdb: Generate *.info by using makeinfo(1) from pkgsrc

Unfortunately, our in-tree makeinfo(1) (latest GPLv2 version) is
too old for this purpose :(


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/tools/gdb/Makefile
cvs rdiff -u -r1.16 -r1.17 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.50 src/tools/gdb/Makefile:1.51
--- src/tools/gdb/Makefile:1.50	Wed Aug 14 23:56:19 2024
+++ src/tools/gdb/Makefile	Sun Aug 18 03:47:55 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.50 2024/08/14 23:56:19 christos Exp $
+#	$NetBSD: Makefile,v 1.51 2024/08/18 03:47:55 rin Exp $
 
 .include 
 
@@ -19,7 +19,13 @@ CONFIGURE_ARGS=	--target=${MACHINE_GNU_P
 CONFIGURE_ARGS+=--enable-obsolete
 .endif
 
-MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
+# XXX
+# Unfortunately, our in-tree makeinfo(1) (latest GPLv2 release) is
+# too old to generate *.info. Use external tool from pkgsrc.
+EXTERN_MAKEINFO?=	/usr/pkg/bin/makeinfo
+MAKEINFOFLAGS?=		--no-split
+
+MAKE_ARGS=	MACHINE=
 
 ALL_TARGET=	all-gdb
 INSTALL_TARGET=	install-gdb
@@ -48,6 +54,8 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 			NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
 			XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
 			LIBS=-lintl \
+			MAKEINFO=${EXTERN_MAKEINFO} \
+			MAKEINFOFLAGS=${MAKEINFOFLAGS} \
 			${MKNATIVE_CONFIGURE_PRESET}
 
 MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
@@ -148,7 +156,9 @@ native-gdb: .native/.configure_done
 			${MKENV_BUILD_MAKE} backtrace-supported.h) && \
 		(if [ -d ${.OBJDIR}/.native/gdbserver ]; then \
 			cd ${.OBJDIR}/.native/gdbserver && \
-			${MKENV_BUILD_MAKE} version-generated.cc; fi)
+			${MKENV_BUILD_MAKE} version-generated.cc; fi) && \
+		(cd ${.OBJDIR}/.native/gdb/doc && \
+			${MKENV_BUILD_MAKE} info)
 	@touch $@
 
 clean: clean.native

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.16 src/tools/gdb/mknative-gdb:1.17
--- src/tools/gdb/mknative-gdb:1.16	Mon Jul 31 17:09:59 2023
+++ src/tools/gdb/mknative-gdb	Sun Aug 18 03:47:55 2024
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.17 2024/08/18 03:47:55 rin Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -262,6 +262,20 @@ get_gdb_bingdbserver () {
 		<$_TMPDIR/gdbserver/version-generated.cc
 }
 
+# info
+
+get_gdb_info () {
+	local _INFO=$_GDB/info
+	local _SRC=$_TMPDIR/gdb/doc
+
+	mkdir -p $_TOP/$_INFO
+
+	for i in $_SRC/*.info; do
+		j=`basename $i`
+		writefile $_INFO/$j < $i
+	done
+}
+
 # main #
 
 case $1 in
@@ -278,6 +292,7 @@ all|gdb)	# everything (uses "canadian cr
 	get_gdb_libreadline
 	get_gdb_libdecnumber
 	get_gdb_bingdbserver
+	get_gdb_info
 	exit 0
 	;;
 



CVS commit: src/tools/gdb

2024-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 14 23:56:20 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb.old

Log Message:
changes for new gdb (disable zstd, find mpc/mfpr/gmp differently)


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tools/gdb/Makefile
cvs rdiff -u -r1.2 -r1.3 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/Makefile
diff -u src/tools/gdb/Makefile:1.49 src/tools/gdb/Makefile:1.50
--- src/tools/gdb/Makefile:1.49	Sat Aug 19 22:30:58 2023
+++ src/tools/gdb/Makefile	Wed Aug 14 19:56:19 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.49 2023/08/20 02:30:58 rin Exp $
+#	$NetBSD: Makefile,v 1.50 2024/08/14 23:56:19 christos Exp $
 
 .include 
 
@@ -10,7 +10,10 @@ FIND_ARGS=	\! \( -type d -name sim -prun
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--without-mpfr --with-libgmp-prefix=${TOOLDIR}
+		--with-zstd=no \
+		--with-mpfr=${TOOLDIR} \
+		--with-mpc=${TOOLDIR} \
+		--with-gmp=${TOOLDIR}
 
 .if ${MACHINE} == "ia64"
 CONFIGURE_ARGS+=--enable-obsolete
@@ -125,6 +128,10 @@ native-gdb: .native/.configure_done
 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
 			--prefix=/usr \
 			--with-separate-debug-dir=/usr/libdata/debug \
+			--with-zstd=no \
+			--with-mpfr=${TOOLDIR} \
+			--with-mpc=${TOOLDIR} \
+			--with-gmp=${TOOLDIR} \
 			${CONFIGURE_ARGS_SIM} \
 			${CONFIGURE_ARGS_GDBSERVER} \
 			--build=`${GNUHOSTDIST}/config.guess` \

Index: src/tools/gdb/mknative-gdb.old
diff -u src/tools/gdb/mknative-gdb.old:1.2 src/tools/gdb/mknative-gdb.old:1.3
--- src/tools/gdb/mknative-gdb.old:1.2	Fri Oct  9 19:48:42 2020
+++ src/tools/gdb/mknative-gdb.old	Wed Aug 14 19:56:20 2024
@@ -1,8 +1,8 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb.old,v 1.2 2020/10/09 23:48:42 rin Exp $
+#	$NetBSD: mknative-gdb.old,v 1.3 2024/08/14 23:56:20 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
-# platform build of src/external/gpl3/gdb.old
+# platform build of src/external/gpl3/gdb
 #
 
 # initialise
@@ -12,7 +12,7 @@ _TOP=$3
 _PLATFORM=$4
 _MACHINE_SUBDIR=$5
 _VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ 	]*,,'`
-_GDB=external/gpl3/gdb.old
+_GDB=external/gpl3/gdb
 
 . $_TOP/tools/gcc/mknative.common
 
@@ -28,7 +28,7 @@ get_gdb_libbfd () {
 			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 
+	for i in bfd-in3.h config.h bfd.h bfdver.h targmatch.h 
 	do
 	write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i
 	done
@@ -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 #
@@ -85,23 +85,108 @@ get_gdb_libdecnumber () {
 	local _DECNUMBER=$_GDB/lib/libdecnumber
 	mkdir -p $_TOP/$_DECNUMBER/arch/$_MACHINE_SUBDIR
 
-	getvars libdecnumber/Makefile \
-		libdecnumber_a_OBJS |
-	sed -e s/libdecnumber_a_// |
+	getvars libdecnumber/Makefile libdecnumber_a_OBJS |
+	sed -e s/libdecnumber_a_//g |
 	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
 }
 
+# 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_//g |
+	write_mk $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/defs.mk
+
+	write_c $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport/config.h \
+		<$_TMPDIR/gdbsupport/config.h
+}
+
+# gdb/lib/libctf #
+
+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_//g -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/libbacktrace #
+
+get_gdb_libbacktrace () {
+	local _BACKTRACE=$_GDB/lib/libbacktrace
+	mkdir -p $_TOP/$_BACKTRACE/arch/$_MACHINE_SUBDIR
+
+	getvars libbacktrace/Makefile libbacktrace_la_OBJECTS \
+	libbacktrace_la_LIBADD |
+	sed -e s/libbacktrace_la_//g -e 's/\.lo/.o/g' -e s/libbacktrace_la-//g |
+	write_mk $_BACKTRACE/arch/$_MACHINE_SUBDIR/defs.mk
+
+	write_c $_BACKTRACE/arch/$_MACHINE

CVS commit: src/tools/gdb

2024-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 14 23:56:20 UTC 2024

Modified Files:
src/tools/gdb: Makefile mknative-gdb.old

Log Message:
changes for new gdb (disable zstd, find mpc/mfpr/gmp differently)


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/tools/gdb/Makefile
cvs rdiff -u -r1.2 -r1.3 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.



CVS commit: src/tools/gdb

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:30:58 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
gdb/mknative: Preset yes to rename(2) checks

It must be better to have this workaround here, rather than in external.
(Thanks uwe@ for suggestion!)

Confirmed that the same files generated as before.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 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.48 src/tools/gdb/Makefile:1.49
--- src/tools/gdb/Makefile:1.48	Thu Aug 17 07:54:10 2023
+++ src/tools/gdb/Makefile	Sun Aug 20 02:30:58 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.48 2023/08/17 07:54:10 rin Exp $
+#	$NetBSD: Makefile,v 1.49 2023/08/20 02:30:58 rin Exp $
 
 .include 
 
@@ -77,7 +77,11 @@ MKNATIVE_CONFIGURE_PRESET= \
 	bash_cv_func_ctype_nonascii=yes \
 	bash_cv_func_sigsetjmp=present \
 	bash_cv_func_strcoll_broken=no \
-	bash_cv_must_reinstall_sighandlers=no
+	bash_cv_must_reinstall_sighandlers=no \
+	gl_cv_func_rename_slash_dst_works=yes \
+	gl_cv_func_rename_slash_src_works=yes \
+	gl_cv_func_rename_link_works=yes \
+	gl_cv_func_rename_dest_works=yes
 
 CONFIGURE_ENV+=	am_cv_func_iconv=no
 



CVS commit: src/tools/gdb

2023-08-19 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Aug 20 02:30:58 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
gdb/mknative: Preset yes to rename(2) checks

It must be better to have this workaround here, rather than in external.
(Thanks uwe@ for suggestion!)

Confirmed that the same files generated as before.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-08-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug 17 07:54:11 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Drop working dir for mknative from generated files

Migrate -I${.OBJDIR}/.native/include from CPPFLAGS to CCADDFLAGS for
this purpose.

No binary changes for native binaries as far as I can see.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 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.47 src/tools/gdb/Makefile:1.48
--- src/tools/gdb/Makefile:1.47	Thu Aug 17 05:35:09 2023
+++ src/tools/gdb/Makefile	Thu Aug 17 07:54:10 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.47 2023/08/17 05:35:09 rin Exp $
+#	$NetBSD: Makefile,v 1.48 2023/08/17 07:54:10 rin Exp $
 
 .include 
 
@@ -38,7 +38,7 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 			CC=${CC:Q}' '${CCADDFLAGS:Q} \
 			CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
 			CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
-			CFLAGS= CPPFLAGS=-I${.OBJDIR}/.native/include \
+			CFLAGS= CPPFLAGS= \
 			CXXFLAGS= LDFLAGS=-L${GMPOBJ} \
 			AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
 			MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
@@ -49,7 +49,9 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 
 MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
 
-CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
+CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ \
+		-I${.OBJDIR}/.native/include \
+		-I${.OBJDIR}/.native/gcc/include
 LDADDFLAGS+= -L${DESTDIR}/lib -L${DESTDIR}/usr/lib
 CXXADDFLAGS+= -D__STDC_FORMAT_MACROS
 CXXADDFLAGS+= -D__STDC_LIMIT_MACROS



CVS commit: src/tools/gdb

2023-08-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug 17 07:54:11 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Drop working dir for mknative from generated files

Migrate -I${.OBJDIR}/.native/include from CPPFLAGS to CCADDFLAGS for
this purpose.

No binary changes for native binaries as far as I can see.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-08-16 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug 17 05:35:09 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Sprinkle --enable-obsolete for ia64 :(


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 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.46 src/tools/gdb/Makefile:1.47
--- src/tools/gdb/Makefile:1.46	Tue Aug 15 19:56:07 2023
+++ src/tools/gdb/Makefile	Thu Aug 17 05:35:09 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.46 2023/08/15 19:56:07 christos Exp $
+#	$NetBSD: Makefile,v 1.47 2023/08/17 05:35:09 rin Exp $
 
 .include 
 
@@ -12,6 +12,10 @@ CONFIGURE_ARGS=	--target=${MACHINE_GNU_P
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
 		--without-mpfr --with-libgmp-prefix=${TOOLDIR}
 
+.if ${MACHINE} == "ia64"
+CONFIGURE_ARGS+=--enable-obsolete
+.endif
+
 MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
 ALL_TARGET=	all-gdb



CVS commit: src/tools/gdb

2023-08-16 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Aug 17 05:35:09 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
tools/gdb: Sprinkle --enable-obsolete for ia64 :(


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-08-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 15 19:56:07 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
override the override


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 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.45 src/tools/gdb/Makefile:1.46
--- src/tools/gdb/Makefile:1.45	Mon Aug 14 18:41:34 2023
+++ src/tools/gdb/Makefile	Tue Aug 15 15:56:07 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.45 2023/08/14 22:41:34 christos Exp $
+#	$NetBSD: Makefile,v 1.46 2023/08/15 19:56:07 christos Exp $
 
 .include 
 
@@ -51,6 +51,9 @@ CXXADDFLAGS+= -D__STDC_FORMAT_MACROS
 CXXADDFLAGS+= -D__STDC_LIMIT_MACROS
 CXXADDFLAGS+= -D__STDC_CONSTANT_MACROS
 HOST_CXXFLAGS+= ${CXXADDFLAGS}
+# Since we are using gmake -e the environment overwrites CPPFLAGS
+# so we overwrite it again here! (see Makefile.gnuhost)
+HOST_CPPFLAGS+= -I${TOOLDIR}/include
 
 NEWCONFIGDIR?=	${.CURDIR}/../..
 MKNATIVE?=	${.CURDIR}/mknative-gdb



CVS commit: src/tools/gdb

2023-08-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 15 19:56:07 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
override the override


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 14 22:41:34 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
backout previous; cross build needs native gmp


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 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.44 src/tools/gdb/Makefile:1.45
--- src/tools/gdb/Makefile:1.44	Mon Aug 14 12:45:26 2023
+++ src/tools/gdb/Makefile	Mon Aug 14 18:41:34 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.44 2023/08/14 16:45:26 christos Exp $
+#	$NetBSD: Makefile,v 1.45 2023/08/14 22:41:34 christos Exp $
 
 .include 
 
@@ -10,7 +10,7 @@ FIND_ARGS=	\! \( -type d -name sim -prun
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--without-mpfr
+		--without-mpfr --with-libgmp-prefix=${TOOLDIR}
 
 MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
@@ -45,15 +45,12 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 
 MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
 
-CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/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}
-# for gmp
-HOST_CPPFLAGS+= -I${.OBJDIR}/.native/include
-HOST_LDFLAGS+= -L${GMPOBJ}
 
 NEWCONFIGDIR?=	${.CURDIR}/../..
 MKNATIVE?=	${.CURDIR}/mknative-gdb
@@ -107,6 +104,9 @@ native-gdb: .native/.configure_done
 		${GDB_MACHINE_ARCH}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
+	mkdir -p ${.OBJDIR}/.native/include
+	# we need to make a copy because ${GMPINC} has a config.h
+	cp -p ${GMPINC}/gmp.h ${.OBJDIR}/.native/include
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd ${.OBJDIR}/.native && \
 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
@@ -134,10 +134,3 @@ native-gdb: .native/.configure_done
 clean: clean.native
 clean.native:
 	-rm -r -f .native
-
-.BEGIN: ${.OBJDIR}/.native/include/gmp.h
-
-${.OBJDIR}/.native/include/gmp.h: ${GMPINC}/gmp.h
-	mkdir -p ${.OBJDIR}/.native/include
-	# we need to make a copy because ${GMPINC} has a config.h
-	cp -p ${GMPINC}/gmp.h ${.OBJDIR}/.native/include



CVS commit: src/tools/gdb

2023-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 14 22:41:34 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
backout previous; cross build needs native gmp


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 14 16:45:26 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
fix cross-gdb


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 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.43 src/tools/gdb/Makefile:1.44
--- src/tools/gdb/Makefile:1.43	Wed Aug  9 14:57:04 2023
+++ src/tools/gdb/Makefile	Mon Aug 14 12:45:26 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.43 2023/08/09 18:57:04 christos Exp $
+#	$NetBSD: Makefile,v 1.44 2023/08/14 16:45:26 christos Exp $
 
 .include 
 
@@ -10,7 +10,7 @@ FIND_ARGS=	\! \( -type d -name sim -prun
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--without-mpfr --with-libgmp-prefix=${TOOLDIR}
+		--without-mpfr
 
 MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
@@ -45,12 +45,15 @@ MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:
 
 MKENV_BUILD_MAKE=${MKNATIVE_ENV} ${BUILD_MAKE}
 
-CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
+CCADDFLAGS+= --sysroot=${DESTDIR} -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/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}
+# for gmp
+HOST_CPPFLAGS+= -I${.OBJDIR}/.native/include
+HOST_LDFLAGS+= -L${GMPOBJ}
 
 NEWCONFIGDIR?=	${.CURDIR}/../..
 MKNATIVE?=	${.CURDIR}/mknative-gdb
@@ -104,9 +107,6 @@ native-gdb: .native/.configure_done
 		${GDB_MACHINE_ARCH}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
-	mkdir -p ${.OBJDIR}/.native/include
-	# we need to make a copy because ${GMPINC} has a config.h
-	cp -p ${GMPINC}/gmp.h ${.OBJDIR}/.native/include
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd ${.OBJDIR}/.native && \
 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
@@ -134,3 +134,10 @@ native-gdb: .native/.configure_done
 clean: clean.native
 clean.native:
 	-rm -r -f .native
+
+.BEGIN: ${.OBJDIR}/.native/include/gmp.h
+
+${.OBJDIR}/.native/include/gmp.h: ${GMPINC}/gmp.h
+	mkdir -p ${.OBJDIR}/.native/include
+	# we need to make a copy because ${GMPINC} has a config.h
+	cp -p ${GMPINC}/gmp.h ${.OBJDIR}/.native/include



CVS commit: src/tools/gdb

2023-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 14 16:45:26 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
fix cross-gdb


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-07-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 31 17:09:59 UTC 2023

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
mknative support for gdb-13.2


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/tools/gdb/Makefile
cvs rdiff -u -r1.15 -r1.16 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.41 src/tools/gdb/Makefile:1.42
--- src/tools/gdb/Makefile:1.41	Mon May  8 05:47:20 2023
+++ src/tools/gdb/Makefile	Mon Jul 31 13:09:59 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.41 2023/05/08 09:47:20 skrll Exp $
+#	$NetBSD: Makefile,v 1.42 2023/07/31 17:09:59 christos Exp $
 
 .include 
 
@@ -10,7 +10,7 @@ FIND_ARGS=	\! \( -type d -name sim -prun
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
 		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
-		--without-mpfr
+		--without-mpfr --with-libgmp-prefix=${TOOLDIR}
 
 MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
@@ -107,6 +107,7 @@ native-gdb: .native/.configure_done
 			${MKNATIVE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure \
 			--prefix=/usr \
 			--with-separate-debug-dir=/usr/libdata/debug \
+			--with-libgmp-prefix=${TOOLDIR} \
 			${CONFIGURE_ARGS_SIM} \
 			${CONFIGURE_ARGS_GDBSERVER} \
 			--build=`${GNUHOSTDIST}/config.guess` \
@@ -118,7 +119,9 @@ 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} xml-builtin.c init.c version.c) && \
+		(cd ${.OBJDIR}/.native/libbacktrace && \
+			${MKENV_BUILD_MAKE} backtrace-supported.h) && \
 		(if [ -d ${.OBJDIR}/.native/gdbserver ]; then \
 			cd ${.OBJDIR}/.native/gdbserver && \
 			${MKENV_BUILD_MAKE} version-generated.cc; fi)

Index: src/tools/gdb/mknative-gdb
diff -u src/tools/gdb/mknative-gdb:1.15 src/tools/gdb/mknative-gdb:1.16
--- src/tools/gdb/mknative-gdb:1.15	Sat Dec  5 16:27:31 2020
+++ src/tools/gdb/mknative-gdb	Mon Jul 31 13:09:59 2023
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.15 2020/12/05 21:27:31 christos Exp $
+#	$NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -28,7 +28,7 @@ get_gdb_libbfd () {
 			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 
+	for i in bfd-in3.h config.h bfd.h bfdver.h targmatch.h 
 	do
 	write_c $_BFD/arch/$_MACHINE_SUBDIR/$i <$_TMPDIR/bfd/$i
 	done
@@ -86,7 +86,7 @@ get_gdb_libdecnumber () {
 	mkdir -p $_TOP/$_DECNUMBER/arch/$_MACHINE_SUBDIR
 
 	getvars libdecnumber/Makefile libdecnumber_a_OBJS |
-	sed -e s/libdecnumber_a_// |
+	sed -e s/libdecnumber_a_//g |
 	write_mk $_DECNUMBER/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_DECNUMBER/arch/$_MACHINE_SUBDIR/config.h \
@@ -103,43 +103,75 @@ get_gdb_libgdbsupport () {
 	mkdir -p $_TOP/$_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport
 
 	getvars gdbsupport/Makefile libgdbsupport_a_OBJECTS |
-	sed -e s/libgdbsupport_a_// |
+	sed -e s/libgdbsupport_a_//g |
 	write_mk $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/defs.mk
 
 	write_c $_GDBSUPPORT/arch/$_MACHINE_SUBDIR/gdbsupport/config.h \
 		<$_TMPDIR/gdbsupport/config.h
 }
 
+# gdb/lib/libctf #
+
 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 |
+	sed -e s/libctf_la_//g -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/libbacktrace #
+
+get_gdb_libbacktrace () {
+	local _BACKTRACE=$_GDB/lib/libbacktrace
+	mkdir -p $_TOP/$_BACKTRACE/arch/$_MACHINE_SUBDIR
+
+	getvars libbacktrace/Makefile libbacktrace_la_OBJECTS \
+	libbacktrace_la_LIBADD |
+	sed -e s/libbacktrace_la_//g -e 's/\.lo/.o/g' -e s/libbacktrace_la-//g |
+	write_mk $_BACKTRACE/arch/$_MACHINE_SUBDIR/defs.mk
+
+	write_c $_BACKTRACE/arch/$_MACHINE_SUBDIR/config.h \
+		<$_TMPDIR/libbacktrace/config.h
+	write_c $_BACKTRACE/arch/$_MACHINE_SUBDIR/backtrace-supported.h \
+		<$_TMPDIR/libbacktrace/backtrace-supported.h
+}
+
+# gdb/lib/libsframe #
+
+get_gdb_libsframe () {
+	local _SFRAME=$_GDB/lib/libsframe
+	mkdir -p $_TOP/$_SFRAME/arch/$_MACHINE_SUBDIR
+
+	getvars libsframe/Makefile libsframe_la_OBJECTS |
+	sed -e s/libsframe_la_//g -e 's/\.lo/.o/g' -e s/libsframe_la-//g |
+	write_mk $_SFRAME/arch/$_MACHINE_SUBDIR/defs.mk
+}
+
 # gdb/lib/libgnulib #
 
 get_gdb_libgnulib () {
 	local _GNULIB=$_GDB/lib/libgnulib
-	mkdir -p $_TOP/$_GNULIB/arch/$_MACHINE_SUBDIR/gnu

CVS commit: src/tools/gdb

2023-07-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 31 17:09:59 UTC 2023

Modified Files:
src/tools/gdb: Makefile mknative-gdb

Log Message:
mknative support for gdb-13.2


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/tools/gdb/Makefile
cvs rdiff -u -r1.15 -r1.16 src/tools/gdb/mknative-gdb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-05-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  8 09:47:21 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
Set ac_cv_func_sigprocmask=yes as the symbol renaming confuses the
configure script on architectures that don't provide a compatibilty
symbol, e.g. RISC-V


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2023-05-08 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May  8 09:47:21 UTC 2023

Modified Files:
src/tools/gdb: Makefile

Log Message:
Set ac_cv_func_sigprocmask=yes as the symbol renaming confuses the
configure script on architectures that don't provide a compatibilty
symbol, e.g. RISC-V


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 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.40 src/tools/gdb/Makefile:1.41
--- src/tools/gdb/Makefile:1.40	Thu Sep 24 14:53:17 2020
+++ src/tools/gdb/Makefile	Mon May  8 09:47:20 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2020/09/24 14:53:17 christos Exp $
+#	$NetBSD: Makefile,v 1.41 2023/05/08 09:47:20 skrll Exp $
 
 .include 
 
@@ -59,6 +59,7 @@ MKNATIVE?=	${.CURDIR}/mknative-gdb
 MKNATIVE_CONFIGURE_PRESET= \
 	ac_cv_prog_cc_cross=yes \
 	ac_cv_func_fork_works=yes \
+	ac_cv_func_sigprocmask=yes \
 	ac_cv_func_strcoll_works=yes \
 	ac_cv_func_XML_StopParser=yes \
 	ac_cv_libexpat=yes \



CVS commit: src/tools/gdb

2019-06-21 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jun 21 07:05:02 UTC 2019

Modified Files:
src/tools/gdb: README.mknative

Log Message:
Update to working instructions.

thx mrg for the build_install suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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.5 src/tools/gdb/README.mknative:1.6
--- src/tools/gdb/README.mknative:1.5	Mon Sep 26 02:36:19 2011
+++ src/tools/gdb/README.mknative	Fri Jun 21 07:05:02 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.5 2011/09/26 02:36:19 christos Exp $
+$NetBSD: README.mknative,v 1.6 2019/06/21 07:05:02 maya Exp $
 
 This file describes how to use the cross-compiler to generate the
 native files for GDB on a target platform.
@@ -20,16 +20,13 @@ work.
 1. Set MKMAINTAINERTOOLS=yes in mk.conf.  (Needed so that src/tools/gettext
gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.)
 
-2. Build and install a cross toolchain (via "build.sh -m MACHINE tools").
+2. Build and install a cross toolchain (via "build.sh -U -m MACHINE tools").
 
-3. At top level, do "nbmake-MACHINE do-distrib-dirs obj includes".
+3. At top level, do "nbmake-MACHINE obj do-distrib-dirs includes".
 
-4. In src/gnu/lib/crtstuff4 do "nbmake-MACHINE depend all install"
+4. At top level, do "nbmake-MACHINE -C lib build_install".
 
-5. In src/lib/csu, src/gnu/lib/libgcc4, and src/lib, do
-   "nbmake-MACHINE all install".
-
-6. In src/tools/gdb, do "nbmake-MACHINE obj native-gdb".
+5. In src/tools/gdb, do "nbmake-MACHINE obj native-gdb".
 
This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
cross toolchain (--build reflects the host platform, but --host and
@@ -40,8 +37,8 @@ work.
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/external/gpl3/bin/gdb; the result should include a native GDB.
+6. Try out a full build using "nbmake-MACHINE" in
+   src/external/gpl3/gdb/bin; the result should include a native GDB.
 
-8. If all is well, commit the glue files and directories added to
+7. If all is well, commit the glue files and directories added to
src/external/gpl3/gdb/bin/gdb.



CVS commit: src/tools/gdb

2019-06-21 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Fri Jun 21 07:05:02 UTC 2019

Modified Files:
src/tools/gdb: README.mknative

Log Message:
Update to working instructions.

thx mrg for the build_install suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/gdb/README.mknative

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2019-06-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  2 23:28:32 UTC 2019

Modified Files:
src/tools/gdb: Makefile

Log Message:
force libexpat since the autoconfig test are not cross-compile friendly
(they try to link with /usr/lib/libexpat.so in the compiler invocation).


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2019-06-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun  2 23:28:32 UTC 2019

Modified Files:
src/tools/gdb: Makefile

Log Message:
force libexpat since the autoconfig test are not cross-compile friendly
(they try to link with /usr/lib/libexpat.so in the compiler invocation).


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 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.37 src/tools/gdb/Makefile:1.38
--- src/tools/gdb/Makefile:1.37	Sat Jun  1 13:02:59 2019
+++ src/tools/gdb/Makefile	Sun Jun  2 19:28:32 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.37 2019/06/01 17:02:59 christos Exp $
+#	$NetBSD: Makefile,v 1.38 2019/06/02 23:28:32 christos Exp $
 
 .include 
 
@@ -60,6 +60,8 @@ MKNATIVE_CONFIGURE_PRESET= \
 	ac_cv_prog_cc_cross=yes \
 	ac_cv_func_fork_works=yes \
 	ac_cv_func_strcoll_works=yes \
+	ac_cv_func_XML_StopParser=yes \
+	ac_cv_libexpat=yes \
 	bash_cv_func_ctype_nonascii=yes \
 	bash_cv_func_sigsetjmp=present \
 	bash_cv_func_strcoll_broken=no \



CVS commit: src/tools/gdb

2019-06-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  1 17:02:59 UTC 2019

Modified Files:
src/tools/gdb: Makefile

Log Message:
Disable mpfr to make MKCROSSGDB work again. The problem is that the default
(auto) finds the mpfr library in tools, but then when it tries to build using
the proper headers it does not find it anymore since we don't install it
(like the native build does not find it).


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tools/gdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tools/gdb

2019-06-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  1 17:02:59 UTC 2019

Modified Files:
src/tools/gdb: Makefile

Log Message:
Disable mpfr to make MKCROSSGDB work again. The problem is that the default
(auto) finds the mpfr library in tools, but then when it tries to build using
the proper headers it does not find it anymore since we don't install it
(like the native build does not find it).


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 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.36 src/tools/gdb/Makefile:1.37
--- src/tools/gdb/Makefile:1.36	Tue May  1 15:59:46 2018
+++ src/tools/gdb/Makefile	Sat Jun  1 13:02:59 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.36 2018/05/01 19:59:46 christos Exp $
+#	$NetBSD: Makefile,v 1.37 2019/06/01 17:02:59 christos Exp $
 
 .include 
 
@@ -9,7 +9,8 @@ GNUHOSTDIST=${GDBDIR}/dist
 FIND_ARGS=	\! \( -type d -name sim -prune \)
 
 CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} --disable-nls \
-		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-,"
+		--program-transform-name="s,^,${MACHINE_GNU_PLATFORM}-," \
+		--without-mpfr
 
 MAKE_ARGS=	MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 



CVS commit: src/tools/gdb

2019-05-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 01:56:06 UTC 2019

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
adjust for gdb-8.3


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/tools/gdb/mknative-gdb:1.8
--- src/tools/gdb/mknative-gdb:1.7	Sun Oct 16 00:37:42 2016
+++ src/tools/gdb/mknative-gdb	Tue May 28 21:56:06 2019
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp $
+#	$NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of src/external/gpl3/gdb
@@ -106,13 +106,16 @@ get_gdb_libgdb () {
 	{
 		getvars gdb/Makefile \
 			INTERNAL_CFLAGS LIBGDB_OBS SIM_OBS
-	} | write_mk $_GDBP/arch/$_MACHINE_SUBDIR/defs.mk
+	} | 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@tui/@@g | write_mk $_GDBP/arch/$_MACHINE_SUBDIR/defs.mk
 
 #	getvars gdb/gdbserver/Makefile \
 #		INTERNAL_CFLAGS OBS \
 #		| write_mk $_GDB/bin/gdb/arch/$_MACHINE_SUBDIR/gdbserver.mk
 
-	for i in config.h observer.h observer.inc version.c init.c \
+	for i in config.h version.c init.c \
 	xml-builtin.c build-gnulib/config.h jit-reader.h
 	do
 	write_c $_GDBP/arch/$_MACHINE_SUBDIR/$i \



CVS commit: src/tools/gdb

2019-05-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 29 01:56:06 UTC 2019

Modified Files:
src/tools/gdb: mknative-gdb

Log Message:
adjust for gdb-8.3


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tools/gdb/mknative-gdb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/tools/gdb

2009-12-15 Thread Christos Zoulas
On Dec 15,  5:03pm, uebay...@tombi.co.jp (Masao Uebayashi) wrote:
-- Subject: Re: CVS commit: src/tools/gdb

| I changed other instances too.  OK to check in?
| 

I think so.

christos


Re: CVS commit: src/tools/gdb

2009-12-15 Thread Masao Uebayashi
> Hm, it may be simpler to remove `cd ../igen && $(MAKE)' except the
> ../igen/igen target.

Ah, now I see this is also a simple race...

This works for me.

Masao

Index: gnu/dist/gdb6/sim/mips/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/sim/mips/Makefile.in  2 Jul 2006 20:28:34 -   1.1.1.2
+++ gnu/dist/gdb6/sim/mips/Makefile.in  15 Dec 2009 08:55:03 -
@@ -132,7 +132,6 @@
 $(BUILT_SRC_FROM_IGEN): tmp-igen
 
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
Index: gnu/dist/gdb6/sim/mn10300/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mn10300/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/mn10300/Makefile.in   15 May 2006 14:24:50 -  
1.1.1.1
+++ gnu/dist/gdb6/sim/mn10300/Makefile.in   15 Dec 2009 08:55:03 -
@@ -82,7 +82,6 @@
 IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
 IGEN_DC=$(srcdir)/mn10300.dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: gnu/dist/gdb6/sim/v850/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/v850/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/v850/Makefile.in  15 May 2006 14:26:30 -  1.1.1.1
+++ gnu/dist/gdb6/sim/v850/Makefile.in  15 Dec 2009 08:55:04 -
@@ -80,7 +80,6 @@
 IGEN_INSN=$(srcdir)/v850.igen
 IGEN_DC=$(srcdir)/v850-dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 08:55:04 -
@@ -11,7 +11,6 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-15 Thread enami tsugutomo
> Index: gnu/dist/gdb6/sim/mips/Makefile.in
> ===
> RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
> retrieving revision 1.1.1.2
> diff -u -r1.1.1.2 Makefile.in
> --- gnu/dist/gdb6/sim/mips/Makefile.in2 Jul 2006 20:28:34 -   
> 1.1.1.2
> +++ gnu/dist/gdb6/sim/mips/Makefile.in15 Dec 2009 07:33:37 -
> @@ -84,7 +84,7 @@
>  multi-run.o: multi-include.h tmp-mach-multi
>  
>  ../igen/igen:
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>  
>  IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
> trace-rule-rejection -G trace-entries # -G trace-all
>  IGEN_INSN=$(srcdir)/mips.igen
> @@ -132,7 +132,7 @@
>  $(BUILT_SRC_FROM_IGEN): tmp-igen
>  
>  tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>   ../igen/igen \
>   $(IGEN_TRACE) \
>   -I $(srcdir) \

Hm, it may be simpler to remove `cd ../igen && $(MAKE)' except the
../igen/igen target.

enami.


Re: CVS commit: src/tools/gdb

2009-12-15 Thread Masao Uebayashi
I changed other instances too.  OK to check in?

Masao

Index: gnu/dist/gdb6/sim/mips/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/sim/mips/Makefile.in  2 Jul 2006 20:28:34 -   1.1.1.2
+++ gnu/dist/gdb6/sim/mips/Makefile.in  15 Dec 2009 07:33:37 -
@@ -84,7 +84,7 @@
 multi-run.o: multi-include.h tmp-mach-multi
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries # -G trace-all
 IGEN_INSN=$(srcdir)/mips.igen
@@ -132,7 +132,7 @@
 $(BUILT_SRC_FROM_IGEN): tmp-igen
 
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
@@ -213,7 +213,7 @@
 $(BUILT_SRC_FROM_M16): tmp-m16
 
 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
Index: gnu/dist/gdb6/sim/mn10300/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mn10300/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/mn10300/Makefile.in   15 May 2006 14:24:50 -  
1.1.1.1
+++ gnu/dist/gdb6/sim/mn10300/Makefile.in   15 Dec 2009 07:33:37 -
@@ -76,13 +76,13 @@
rm -f tmp-igen tmp-insns
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries
 IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
 IGEN_DC=$(srcdir)/mn10300.dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: gnu/dist/gdb6/sim/v850/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/v850/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- gnu/dist/gdb6/sim/v850/Makefile.in  15 May 2006 14:26:30 -  1.1.1.1
+++ gnu/dist/gdb6/sim/v850/Makefile.in  15 Dec 2009 07:33:37 -
@@ -74,13 +74,13 @@
rm -f tmp-igen tmp-insns
 
 ../igen/igen:
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
 
 IGEN_TRACE= # -G omit-line-numbers # -G trace-rule-selection -G 
trace-rule-rejection -G trace-entries
 IGEN_INSN=$(srcdir)/v850.igen
 IGEN_DC=$(srcdir)/v850-dc
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-G gen-direct-access \
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 07:33:37 -
@@ -11,7 +11,6 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> Since not a parallel make problem.
> 
> enami.
> 
> Index: gnu/dist/gdb6/sim/mips/Makefile.in
> ===
> RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
> retrieving revision 1.1.1.2
> diff -u -r1.1.1.2 Makefile.in
> --- gnu/dist/gdb6/sim/mips/Makefile.in2 Jul 2006 20:28:34 -   
> 1.1.1.2
> +++ gnu/dist/gdb6/sim/mips/Makefile.in15 Dec 2009 05:24:08 -
> @@ -132,7 +132,7 @@
>  $(BUILT_SRC_FROM_IGEN): tmp-igen
>  
>  tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>   ../igen/igen \
>   $(IGEN_TRACE) \
>   -I $(srcdir) \
> @@ -213,7 +213,7 @@
>  $(BUILT_SRC_FROM_M16): tmp-m16
>  
>  tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
> - cd ../igen && $(MAKE)
> + (cd ../igen && $(MAKE))
>   ../igen/igen \
>   $(IGEN_TRACE) \
>   -I $(srcdir) \

This works!

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-14 Thread enami tsugutomo
> So problems are:
> - why .NOTPARALLEL doesn't work?

Since not a parallel make problem.

enami.

Index: gnu/dist/gdb6/sim/mips/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/sim/mips/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/sim/mips/Makefile.in  2 Jul 2006 20:28:34 -   1.1.1.2
+++ gnu/dist/gdb6/sim/mips/Makefile.in  15 Dec 2009 05:24:08 -
@@ -132,7 +132,7 @@
 $(BUILT_SRC_FROM_IGEN): tmp-igen
 
 tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \
@@ -213,7 +213,7 @@
 $(BUILT_SRC_FROM_M16): tmp-m16
 
 tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
-   cd ../igen && $(MAKE)
+   (cd ../igen && $(MAKE))
../igen/igen \
$(IGEN_TRACE) \
-I $(srcdir) \


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> I made it work using Makefile.gmakehost too.  I don't know what those
> NetBSD_DISABLED_* mean.

I found it's clearly mentioned in cvs log:


revision 1.3
date: 2007/01/12 13:24:30;  author: skrll;  state: Exp;  lines: +4 -0
branches:  1.3.4;
Deal with lex and yacc generated files for gdb in the same way as gcc.
That is, use the files supplied with the distribution and never attempt
to rebuild them.

Should fix PR/35271


So problems are:
- why .NOTPARALLEL doesn't work?
- if we use tools/Makefile.gmakehost
  - search path to gnu/dist/gdb6/gdb/f-exp.c is missing

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/tools/gdb

2009-12-14 Thread Masao Uebayashi
> Log Message:
> disable only parallel make.

> @@ -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

Thanks, but .NOTPARALEL doesn't seem to work for me.  See attachment 1.

I made it work using Makefile.gmakehost too.  I don't know what those
NetBSD_DISABLED_* mean.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635
--- support.o ---
cc: support.c: No such file or directory
--- engine.o ---
cc: engine.c: No such file or directory
--- irun.o ---
cc: irun.c: No such file or directory
--- semantics.o ---
cc: semantics.c: No such file or directory
--- support.o ---
cc: no input files
--- engine.o ---
cc: no input files
--- irun.o ---
cc: no input files
--- semantics.o ---
cc: no input files
--- support.o ---
*** [support.o] Error code 1
--- engine.o ---
*** [engine.o] Error code 1
--- irun.o ---
*** [irun.o] Error code 1
--- semantics.o ---
*** [semantics.o] Error code 1
--- interp.o ---
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:39:20: 
error: itable.h: No such file or directory
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c: In 
function 'sim_open':
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
'nr_itable_entries' undeclared (first use in this function)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
(Each undeclared identifier is reported only once
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:344: error: 
for each function it appears in.)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c: In 
function 'get_insn_name':
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:731: error: 
'itable' undeclared (first use in this function)
/src/netbsd/src.TNF/tools/gdb/../../gnu/dist/gdb6/sim/mips/interp.c:732: 
warning: control reaches end of non-void function
*** [interp.o] Error code 1
8 errors

nbmake: stopped in 
/src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build/sim/mips
*** [all] Error code 1
1 error

nbmake: stopped in /src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build/sim
*** [all-sim] Error code 2
1 error

nbmake: stopped in /src/netbsd/work.TNF/sgimips_mips64eb/obj/tools/gdb/build
*** [.build_done] Error code 2
1 error

nbmake: stopped in /src/netbsd/src.TNF/tools/gdb
Index: tools/gdb/Makefile
===
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- tools/gdb/Makefile  14 Dec 2009 14:13:16 -  1.13
+++ tools/gdb/Makefile  15 Dec 2009 01:37:01 -
@@ -11,11 +11,10 @@
 
 MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
 
-.NOTPARALLEL:  # XXX otherwise fails with itable.c / interp.c build
 ALL_TARGET=all-gdb
 INSTALL_TARGET=install-gdb
 
-.include "${.CURDIR}/../Makefile.gnuhost"
+.include "${.CURDIR}/../Makefile.gmakehost"
 
 CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib 
-L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
 
Index: gnu/dist/gdb6/gdb/Makefile.in
===
RCS file: /cvsroot/src/gnu/dist/gdb6/gdb/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- gnu/dist/gdb6/gdb/Makefile.in   10 Jan 2008 21:43:55 -  1.5
+++ gnu/dist/gdb6/gdb/Makefile.in   15 Dec 2009 01:37:04 -
@@ -1614,8 +1614,8 @@
 
 .SUFFIXES: .y .l
 .y.c: 
-   @echo "NOT REBUILDING $@"
-NetBSD_DISABLED_y_c:
+#  @echo "NOT REBUILDING $@"
+#NetBSD_DISABLED_y_c:
$(SHELL) $(YLWRAP) $< y.tab.c $...@.tmp -- $(YACC) $(YFLAGS)
-sed -e '/extern.*malloc/d' \
 -e '/extern.*realloc/d' \
@@ -1628,8 +1628,8 @@
-rm $...@.tmp
mv $...@.new ./$*.c
 .l.c:
-   @echo "NOT REBUILDING $@"
-NetBSD_DISABLED_l_c:
+#  @echo "NOT REBUILDING $@"
+#NetBSD_DISABLED_l_c:
if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
$(FLEX) -o$@ $< && \
rm -f $...@.new && \