Module Name: src
Committed By: christos
Date: Fri Aug 11 15:18:29 UTC 2023
Modified Files:
src/external/gpl3/gdb/bin/psim: Makefile
src/external/gpl3/gdb/dist/sim/ppc: defs.h
src/external/gpl3/gdb/lib/libsim: Makefile
Log Message:
fix ppc/psim
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/bin/psim/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/sim/ppc/defs.h
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gdb/lib/libsim/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/bin/psim/Makefile
diff -u src/external/gpl3/gdb/bin/psim/Makefile:1.2 src/external/gpl3/gdb/bin/psim/Makefile:1.3
--- src/external/gpl3/gdb/bin/psim/Makefile:1.2 Sat Oct 29 20:11:28 2011
+++ src/external/gpl3/gdb/bin/psim/Makefile Fri Aug 11 11:18:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2011/10/30 00:11:28 christos Exp $
+# $NetBSD: Makefile,v 1.3 2023/08/11 15:18:29 christos Exp $
NOMAN= # defined
@@ -12,6 +12,7 @@ HOST_CPPFLAGS+= -I. \
-I${DIST}/sim/ppc -I${DIST}/include \
-I${.CURDIR}/../../lib/libsim/arch/${MACHINE_ARCH} \
-I${.CURDIR}/../../lib/libbfd/arch/${MACHINE_ARCH} \
+ -I${.CURDIR}/../../lib/libgnulib/arch/${MACHINE_ARCH} \
-I${DIST}/bfd \
-I${.CURDIR}/../../lib/libgdb \
-I${DIST}/gdb \
@@ -23,26 +24,24 @@ PSIM_DEFINES= -DHAVE_CONFIG_H \
-DDEFAULT_INLINE=PSIM_INLINE_LOCALS \
-DWITH_HOST_BYTE_ORDER=BYTE_ORDER \
-DWITH_SMP=5 \
+ -DSIM_COMMON_BUILD \
-DHAVE_TERMIOS_STRUCTURE \
- -DHAVE_DEVZERO
+ -DHAVE_DEVZERO \
+ -DRETSIGTYPE=void \
+ -DWITH_STDIO=0
+
CPPFLAGS+= ${HOST_CPPFLAGS} ${PSIM_DEFINES}
SRCS+=version.c
-.include <bsd.prog.mk>
-
-LIBSIMDIR!= cd ${.CURDIR}/../../lib/libsim && ${PRINTOBJDIR}
+GDBLIBDIR= ${.CURDIR}/../../lib
+PROGDPLIBS+= sim ${GDBLIBDIR}/libsim \
+ bfd ${GDBLIBDIR}/libbfd \
+ sframe ${GDBLIBDIR}/libsframe \
+ iberty ${GDBLIBDIR}/libiberty \
-LDADD+= -L${LIBSIMDIR} -lsim
-DPADD+= ${LIBSIMDIR}/libsim.a
+.include <bsd.prog.mk>
-LIBBFDDIR!= cd ${.CURDIR}/../../lib/libbfd && ${PRINTOBJDIR}
-LDADD+= -L${LIBBFDDIR} -lbfd
-DPADD+= ${LIBBFDDIR}/libbfd.a
-
-LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
-LDADD+= -L${LIBIBERTYDIR} -liberty
-DPADD+= ${LIBIBERTYDIR}/libiberty.a
LDADD+= -lintl -lz
DPADD+= ${LIBINTL} ${LIBZ}
Index: src/external/gpl3/gdb/dist/sim/ppc/defs.h
diff -u src/external/gpl3/gdb/dist/sim/ppc/defs.h:1.1.1.1 src/external/gpl3/gdb/dist/sim/ppc/defs.h:1.2
--- src/external/gpl3/gdb/dist/sim/ppc/defs.h:1.1.1.1 Sun Jul 30 18:44:20 2023
+++ src/external/gpl3/gdb/dist/sim/ppc/defs.h Fri Aug 11 11:18:29 2023
@@ -45,6 +45,10 @@
#undef PACKAGE_VERSION
/* Include common sim's various configure tests. */
+#ifndef SIM_COMMON_BUILD
#include "../config.h"
+#else
+#include "config.h"
+#endif
#endif
Index: src/external/gpl3/gdb/lib/libsim/Makefile
diff -u src/external/gpl3/gdb/lib/libsim/Makefile:1.3 src/external/gpl3/gdb/lib/libsim/Makefile:1.4
--- src/external/gpl3/gdb/lib/libsim/Makefile:1.3 Mon Nov 4 21:32:12 2013
+++ src/external/gpl3/gdb/lib/libsim/Makefile Fri Aug 11 11:18:29 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2013/11/05 02:32:12 gdt Exp $
+# $NetBSD: Makefile,v 1.4 2023/08/11 15:18:29 christos Exp $
LIBISPRIVATE= yes
NOGCCERROR=
@@ -14,7 +14,7 @@ SRCS= debug.c filter_filename.c bits.c s
support.c psim.c pk_disklabel.c hw_cpu.c hw_memory.c hw_nvram.c \
hw_iobus.c hw_htab.c hw_disk.c hw_trace.c hw_register.c hw_vm.c \
hw_init.c hw_core.c hw_pal.c hw_com.c hw_eeprom.c hw_opic.c hw_glue.c \
- hw_phb.c hw_ide.c options.c sim_calls.c callback.c targ-map.c gdb-sim.c
+ hw_phb.c hw_ide.c options.c sim_calls.c callback.c gdb-sim.c
MIC= ${HOST_SH} ${DIST}/move-if-change
@@ -22,6 +22,7 @@ HOST_CPPFLAGS+= -I. \
-I${DIST}/sim/ppc -I${DIST}/include \
-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \
-I${.CURDIR}/../libbfd/arch/${GDB_MACHINE_ARCH} \
+ -I${.CURDIR}/../libgnulib/arch/${GDB_MACHINE_ARCH} \
-I${DIST}/bfd \
-I${DIST}/gdb \
-I${DIST}/gdb/config \
@@ -29,11 +30,19 @@ HOST_CPPFLAGS+= -I. \
-I${.CURDIR}/../arch/${GDB_MACHINE_ARCH} \
-I${DIST}/sim/common
PSIM_DEFINES= -DHAVE_CONFIG_H \
- -DDEFAULT_INLINE=PSIM_INLINE_LOCALS \
+ -DDEFAULT_INLINE=INLINE_LOCALS \
-DWITH_HOST_BYTE_ORDER=BYTE_ORDER \
-DWITH_SMP=5 \
+ -DSIM_COMMON_BUILD \
-DHAVE_TERMIOS_STRUCTURE \
- -DHAVE_DEVZERO
+ -DHAVE_DEVZERO \
+ -DWITH_TRACE=0 \
+ -DWITH_ASSERT=0 \
+ -DWITH_STDIO=0 \
+ -DWITH_ENVIRONMENT=0 \
+ -DWITH_RESERVED_BITS=0 \
+ -DREPORT_BUGS_TO=\"[email protected]\" \
+ -DPKGVERSION=\"13.2\"
# we need the same -I flags for host / target.
CPPFLAGS+= ${HOST_CPPFLAGS} ${PSIM_DEFINES}
@@ -45,7 +54,7 @@ CPPFLAGS+= ${HOST_CPPFLAGS} ${PSIM_DEFIN
# igen portion
IGEN_FLAGS= -E -F 32,f,o -CSRI 1024 -N 5 \
-o ${DIST}/sim/ppc/dc-complex \
- -I ${DIST}/sim/ppc -i ${DIST}/sim/ppc/ppc-instructions \
+ -I ${DIST}/sim/ppc -i ${DIST}/sim/ppc/powerpc.igen \
-n icache.h -hc tmp-icache.h \
-n icache.c -c tmp-icache.c \
-n semantics.h -hs tmp-semantics.h \
@@ -65,7 +74,7 @@ IGENOBJS= ${IGENSRCS:S/.c/.lo/}
DPSRCS+= ${IGENED_FILES:M*.h}
${IGENED_FILES}: run-igen
-run-igen: igen ppc-instructions
+run-igen: igen powerpc.igen
${_MKMSG_CREATE} ${IGENED_FILES}
rm -f ${.TARGET}
./igen ${IGEN_FLAGS}
@@ -105,31 +114,6 @@ run-dgen: dgen
dgen: ${DGENOBJS}
${HOST_LINK.c} ${DGENOBJS} -o ${.TARGET}
-# gentmap portion
-GENTMAPSRCS= gentmap.c
-GENTMAPOBJS= ${GENTMAPSRCS:S/.c/.lo/}
-
-gentmap: ${GENTMAPOBJS}
- ${HOST_LINK.c} ${GENTMAPOBJS} -o ${.TARGET}
-
-gentmap.c: targ-vals.def
-
-targ-vals.def: ${DIST}/sim/ppc/../common/nltvals.def
- rm -f targ-vals.def tmp-def
- cat ${DIST}/sim/ppc/../common/nltvals.def > tmp-vals.def
- ${MIC} tmp-vals.def targ-vals.def
-
-targ-vals.h: gentmap targ-vals.def
- rm -f tmp-vals.h
- ./gentmap -h > tmp-vals.h
- ${MIC} tmp-vals.h targ-vals.h
-DPSRCS+= targ-vals.h
-
-targ-map.c: gentmap targ-vals.def
- rm -f tmp-map.c
- ./gentmap -c > tmp-map.c
- ${MIC} tmp-map.c targ-map.c
-
# hw.c / hw.h portion
HWSRCS= hw_cpu.c hw_memory.c hw_nvram.c hw_iobus.c hw_htab.c hw_disk.c \
hw_trace.c hw_register.c hw_vm.c hw_init.c hw_core.c hw_pal.c \