Aucbvax.4486 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Fri Oct 16 00:09:49 1981 Re: Vax->11 C Cross-Compiler >From obrien@RAND-UNIX Thu Oct 15 21:10:38 1981 If you've got 4BSD or later running then you can just bring over a compiler from an 11 and run it in compat mode. We maintain our front-end NCP that way. Basically the following defines do it: CFLAGS = $(A) -O $(DEFS) $(INCL) AS = /usr/local/v7run -/usr/pdp11stuff /bin/as CC = /usr/local/v7run -/usr/pdp11stuff /bin/cc LD = -/usr/local/v7run -/usr/pdp11stuff /bin/ld NM = /usr/local/v7run -/usr/pdp11stuff /bin/nm STRIP = /usr/local/v7run -/usr/pdp11stuff /bin/strip The only really ugly thing about it is that v7run has to be suid to root because the "chroot" system call is protected for security reasons. So you probably have to protect it against all but sys group. We brought over all of the /bin, /usr/bin/, /usr/lib, etc. stuff from the 11 with "tar" and put it under /usr/pdp11stuff. v7run does a chroot to there so all the 11 stuff thinks it's back home. It works like a champ. There are some fixes to compat mode that someone sent me to make signals, floating point, etc. run right. You can ask me for those, though I haven't gotten around to testing them and I certainly don't want to distribute them generally. "allegra!jdd@Berkeley" did the fixing; others on unix-wizards should contact him/her directly. None of the fixes are needed to make compilations work (and even edits under "ed" if you want to go full compat). ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.