Subject: Re: port-mac/1678: missing dependencies for COMPAT_SUNOS
To: None <netbsd-bugs@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: netbsd-bugs
Date: 10/24/1995 11:51:31
In article <199510240231.UAA07522@rupert.oscs.montana.edu> cjones@rupert.oscs.montana.edu writes:
>
>>Number: 1678
>>Category: port-mac
>>Synopsis: missing dependencies for COMPAT_SUNOS
>>Confidential: no
>>Severity: non-critical
>>Priority: low
>>Responsible: gnats-admin (GNATS administrator)
>>State: open
>>Class: sw-bug
>>Submitter-Id: net
>>Arrival-Date: Mon Oct 23 22:50:07 1995
>>Last-Modified:
>>Originator: Chris Jones
>>Organization:
>>Release: 951022<NetBSD-current source date>
>>Environment:
>
>System: NetBSD rupert.oscs.montana.edu 1.0A NetBSD 1.0A (GENERIC) #0: Thu Sep 7 18:51:09 MDT 1995 root@amiga2.oscs.montana.edu:/mnt/src/sys/arch/mac68k/compile/GENERIC mac68k
>
>
>>Description:
>
>kern_sig.o, uipc_socket.o, and trap.o all reference _emul_sunos, but
>the Makefile doesn't show them as being dependent on Makefile, which
>would seem logical.
>>How-To-Repeat:
>
>I configured a kernel with COMPAT_SUNOS, compiled it, changed my mind
>and removed COMPAT_SUNOS, re-ran config, re-ran make depend, and
>re-ran make. I got the following:
>[...]
>loading netbsd
>kern_sig.o: Undefined symbol `_emul_sunos' referenced from text segment
>uipc_socket.o: Undefined symbol `_emul_sunos' referenced from text segment
>trap.o: Undefined symbol `_emul_sunos' referenced from text segment
>trap.o: Undefined symbol `_emul_sunos' referenced from text segment
>[...]
>
>>Fix:
>
>Should be able to put dependencies in the Makefile.mac68k like the
>following:
This is just not feasible. Each -DFOO flag affects a handful of files
in the kernel. If you want to make that work with every -DFOO flag, then
you'll need to add:
*.o: Makefile
Which is the equivalent of making clean and remaking from scratch!
People have suggested in the past to put every -DFOO flag in a
foo.h file that contains '#define FOO 1' and let the compiler to its thing.
This of course is a maintainance nightmare and will slow down compilation
a lot.
So the brief answer is: There is no solution to the problem. If you
modify your kernel configuration file: 'make clean; make depend; make'
You can skip 'make clean; make depend' if you are in a hurry, and use
rm *.o...
christos