fix #H4240 - linking on VAX/VMS

First reported two years ago, then again this week by someone else
who didn't go through the web contact page (so no new #H number or
bugzilla entry).  Using vmsbuild.com to build on VAX complains about
not being able to resolve a bunch of functions--it's basically
trying to build the full program using only the code supplied by
sys/vms/vmsmain.c.  The original report mentioned a workaround and
was also dealing with a second issue (already fixed post-3.6.0) that
I incorrectly guessed was responsible for the linking problem.  This
report had the correct linker magic to fix the linking issue.

I'm still not sure whether the order of /Library and /Include after
the name of an object library file on a LINK command line matters.
In a linker options file, which vmsbuild.com constructs and uses,
/Include needs to come first so that the contents of the library are
searched after the explicitly included object modules are processed.

Building with the Makefiles (using DEC's MMS or some versions of
freeware MMK) doesn't collect the object files into a library so was
never affected by this.  And the linker options ordering issue is
apparently specific to the VAX/VMS linker; vmsbuild.com run on Alpha
and on IA64 linked 3.6.0 successfully without this fix.
This commit is contained in:
PatR
2018-02-14 18:38:35 -08:00
parent e181f1acf9
commit 687902d3ff

View File

@@ -1,6 +1,6 @@
$ ! vms/vmsbuild.com -- compile and link NetHack 3.6.* [pr]
$ version_number = "3.6.1"
$ ! $NHDT-Date: 1465133393 2016/06/05 13:29:53 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $
$ ! $NHDT-Date: 1518661015 2018/02/15 02:16:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.16 $
$ !
$ ! usage:
$ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms]
@@ -175,7 +175,7 @@ $ ! final setup
$ nethacklib = "[-.src]nethack.olb"
$ create nethack.opt
! nethack.opt
nethack.olb/Library/Include=(vmsmain)
nethack.olb/Include=(vmsmain)/Library
sys$library:starlet.olb/Include=(lib$initialize)
psect_attr=lib$initialize, Con,Usr,noPic,Rel,Gbl,noShr,noExe,Rd,noWrt,Long
iosegment=128