Hallo,

Just a status update on my attempts to create a mcfv4e toolchain:

* The GCC 4.2 branch already contains the -mcfv4e switch. So it
  should be able to compile appropriate code for v4e cores.
  Unfortunately the configuration system of this branch doesn't
  know about the '--with-arch=cf' switch, nor does it accept a
  coldfire cpu as default passed in with '--with-cpu=...'.

  It's possible to compile GCC 4.2.1 for m68k without any options.
  But glibc 2.6.1 is unable to determine the target CPU later, as
  a) stage 1 gcc isn't found (can be hacked/patched, see below)
  b) even with the hack and gcc found, gcc uses m68020 as default
     CPU, so configuration will be wrong. (could be hacked, too)
  
  Additional m68k changes are introduced on GCC SVN trunk later 
  (pre 4.3). I tried to create some patch from the latest GCC 
  4.2.1 to trunk containing these changes. The resulting patch is
  about 125MB as lots of things changed, which causes other problems
  (see below).

  Surely it's possible to hack GCC 4.2.1 to use coldfire v4e as
  default. Nevertheless some patches and fixes from trunk might
  still be needed - determining which patches are needed, could
  result in lots of work.

* So I tried a GCC 4.3 snapshot from last week:
  http://gcc-uk.internet.bs/snapshots/4.3-20070817/
  It avoids bloated patches, but requires you to download the
  snapshot archive by hand and store it in your ptxdist src/ 
  directory.

  This snapshot accepts the '--with-arch=cf' config option, and
  uses the v4e architecture as default 'CPU' therefore.

  Additionally you need libgmp3-dev and libmpfr-dev installed on
  your host (relates to some changes in GCC).

  Additionally the 'libgcc.mk' hack taken from crosstool is no longer
  working, as the libgcc directory was moved and the build system
  for GCC was changed at several points. So I had to comment out  
  this hack and revert back to patches to the GCC, if needed.

  The only fix required to build the stage 1 compiler was in
  ./gcc/Makefile, line 1550:
  $(SPECS): xgcc$(exeext)
        ./xgcc$(exeext) -dumpspecs > tmp-specs
        mv tmp-specs $(SPECS)
  
  At this point the Makefile tried to use $(GCC_FOR_TARGET), which
  wasn't created at this point, yet.

* At target 'glibc-crt.prepare' the variable $(CC) is undefined in
  '/glibc-2.6.1/ports/sysdeps/m68k/preconfigure', and
  glibc-ports can't call the target compiler to check for it's default
  CPU setup. This can be fixed by adding
    CC=$(PTXCONF_GNU_TARGET)-gcc 
  to GLIBC_ENV.

I'm now stuck at 'glibc-crt.compile', where

../nptl/sysdeps/pthread/pthread.h:222: error: expected ')' before '*'
token

causes further problem, which I need to analyse and hopefully fix.

That's it for today...

Regards
Carsten






 



  


____________
Virus checked by G DATA AntiVirusKit
Version: AVKA 17.387 from 17.08.2007

-- 
ptxdist mailing list
[email protected]

Reply via email to