Cross-compiler toolchain
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Hi.

    The cross-compiler utils mentioned here:
    http://library.morph.zone/Developer_tools

    don't seem to be available anymore.
    Anyone knows where to get those?


    Manfred
  • »25.08.17 - 22:25
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    So I found a cross-compiler for macOS here: morph.zone

    But it only has gcc 4.4.5. I'm wondering if there is something newer?


    Manfred
  • »26.08.17 - 08:04
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Hmm. With a macOS toolchain I don't get much further.
    Is there no pre-compiled Linux cross-toolchain?


    Manfred
  • »26.08.17 - 13:50
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Alright, alright. I'm building it.
    I've tried on openSUSE with information found on:
    - http://kas1e.mikendezign.com/morphos/mos_cygwin.txt
    I've pretty much done what's in there, except using the current SDK stuff and the latest "setup-cross-sdk.sh".
    But I'm running into some issues.

    What's the preferred Linux you want to have this built on?

    And to be honest, why is there no pre-built stuff that one can find and use?


    Manfred
  • »26.08.17 - 22:12
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    It's a pitty. Because I'd like to do something useful.
    But I don't want to spend my time on trying to build cross-compiler tools.
    No one?


    Manfred
  • »29.08.17 - 18:46
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2649 from 2003/3/5
    From: Canada
    Quote:

    asrael22 wrote:
    What's the preferred Linux you want to have this built on?



    My cross-setup runs on Debian8 if I remember right.

    Quote:

    And to be honest, why is there no pre-built stuff that one can find and use?


    I wish I could provide a cross-sdk one day, but I don't currently have the hardware I could comfortably do this on.
  • »31.08.17 - 01:36
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Quote:

    jacadcaps wrote:
    Quote:

    asrael22 wrote:
    What's the preferred Linux you want to have this built on?



    My cross-setup runs on Debian8 if I remember right.



    That's great.

    Quote:

    jacadcaps wrote:
    Quote:

    And to be honest, why is there no pre-built stuff that one can find and use?


    I wish I could provide a cross-sdk one day, but I don't currently have the hardware I could comfortably do this on.

    What do you mean? You don't know how or where to distribute this?


    Manfred

    [ Edited by ASiegel 31.08.2017 - 19:27 ]
  • »31.08.17 - 06:20
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2649 from 2003/3/5
    From: Canada
    I dont currently have any Intel hw to work on comfortably, that is what I meant.
  • »31.08.17 - 15:10
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Well, but if you have cross-compiler tools for Debian 8, then put them somewhere to download.
    More people could be interested, so maybe it could be put at morphos-storage?


    Manfred


    [ Edited by asrael22 31.08.2017 - 19:45 ]
  • »31.08.17 - 16:29
    Profile
  • Just looking around
    Posts: 7 from 2015/1/15
    I just compiled current 3.10 SDK with Debian 8 without problems. Using script from http://bigfoot.morphos-team.net/files/setup-cross-sdk.sh

    Make sure you have 32-bit support libraries installed to used Gcc and Gcc is not 'too new'. 'Too new' Gcc probably need some additional cflags to the script. Debian 8 has gcc-4.9 and it worked quite well with script mentioned before.

    Making Debian-package would be better idea than just sharing some non-static binaries without dependencies.
  • »01.09.17 - 03:24
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Quote:

    jvaltane wrote:
    I just compiled current 3.10 SDK with Debian 8 without problems. Using script from http://bigfoot.morphos-team.net/files/setup-cross-sdk.sh

    Make sure you have 32-bit support libraries installed to used Gcc and Gcc is not 'too new'. 'Too new' Gcc probably need some additional cflags to the script. Debian 8 has gcc-4.9 and it worked quite well with script mentioned before.

    Making Debian-package would be better idea than just sharing some non-static binaries without dependencies.


    A tar.gz package which maps into /opt/mos-sdk , or whatever is IMO better than nothing.

    I've tried with openSUSE and ran into a couple of issues.
    But if you say it works smooth on Debian I'll give it try.

    Manfred
  • »01.09.17 - 06:34
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    asrael22
    Posts: 404 from 2014/6/11
    From: Germany
    Nice.
    Should the cross-toolchain on macOS actually work the same as on Linux or are there any limitations?


    Manfred
  • »09.02.18 - 11:09
    Profile
  • Caterpillar
    Caterpillar
    Marlon
    Posts: 31 from 2018/2/9
    From: Sweden
    Quote:

    asrael22 wrote:
    Nice.
    Should the cross-toolchain on macOS actually work the same as on Linux or are there any limitations?


    Manfred

    It's a bit of a rework of http://bigfoot.morphos-team.net/files/setup-cross-sdk.sh to automate the install a bit. So far I've only tried it on Linux. Feel free to try it out on Mac and let me know if it works. :)
  • »09.02.18 - 13:02
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1100 from 2013/5/24
    From: Nederland
    Quote:

    Marlon wrote:
    Quote:

    asrael22 wrote:
    Nice.
    Should the cross-toolchain on macOS actually work the same as on Linux or are there any limitations?


    Manfred

    It's a bit of a rework of http://bigfoot.morphos-team.net/files/setup-cross-sdk.sh to automate the install a bit. So far I've only tried it on Linux. Feel free to try it out on Mac and let me know if it works. :)



    I *almost* got this script to work on High Siera 10.13.4 with a bit of fudging.

    Install http://brew.sh
    brew install xz gcc@5 gnu-sed gnu-tar

    Then edit the toolchain-morphos script and replace all occurrences of sed/tar with gsed/gtar

    It stops complaining and goes about downloading and extracting everything, but fails to build gcc and ends.

    Code:

    tail -n12 "/Users/zayn/source/morphos-cross-toolchain/setup-cross-sdk.log"
    /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/setupcrosssdk.HEZ1AwkY/gcc5/build/./gcc/xgcc -B/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/setupcrosssdk.HEZ1AwkY/gcc5/build/./gcc/ -B/opt/ppc-morphos/ppc-morphos/bin/ -B/opt/ppc-morphos/ppc-morphos/lib/ -isystem /opt/ppc-morphos/ppc-morphos/include -isystem /opt/ppc-morphos/ppc-morphos/sys-include -g -O2 -mbaserel32 -mstrict-align -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -I. -I. -I../../.././gcc -I../../../../gcc-5.3.0/libgcc -I../../../../gcc-5.3.0/libgcc/. -I../../../../gcc-5.3.0/libgcc/../gcc -I../../../../gcc-5.3.0/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS -c eh_dummy.c
    -o eh_dummy.o;
    objects=eh_dummy.o;
    fi;
    /opt/ppc-morphos/ppc-morphos/bin/ar rc libgcc.a $objects
    /bin/sh: line 1: 29062 Abort trap: 6 /opt/ppc-morphos/ppc-morphos/bin/ar rc libgcc.a $objects
    make[5]: *** [libgcc.a] Error 134
    make[4]: *** [multi-do] Error 1
    make[3]: *** [all-multi] Error 2
    make[2]: *** [all-target-libgcc] Error 2
    make[1]: *** [all] Error 2
    make: *** [build/.morphos-build-stamp] Error 2


    Any ideas?
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »28.04.18 - 00:34
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1100 from 2013/5/24
    From: Nederland
    I've wasted far too many hours on this.

    Clang, gcc-4.9,gcc-5,gcc-7 none of them build the cross-compiler successfully.

    Issues with libgmp being 64bit on the host.

    Really can't be arsed anymore. The 68k and OS4 cross-compiler toolchain's both build without issues on the same machine.

    One more reason why I don't bother with MorphOS much anymore.

    [ Edited by Intuition 29.04.2018 - 16:54 ]
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »29.04.18 - 16:53
    Profile
  • MorphOS Developer
    CISC
    Posts: 618 from 2005/8/27
    From: the land with ...
    Quote:

    Intuition wrote:
    I've wasted far too many hours on this.


    Why not just install Docker and build a cross-compiler inside a proper Linux environment? It's much quicker and easier than a full virtual machine at least, and you won't get screwed over by MacOS quirkyness.


    - CISC
  • »29.04.18 - 21:32
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1100 from 2013/5/24
    From: Nederland
    Quote:

    CISC wrote:
    Quote:

    Intuition wrote:
    I've wasted far too many hours on this.


    Why not just install Docker and build a cross-compiler inside a proper Linux environment? It's much quicker and easier than a full virtual machine at least, and you won't get screwed over by MacOS quirkyness.


    - CISC


    Good idea, thanks.

    I'm stubborn so I wanted to get it working on MacOS. I'll probably still spend hours fiddling on it. :)
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.15

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, 500GB SSHD, MorphOS 3.9
  • »29.04.18 - 21:39
    Profile