Subject: Status of New Toolchain on m68k
To: None <>
From: Steve Woodford <>
List: tech-toolchain
Date: 11/05/2001 09:44:30
Hi Folks,

I'm just about ready to commit the `toolchain2netbsd'-generated files for
m68k. Also, the Makefile.{in,am} for ld(1) needs to be tweaked to add
em68kelfnbsd.[co] targets. Is it safe to just commit the change to both
Makefiles without worrying about running automake?

So far, there are two show-stoppers which need fixing before switching
m68k to the new toolchain:

1) There is a code-gen bug in gcc with -O2 which mis-compiles as(1). I've
narrowed it down to gnu/dist/toolchain/gas/write.c but have yet to
pinpoint the exact location of the problem. Compiling with -O1 makes it go
away. (Debugging this has been a handy way to test the new gdb(1) ;-)

2) as(1) itself fails to compile some kernel assembly files (e.g. m68k's
FPSP code) due to miscomputing PC-relative branch offsets when the target
label is declared ".globl". I know exactly why it fails and have
temporarily worked around it in each of the affected assembly files. I
hope to get this fixed properly sometime this week.

With the above work-arounds in place, I've successfully built the world
and kernel several times on an mvme68k box with the new toolchain. So far
it's all working fine. (Although a couple of .c files in mvme68k's stand
now fail to compile due to new warnings. I'll fix those RSN).

Is there a consensus on how the m68k-based ports should be switched when
the time comes? I.e, switch them all at once, or port by port?

Cheers, Steve