Sigbj?rn Skj?ret's GCC crosscompiler
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Kamul
    Posts: 121 from 2004/6/9
    From: Poland, Katowice
    Hello!

    Could someone help me with MOS GCC crosscompiler for m68k, please?
    I found it on Aminet (m68k-amigaos-gcc2.95.3.tar.bz2), but there's no information how to install it and make it useable.
  • »24.01.08 - 15:22
    Profile
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    IIRC all you have to do is unpack it in your GG dir, though you better unpack it somewhere else first just to check that it won't overwrite anything important.

    Additionally you might need to grab some AOS includes (and tweak them to work with GCC (as well as generate inlines)) and stuff them in m68k-amigaos/os-include or whereever they went again...


    - CISC
  • »25.01.08 - 07:04
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    CISC wrote:
    IIRC all you have to do is unpack it in your GG dir, though you better unpack it somewhere else first just to check that it won't overwrite anything important.

    Unpacking the archive directly might clobber c++ includes. AFAICT, this archive is pretty old and thus the includes are very likely older than then ones from a current MOS native GCC.

    Quote:

    Additionally you might need to grab some AOS includes (and tweak them to work with GCC (as well as generate inlines)) and stuff them in m68k-amigaos/os-include or whereever they went again...

    Only native AmigaOS-style compilers have an "os-include" directory ;-) For cross-compilers these special OS-includes are placed in <target>/sys-include and the normal C includes in <target>/include.

    However, this archive has a surprising layout because all programs normally found somewhere in bin/ are placed in the compiler directory...
  • »25.01.08 - 07:55
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Kamul
    Posts: 121 from 2004/6/9
    From: Poland, Katowice
    First of all, thanks for your answers!

    I copied all archive contents beside /include/g++-3/ (this directory
    has been already exist in my GG:). I also copied OS3.9 includes to
    GG:m68k-amigaos/os-include. Then in my makefile I set CC variable to
    GG:lib/gcc-lib/m68k-amigaos/2.95.3/gcc
    When I'm trying to make a project, I'm getting this message:
    Assembler messages:
    Error: invalid switch -mc68010
    make: *** [o/clipboard.o] Error 1

    What should I do now?
  • »25.01.08 - 10:24
    Profile
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    Quote:

    What should I do now?


    You need to grab the crosscompiling binutils as well...


    - CISC
  • »25.01.08 - 11:13
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    You need to grab the crosscompiling binutils as well...

    There are one (2.13.1) flying around, but are broken. Alternative way (tried by me) is just using m68k native 2.9.1 binutils.
  • »25.01.08 - 12:57
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Kamul
    Posts: 121 from 2004/6/9
    From: Poland, Katowice
    Do you mean 2.13.1 binutils from Aminet? I tried it, than I used 2.8.1
    - from Aminet also (BTW: where can I find binutils 2.9.1?). This
    time before copying file from /bin to GG:bin I renemed files adding
    "m68k-amigaos-" string at the begining.

    Unfortunately in both cases I get error:
    /gg/m68k-amigaos/bin/ld: cannot open -lamiga: No such file or directory
    collect2: ld returned 1 exit status

    I don't have amiga.lib anywhere in GG: - also in ppc-morphos stuff.
    But I can compile for MorphOS without any problems. Could anyone help?
    I hope that's my last problem related with m68k crosscompiling. ;)
  • »25.01.08 - 13:54
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Kamul
    Posts: 121 from 2004/6/9
    From: Poland, Katowice
    Using Snoopium I managed to avoid "cannot open -lamiga" problem. I
    renamed amiga.lib from OS3.9 SDK to libamiga.a and copied to
    GG:m68k-amigaos/lib.

    Then I needed some inlines. First one for muimaster.library. I
    generated it with fd2pragma from Aminet. After that GCC started
    complain about macros inline. There was a problem, because there is a
    clib/macros.h in OS3.9 SDK, but not fd/macros_lib.fd. Luckily I've
    found needed inline (and many others, which I copied to my inline
    directory) in this archive:
    http://it.aminet.net/dev/gcc/fd2inline-bin.lha

    Now I have different problem while linking. With MOS binutils version
    I've got:
    /gg/m68k-amigaos/bin/ld: BFD 2.13.1 internal error, aborting at ../../binutils-2.13.1/bfd/amigaoslink.c line 259 in get_relocated_section_contents
    /gg/m68k-amigaos/bin/ld: Please report this bug.
    collect2: ld returned 1 exit status

    and for m68k version it is:
    ld terminated with signal 6

    Any ideas?...
  • »25.01.08 - 18:22
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    Kamul wrote:
    Do you mean 2.13.1 binutils from Aminet? I tried it, than I used 2.8.1 - from Aminet also

    FWIW, I would suggest to avoid both versions. 2.8.1 is much to old and 2.13.1 I wouldn't trust at all.

    Quote:

    (BTW: where can I find binutils 2.9.1?).

    You can find the archive here: GeekGadget archives. At the same place you can also find a working libamiga.a, normal includes (ixemul-<ver>-inc) and somethere should also be the special GCC OS-inline headers (fd2inline-1.11?).
  • »28.01.08 - 07:57
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    Kamul wrote:
    With MOS binutils version I've got:
    /gg/m68k-amigaos/bin/ld: BFD 2.13.1 internal error, aborting at ../../binutils-2.13.1/bfd/amigaoslink.c line 259 in get_relocated_section_contents
    /gg/m68k-amigaos/bin/ld: Please report this bug.
    collect2: ld returned 1 exit status

    and for m68k version it is:
    ld terminated with signal 6

    Any ideas?...


    Try the 2.9.1 version. It seems new m68k-amigaos binutils and GCC archives for a MOS would be worthwhile.
  • »28.01.08 - 08:01
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Kamul
    Posts: 121 from 2004/6/9
    From: Poland, Katowice
    Thank you for valuable informations. I've already managed (after many
    long fights) ;) to compile sources for m68k. However I updated
    binutils and other stuff to versions you recommend. I hope it would
    let me save some problems that could appear in the future.
  • »29.01.08 - 12:51
    Profile