[comp.sys.apollo] HELP! Problems with sr9.2/sr9.5 object module compatibility

martin@medix.UUCP (Dr. Brian K. Martin) (08/23/87)

HELP!

I'm running sr9.5, and here's the problem: I have just installed Ingres
on my system, and its applications by forms (ABF) modules includes some object
modules (but not the source) that were compiled under sr9.2, which have to
be linked with newly created and compiled modules and with /usr/lib/libm.a,
all under control of ABF.  For example, ABF might generate some new source
modules called f1.c and f2.c, compile them, then link them with oldmodule.o 
and load in routines from /usr/lib/libm.a using the following sequence of
commands:
	cc -c f1.c
	cc -c f2.c
	ld oldmodule.o f1.o f2.o -lm

The easiest solution is to get a new release of Ingres, with all modules
compiled under sr9.5 or later.  But that won't happen for a while.  In the
mean time, I can change the "cc" command to "/com/cc_sr9.2", but the "ld"
command is hard-coded into the ABF module.  As I understand it, the "ld"
command is essentially a no-op, because the routines in /usr/lib/libm.a
are already incorporated into "/lib/clib" (or is it "/lib/unixlib"?).

My empirical solution is to save a copy of /usr/lib/libm.a, then use
the bsd4.2 command
	ar d `ar t /usr/lib/libm.s` /usr/lib/libm.a

to delete all of the modules in /usr/lib/libm.a.  There must be a better way.

Should I replace "ld" with a shell script that invokes "/com/bind" with the
proper options?  Any other suggestions?

Thanks in advance.

Regards,

    Brian K. Martin, M.D.
    Martin Information Systems, Ltd.
    3420-A Hinahina Street
    Honolulu, Hawai'i 96816

PHONE: (808) 735-5661
ARPA: uhccux!medix!martin@nosc.mil
UUCP: { ames!ihnp4,ucbvax,dcdwest,seismo }!sdcsvax!nosc!uhccux!medix!martin