Module Name: src Committed By: kalvisd Date: Wed Oct 23 00:45:59 UTC 2024
Modified Files: src/share/mk: bsd.README src/tools: Makefile src/usr.sbin/mopd: Makefile.inc src/usr.sbin/mopd/common: file.c src/usr.sbin/mopd/mopcopy: mopcopy.c Added Files: src/tools/libmopcopy: Makefile src/tools/vax-mopcopy: Makefile Log Message: Add mopcopy as a build tool for the VAX port. OK rin@ To generate a diff of this commit: cvs rdiff -u -r1.450 -r1.451 src/share/mk/bsd.README cvs rdiff -u -r1.226 -r1.227 src/tools/Makefile cvs rdiff -u -r0 -r1.1 src/tools/libmopcopy/Makefile cvs rdiff -u -r0 -r1.1 src/tools/vax-mopcopy/Makefile cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mopd/Makefile.inc cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/mopd/common/file.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mopd/mopcopy/mopcopy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.450 src/share/mk/bsd.README:1.451 --- src/share/mk/bsd.README:1.450 Tue Sep 24 14:25:43 2024 +++ src/share/mk/bsd.README Wed Oct 23 00:45:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.450 2024/09/24 14:25:43 christos Exp $ +# $NetBSD: bsd.README,v 1.451 2024/10/23 00:45:58 kalvisd Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -651,6 +651,9 @@ TOOL_TBL Format tables for groff. [tbl TOOL_UUDECODE Uudecode a binary file. [uudecode] +TOOL_VAXMOPCOPY Creates a MOP image from another executable format. + [vax-mopcopy] + TOOL_VGRIND Grind nice listings of programs. [vgrind -f] TOOL_ZIC Time zone compiler. [zic] Index: src/tools/Makefile diff -u src/tools/Makefile:1.226 src/tools/Makefile:1.227 --- src/tools/Makefile:1.226 Sun Sep 15 03:56:58 2024 +++ src/tools/Makefile Wed Oct 23 00:45:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.226 2024/09/15 03:56:58 tsutsui Exp $ +# $NetBSD: Makefile,v 1.227 2024/10/23 00:45:58 kalvisd Exp $ .include <bsd.own.mk> .include <bsd.endian.mk> @@ -213,6 +213,10 @@ SUBDIR+= amiga-txlt SUBDIR+= hp300-mkboot .endif +.if ${MACHINE} == "vax" +SUBDIR+= libmopcopy vax-mopcopy +.endif + .if ${MACHINE} == "evbarm" \ && ${MACHINE_CPU} == "arm" \ && ${TARGET_ENDIANNESS} == "1234" Index: src/usr.sbin/mopd/Makefile.inc diff -u src/usr.sbin/mopd/Makefile.inc:1.12 src/usr.sbin/mopd/Makefile.inc:1.13 --- src/usr.sbin/mopd/Makefile.inc:1.12 Sun Oct 31 18:06:42 2021 +++ src/usr.sbin/mopd/Makefile.inc Wed Oct 23 00:45:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2021/10/31 18:06:42 christos Exp $ +# $NetBSD: Makefile.inc,v 1.13 2024/10/23 00:45:58 kalvisd Exp $ USE_FORT?=yes # network server .include <bsd.own.mk> @@ -9,8 +9,10 @@ CPPFLAGS+= -DNOAOUT LIBCOMMON != cd ${.CURDIR}/../common && ${PRINTOBJDIR} CPPFLAGS+=-I${.CURDIR}/../common +.ifndef HOSTPROG DPADD+= ${LIBCOMMON}/libcommon.a LDADD+= -L${LIBCOMMON} -lcommon +.endif .if exists(${.CURDIR}/../../Makefile.inc) .include "${.CURDIR}/../../Makefile.inc" Index: src/usr.sbin/mopd/common/file.c diff -u src/usr.sbin/mopd/common/file.c:1.18 src/usr.sbin/mopd/common/file.c:1.19 --- src/usr.sbin/mopd/common/file.c:1.18 Mon Oct 21 05:39:48 2024 +++ src/usr.sbin/mopd/common/file.c Wed Oct 23 00:45:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: file.c,v 1.18 2024/10/21 05:39:48 kalvisd Exp $ */ +/* $NetBSD: file.c,v 1.19 2024/10/23 00:45:58 kalvisd Exp $ */ /* * Copyright (c) 1995-96 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: file.c,v 1.18 2024/10/21 05:39:48 kalvisd Exp $"); +__RCSID("$NetBSD: file.c,v 1.19 2024/10/23 00:45:58 kalvisd Exp $"); #endif #include "os.h" @@ -36,7 +36,7 @@ __RCSID("$NetBSD: file.c,v 1.18 2024/10/ #include <stddef.h> #ifndef NOAOUT -# if defined(__NetBSD__) || defined(__OpenBSD__) +# if defined (HAVE_NBTOOL_CONFIG_H) || defined(__NetBSD__) || defined(__OpenBSD__) # include <sys/exec_aout.h> # endif # if defined(__bsdi__) @@ -54,7 +54,7 @@ __RCSID("$NetBSD: file.c,v 1.18 2024/10/ #endif /* NOAOUT */ #ifndef NOELF -# if defined(__NetBSD__) +# if defined (HAVE_NBTOOL_CONFIG_H) || defined(__NetBSD__) # include <sys/exec_elf.h> # else # define NOELF Index: src/usr.sbin/mopd/mopcopy/mopcopy.c diff -u src/usr.sbin/mopd/mopcopy/mopcopy.c:1.12 src/usr.sbin/mopd/mopcopy/mopcopy.c:1.13 --- src/usr.sbin/mopd/mopcopy/mopcopy.c:1.12 Tue May 24 06:28:02 2022 +++ src/usr.sbin/mopd/mopcopy/mopcopy.c Wed Oct 23 00:45:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: mopcopy.c,v 1.12 2022/05/24 06:28:02 andvar Exp $ */ +/* $NetBSD: mopcopy.c,v 1.13 2024/10/23 00:45:58 kalvisd Exp $ */ /* mopcopy - Convert a Unix format kernel into something that * can be transferred via MOP. @@ -49,7 +49,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: mopcopy.c,v 1.12 2022/05/24 06:28:02 andvar Exp $"); +__RCSID("$NetBSD: mopcopy.c,v 1.13 2024/10/23 00:45:58 kalvisd Exp $"); #endif #include "os.h" @@ -57,7 +57,7 @@ __RCSID("$NetBSD: mopcopy.c,v 1.12 2022/ #include "mopdef.h" #include "file.h" #if !defined(NOAOUT) -#if defined(__NetBSD__) || defined(__OpenBSD__) +#if defined (HAVE_NBTOOL_CONFIG_H) || defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/exec_aout.h> #endif #if defined(__FreeBSD__) @@ -76,7 +76,7 @@ __RCSID("$NetBSD: mopcopy.c,v 1.12 2022/ #endif #ifndef NOELF -# if defined(__NetBSD__) +# if defined (HAVE_NBTOOL_CONFIG_H) || defined(__NetBSD__) # include <sys/exec_elf.h> # else # define NOELF Added files: Index: src/tools/libmopcopy/Makefile diff -u /dev/null src/tools/libmopcopy/Makefile:1.1 --- /dev/null Wed Oct 23 00:45:59 2024 +++ src/tools/libmopcopy/Makefile Wed Oct 23 00:45:59 2024 @@ -0,0 +1,42 @@ +# $NetBSD: Makefile,v 1.1 2024/10/23 00:45:59 kalvisd Exp $ + +HOSTLIB= mopcopy +LIBMOPCOPY_DIR= ${NETBSDSRCDIR}/usr.sbin/mopd/common + +.include <bsd.hostinit.mk> + +SRCS= cmp.c \ + get.c \ + nma.c \ + mopdef.c \ + file.c \ + log.c + +.ifndef NOCOMPATLIB +COMPATLIB_NO_LIB= yes # only the include files, not the library +.-include "${TOOLDIR}/share/compat/defs.mk" +.endif + +BUILD_OSTYPE!= uname -s + +# Disable use of pre-compiled headers on Darwin. +.if ${BUILD_OSTYPE} == "Darwin" +CPPFLAGS+= -no-cpp-precomp +.endif + +HOST_CPPFLAGS+= -DHAVE_NBTOOL_CONFIG_H=1 + +# VAX binaries are now ELF +HOST_CPPFLAGS+= -DNOAOUT + +.PATH: ${LIBMOPCOPY_DIR} + +realinstall: install.host +install.host: ${TOOLDIR}/lib/libmopcopy.a +${TOOLDIR}/lib/libmopcopy.a:: libmopcopy.a + ${_MKTARGET_INSTALL} + mkdir -p ${TOOLDIR}/lib + ${HOST_INSTALL_FILE} -m ${BINMODE} libmopcopy.a ${.TARGET} + +.include "${.CURDIR}/../Makefile.nbincludes" +.include <bsd.hostlib.mk> Index: src/tools/vax-mopcopy/Makefile diff -u /dev/null src/tools/vax-mopcopy/Makefile:1.1 --- /dev/null Wed Oct 23 00:45:59 2024 +++ src/tools/vax-mopcopy/Makefile Wed Oct 23 00:45:59 2024 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2024/10/23 00:45:59 kalvisd Exp $ + +.include <bsd.hostinit.mk> + +HOSTPROGNAME= ${_TOOL_PREFIX}vax-mopcopy +HOST_SRCDIR= usr.sbin/mopd/mopcopy + +LIBMOPCOPYOBJ!= cd ${.CURDIR}/../libmopcopy && ${PRINTOBJDIR} + +LDADD+= -L${LIBMOPCOPYOBJ} -lmopcopy + +# VAX binaries are now ELF +HOST_CPPFLAGS+= -DNOAOUT + +.include "${.CURDIR}/../Makefile.nbincludes" +.include "${.CURDIR}/../Makefile.host"