Linux cross compiler
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    Hi.

    I'm trying to get MorphOS cross compiler working on my Linux x86 system, i have tried to install these packages on my pc: http://www.lysator.liu.se/~lcs/files/gg-cross/

    But i don't have some libraries needed to get it working, the readme says that i need to copy libsyscalls.a, and it doesn't exists, i got an error trying to get some code compiled:

    Code:
    ppc-morphos-gcc  test.c -o test 
    /opt/gg/ppc-morphos/bin/ld: cannot open -lsyscall: No such file or directory
    collect2: ld returned 1 exit status


    The MorphOS Library have a link called "Cross-compiling for MorphOS", the site is down, and it doesn't exist on any web archive site like webarchive.net, google cache, ...

    There aren't an updated guide to get cross compilers working on Linux?
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »06.10.12 - 15:32
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3195 from 2003/3/5
    From: Canada
    You should not need libsyscall.a in a properly built environment. This is a private library with userland calls to the Quark kernel and will not be part of the SDK anytime soon. We will however try to make it easier for people to cross-develop for MorphOS in future SDK updates. Sadly, I will be going back from Antarctica back to the real world during the following 3 months, so an update before 2013 is unlikely.
  • »07.10.12 - 22:29
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    jacadcaps,
    Quote:

    You should not need libsyscall.a in a properly built environment


    A simple call like "ppc-morphos-gcc test.c -o test" show that libsyscalls is need and test.c is a simple example with a main function and a printf call inside, so these packages (http://www.lysator.liu.se/~lcs/files/gg-cross/) doesn't work with any MorphOS SDK? these packages were only for MorphOS developers?

    Quote:

    We will however try to make it easier for people to cross-develop for MorphOS in future SDK updates. Sadly, I will be going back from Antarctica back to the real world during the following 3 months, so an update before 2013 is unlikely.


    I can wait, don't worry. I was trying these cross-compiler packages, i need some dev tools like CMake to make some portings, since CMake doesn't exits on MorphOS SDK.
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »08.10.12 - 17:02
    Profile Visit Website
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    BalrogSoft
    Quote:

    I'm trying to get MorphOS cross compiler working on my Linux x86 system
    FWIW, I have working cross-compiler for MorphOS on several FreeBSD boxes. Linux wouldn't be any different.

    Quote:

    Code:
    http://www.lysator.liu.se/~lcs/files/gg-cross/

    There is your problem... The binutils and GCC packages available there are outdated and should not be used anymore!

    This is a short description how it should work (it works for me ;-) Choose an install location ${DEST} and place the SDK headers and libraries there:

    Code:
      - ${DEST}/lib: contents of gg:lib goes here
    - ${DEST}/sys-include: contents of gg:include goes here [ixemul]
    - ${DEST}/sys-includestd: contents of gg:includestd goes here [libnix]
    - ${DEST}/include: contents of gg:usr/include goes here

    Now get the original sources for binutils 2.9.1 and GCC 2.95.3 (core and g++ archives are sufficient). Then get the MorphOS diffs of the binutils 2.9.1 and GCC 2.95.3 updates from march 2007. Apply the diffs with patch, use ${DEST} as value for the --prefix argument of configure, build and install the results. At that point you should have a working GCC cross-compiler for MorphOS.

    BTW, the above mentioned diffs used to be available on MDC. I think the diffs should be made available through morphos-team.net.
  • »08.10.12 - 19:17
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    jacadcaps
    Quote:

    We will however try to make it easier for people to cross-develop for MorphOS in future SDK updates.
    What kind of changes do you have in mind? AFAICT, the GCC 2.95.3 patches from MDC do support cross-compiler environments just fine. However, the MDC GCC versions of 2.95.3 lack Altivec support.

    But then I have no idea which GCC version is used/recommended these days for development of MorphOS software.
  • »08.10.12 - 19:22
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12370 from 2003/5/22
    From: Germany
    > I have no idea which GCC version is used/recommended these days for
    > development of MorphOS software.

    That should be what's contained in the official MorphOS SDK:

    https://morph.zone/news/1876.html
  • »08.10.12 - 20:35
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    munk
    Quote:

    Then get the MorphOS diffs of the binutils 2.9.1 and GCC 2.95.3 updates from march 2007.


    Where are these MorphOS diffs patches?

    [ Edited by BalrogSoft 08.10.2012 - 21:01 ]
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »08.10.12 - 20:59
    Profile Visit Website
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    ${DEST}/include: contents of gg:usr/include goes here
    Correction: place the contents of gg:os-include there. Depending on what you have in gg:usr/include, it should go to include or sys-include
  • »10.10.12 - 07:29
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    BalrogSoft,

    Quote:

    Where are these MorphOS diffs patches?
    As I already said, they used to be on MDC. Thus you should try to get them from an "official" source, eg. from morphos-team.net or maybe a MorphOS core member can provide them.

    However, after looking at the SDK 2011 compiler, I have some doubts about the usefulness of the GCC diffs. It seems the cleanups / changes / improvements were not folded back into the MorphOS repository :-(
  • »10.10.12 - 07:37
    Profile