ppc-morphos-gcc cross compiler for OSX
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1007 from 2013/5/24
    From: Englistan
    I'm currently trying to build the cross compiler suite on OSX 10.9 but it fails when try to build binutils. :/


    I'm using gcc-4.9 not clang and i've modified Bigfoot's setup-cross-sdk.sh to use gnu-tar and a remove a couple other linux-isms that made the script fall over.

    It now gets as far as trying to build binutils but fails at this point

    Code:
    creating Makefile
    if [ -n "" ] && [ ! -d pic ]; then
    mkdir pic;
    else true; fi
    touch stamp-picdir
    echo "# !Automatically generated from ../../libiberty/functions.def"
    "- DO NOT EDIT!" >needed2.awk
    grep '^DEFVAR(' < ../../libiberty/functions.def
    | sed -e '/DEFVAR/s|DEFVAR.([^,]*).*|/1/ { printf "#ifndef NEED_1\n#define NEED_1\n#endif\n" }|'
    >>needed2.awk
    grep '^DEFFUNC(' < ../../libiberty/functions.def
    | sed -e '/DEFFUNC/s|DEFFUNC.([^,]*).*|/1/ { printf "#ifndef NEED_1\n#define NEED_1\n#endif\n" }|'
    >>needed2.awk
    gcc -c -m32 -O3 -I. -I../../libiberty/../include -I../../libiberty ../../libiberty/dummy.c 2>/dev/null
    make[1]: *** [dummy.o] Error 1
    make: *** [all-libiberty] Error 2


    Any ideas? I'm tired and annoyed so i'm off to have a smoke now.
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »28.09.14 - 15:56
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 1649 from 2003/3/5
    From: Canada
    Quote:

    Intuition wrote:
    I'm using gcc-4.9 not clang and i've modified Bigfoot's setup-cross-sdk.sh to use gnu-tar and a remove a couple other linux-isms that made the script fall over.



    That's where you should restart. I am pretty sure the binutils will only build with gcc 2.95.
  • »28.09.14 - 18:59
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1007 from 2013/5/24
    From: Englistan
    Quote:

    jacadcaps wrote:
    Quote:

    Intuition wrote:
    I'm using gcc-4.9 not clang and i've modified Bigfoot's setup-cross-sdk.sh to use gnu-tar and a remove a couple other linux-isms that made the script fall over.



    That's where you should restart. I am pretty sure the binutils will only build with gcc 2.95.


    Thanks Jaca, will give it a try later.
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »28.09.14 - 20:36
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Intuition
    Posts: 1007 from 2013/5/24
    From: Englistan
    Building gcc 2.95.3 for OSX is even more sanity destroying. :/

    I'm surprised no one seems to have built an OSX hosted cross compiler before.

    Zerohero's site is down but i think he only had Linux hosted cross compilers anyway.
    1.67GHz 15" PowerBook G4, 1GB RAM, 128MB Radeon 9700M Pro, 64GB SSD, MorphOS 3.9

    2.7GHz DP G5, 4GB RAM, 512MB Radeon X1950 Pro, OSX 10.5.8, 500GB SSHD, MorphOS 3.9
  • »29.09.14 - 09:43
    Profile
  • Just looking around
    AmiS
    Posts: 6 from 2003/6/27
    From: Russia. Moscow
    I made it. I build current 4.4.5 gcc from morphos SDK under OSX.
    also i build flexcat utility

    enjoy

    http://amis.su/files/cross-gcc-4.4.5-ppc-morphos-osx.tar.gz
  • »27.04.15 - 09:23
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 541 from 2007/8/6
    From: Pending...
    I know this is a little off-topic but, as gcc has matured, have the advances been x86 specific or are they also seen on other architectures?
    PPC assembly ain't so bad... ;)
  • »04.05.15 - 01:27
    Profile Visit Website
  • Just looking around
    AmiS
    Posts: 6 from 2003/6/27
    From: Russia. Moscow
    I have osx10.10 on x86 macs here. I build GCC Using clang. This build for x86 macs only.
  • »04.05.15 - 07:47
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 9837 from 2003/5/22
    From: Germany
    > as gcc has matured, have the advances been x86 specific or are they also seen
    > on other architectures?

    You can read up on the changes between version 4.4.5 as available for MorphOS and the most recent version:

    http://gcc.gnu.org/gcc-4.5/changes.html
    http://gcc.gnu.org/gcc-4.6/changes.html
    http://gcc.gnu.org/gcc-4.7/changes.html
    http://gcc.gnu.org/gcc-4.8/changes.html
    http://gcc.gnu.org/gcc-4.9/changes.html
    http://gcc.gnu.org/gcc-5/changes.html

    There, the changes are classified into language-specific, ISA-specific and OS-specific ones.
  • »04.05.15 - 12:44
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    Intuition wrote:
    Code:
    echo "# !Automatically generated from ../../libiberty/functions.def"

    Any ideas?

    Modifiying functions.def is only necessary for GCC 2.95.x.

    Quote:


    Building gcc 2.95.3 for OSX is even more sanity destroying. :/

    The problem is not the host system, but the GCC version. 2.95.x does not like building on a 64-bit host system. Especially the ppc backend has its problems. Apparently even Apple did not build 2.95.x as a 64-bit executable. However, building as a 32-bit target using -m32 in $(CC) could work.
  • »04.05.15 - 20:15
    Profile
  • Leo
  • Order of the Butterfly
    Order of the Butterfly
    Leo
    Posts: 412 from 2003/8/18
    Quote:

    AmiS wrote:
    I made it. I build current 4.4.5 gcc from morphos SDK under OSX.
    also i build flexcat utility

    enjoy

    http://amis.su/files/cross-gcc-4.4.5-ppc-morphos-osx.tar.gz


    Just found out your archive: thanks! I couldn't build it myself.

    After scratching my head trying and failing to create the cross-gcc on macOS and Linux, maybe it would be a good idea to officially release cross-dev tools ready to be used?


    [ Edited by Leo 11.06.2018 - 23:56 ]
    Nothing hurts a project more than developers not taking the time to let their community know what is going on.
  • »11.06.18 - 23:37
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 1649 from 2003/3/5
    From: Canada
    Quote:

    Leo wrote:
    maybe it would be a good idea to officially release cross-dev tools ready to be used?



    Yes. Totally!
  • »14.06.18 - 12:38
    Profile Visit Website