MantisBT - NetSurf
View Issue Details
0002059NetSurfAtari-specificpublic2014-01-21 16:182014-08-03 15:06
ReporterJohn-Mark Bell 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version3.1 
Target VersionFixed in Version 
Fixed in CI build #
Reported in CI build #
URL of problem page
Summary0002059: Atari toolchain(s) do not work
DescriptionWe have two atari toolchains: m68k-atari-mint, and a derivative m5475-atari-mint. The latter is supposed to target the Coldfire v4e microarchitecture by default. Sadly, it doesn't, and builds in exactly the same way as m68k-atari-mint (so, host triplet aside, is effectively the same toolchain)

m68k-atari-mint has 5 multilib settings:

$ /opt/netsurf/m68k-atari-mint/cross/bin/m68k-atari-mint-gcc -print-multi-lib
.;
m68020-60;@m68020-60
m5475;@mcpu=5475
mshort;@mshort
m68020-60/mshort;@m68020-60@mshort
m5475/mshort;@mcpu=5475@mshort

The SDK is only ever built for 1 of those (the default, so m68000)

The NS libs are only ever built for the default lib config for the triplet (so, m68020-60 for m68k-atari-mint and, perversely, m68000 for m5475-atari-mint)

NetSurf is built for both m68020-60 and 5475.

That the m68020-60 build of NetSurf works is pure luck (in that, ttbomk, m68000 and m68020-60 are binary-compatible)

The Coldfire build of NetSurf, however, is just plain wrong. Coldfire is in no way binary compatible with m68k (at least, there's no options you can pass to the tooling to generate a binary that uses only the common subset of the instruction set).

Either way, the mix of m68000, m68020-60, and 5475 code is just plain wrong and needs fixing. It's actually a miracle anything links (or, more accurately, belies the lack of flags in the object files preventing linkage of binary-incompatible components).
TagsNo tags attached.
Attached Files

Notes
(0000167)
Vincent Sanders   
2014-01-22 13:08   
I have added --with-arch=cf which *ought* to select coldfire ( with default cpu as 5475) as the compiler default, it is definitely in the compiler config which sets the config options in builddir/gcc/configargs.h

static const struct {
  const char *name, *value;
} configure_default_options[] = { { "cpu", "mcpu=5475" }, { "arch", "cf" } };

but it appears the compiled elf objects have no identifying marks to say what architecture they are built for, no elf symbols, tags or flags differentiate cf arch from 68k arch so i cannot verify this having any affect at all

(0000277)
Vincent Sanders   
2014-03-17 16:10   
Bumped from 3.1 release as no feedback on toolchain updates already made

Issue History
2014-01-21 16:18John-Mark BellNew Issue
2014-01-21 16:51Vincent SandersStatusnew => confirmed
2014-01-22 13:08Vincent SandersNote Added: 0000167
2014-03-17 16:10Vincent SandersNote Added: 0000277
2014-03-17 16:10Vincent SandersTarget Version3.1 => 3.2
2014-08-03 15:06Vincent SandersTarget Version3.2 =>