Subject: Re: Problem on cross-m68k-netbsdelf compiler
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Steve Woodford <steve@mctavish.co.uk>
List: tech-toolchain
Date: 01/17/2001 18:36:31
On Wed, 17 Jan 2001, Izumi Tsutsui wrote:

> I'm working on making cross-m68k-netbsdelf package.
> It seems almost working, but there are some problems.
> On compiling an ELF kernel for news68k, ld complains about:
>
> /usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `prtactive' \
> changed from 8 to 4 in vfs_subr.o
> /usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `safepri' \
> changed from 8 to 4 in machdep.o
> /usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `constty' \
> changed from 8 to 4 in cons.o

That's a known issue. For the fix, see revision 1.7 of
gnusrc/dist/gcc/config/m68k/netbsd-elf.h.

> BTW, is it possible to use an m68k ELF kernel (with COMPAT_AOUT_M68K)
> on a.out userland? When I tried it, some binaries (ifconfig, route etc.)
> did not work. I'm wondering if it is compiler problem or kernel problem.

Yet another known issue. :-)

These binaries (actually some library functions) use sysctl(3) to retrieve
network details. I looked into to extending COMPAT_AOUT_M68K to compensate
for the structure padding differences in the returned data but it turned
out to Non Trivial. In the end I punted, preferring to provide the static
ELF binaries to folks wanting to upgrade.

For static m68k ELF binaries for these commands, see:

ftp://ftp.netbsd.org/pub/NetBSD/arch/mvme68k/snapshot/elf-upgrade/sbin

Cheers, Steve

PS. I have *no* plans to revisit COMPAT_AOUT_M68K to get the a.out
versions of these binaries working. Volunteers are welcome. ;-)