Subject: extern __inline functions and kernel link errors
To: None <port-mac68k@netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-mac68k
Date: 11/02/2002 22:59:40
Hi,

for quite some time now I have been unable to build a 68040-only
mac68k kernel from post-1.6 sources, probably since bus_dma went
m68k. For details, see

  <http://mail-index.netbsd.org/port-mac68k/2002/10/09/0000.html>

What happens is that the m680x0 cache operation functions from
<m68k/include/cacheops.h> are marked up as undefined references. 

Those functions (defined for the respective cpus in
cacheops_[2346]0.h) should be inlined according to the source code
(and preprocessor output obtained by 'cc -E'). For
mac68k/mac68k/sys_machdep.c>, I get

[hauke@q700] ~/<6>compile/DUO280 > nm -g sys_machdep.o 
         U DCFA_40
         U DCFL_40
         U DCFP_40
         U DCIU_40
         U DCPL_40
         U DCPP_40
         U ICIA_40
         U ICPA_40
         U ICPL_40
         U ICPP_40
00000000 T cachectl1
         U mmutype
         U pmap_extract
00000296 T sys_sysarch

-- the cache functions that are supposed to be inlined are noted as
external references. But, according to the gcc manual, a function
declared with 'extern __inline__' is never exported. (where is
'__inline' documented, btw? The gcc info file only knows about
'inline' and '__inline__'.)

I suspected the toolchain and upgraded my ~1.6 installation to a
current snapshot, but - no difference. 

/etc/mk.conf contains nothing relevant.

What am I missing?

        hauke

-- 
Now without signature.