compiling with MorphOS PU
  • Caterpillar
    Caterpillar
    Slayer
    Posts: 37 from 2003/9/28
    I've read quite a bit about it but nothing is exactly specific to this one point...

    do I use the same command lines in my makefiles/gcc command line...

    that one would use to compile under MorphOS for the Peg2 for instance?

    I'm speaking about the exact cpu parameters I should be executing... I mean, I know it wouldn't be something like -cpu=750 for example...

    should it be something like... -elf32 -morphos...

    what are the defaults of the MOS hosted MOS targetted gcc environment?

    anyway, sorry about the gibberish, I'm sure you who knows knows what I mean ;)

    I just want to know what I should be putting to generate code that'll work correctly or more specifically with MOSPU for MOSPU...

    my specs are a 233mhz/060 if it has any bearing on anything... perhaps I could use a -cpu=233 command...

    btw, the commands are probably not correct but that is because I am tired and haven't remembered the syntax since I lost interest since I couldn't register...

    things change... thanks for your interest and help :D
  • »17.08.06 - 07:31
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    do I use the same command lines in my makefiles/gcc command line...

    that one would use to compile under MorphOS for the Peg2 for instance?

    Yes.

    Quote:

    should it be something like... -elf32 -morphos...

    Neither of those two exist ;)

    Quote:

    what are the defaults of the MOS hosted MOS targetted gcc environment?

    The default is to create PPC code with System V ABI and output ELF files

    Quote:

    my specs are a 233mhz/060 if it has any bearing on anything... perhaps I could use a -cpu=233 command...

    The -mcpu option doesn't really matter much in my experience, better avoid using it. It'd be -mcpu=604e if you really wanted to.

    Anyway, to compile a file with optimisations for Ixemul, you'd use gcc -O2 -Wall myprogram.c -o myprogram. If you want to use Libnix instead (and you probably do), then add -noixemul to that line.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »17.08.06 - 07:57
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:


    do I use the same command lines in my makefiles/gcc command line...

    that one would use to compile under MorphOS for the Peg2 for instance?



    Yes you do.

    Quote:


    I'm speaking about the exact cpu parameters I should be executing... I mean, I know it wouldn't be something like -cpu=750 for example...

    should it be something like... -elf32 -morphos...



    Nothing needed. Just remember to use -noixemul switch when compiling your stuff:

    gcc -noixemul -O3 foobar.c -o foobar

    I used -mcpu=604 when I was compiling on my PowerUp system and now -mcpu=750 switch on Pegasos but they probably dont make much difference. Both code work on MOSPU and generated code is almost the same.

    gg:guide/gcc.guide is interesting reading btw.

    @bigfoot

    Poeh.

    (Seems this forum is broken... I lost my umlauts.)

    [ Edited by itix on 2006/8/17 10:02 ]
    [ Edited by itix on 2006/8/17 10:02 ]

    [ Edited by itix on 2006/8/17 10:03 ]
    1 + 1 = 3 with very large values of 1
  • »17.08.06 - 08:00
    Profile
  • Caterpillar
    Caterpillar
    Slayer
    Posts: 37 from 2003/9/28
    thanks very much!

    btw... can we use amiga gdb 4.16 on MorphOS? I know it can't perform core dumps but it has its uses and there doesn't appear to be MOS port...
  • »17.08.06 - 08:13
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Chain-Q
    Posts: 347 from 2003/10/12
    From: 1 AU, EU, DE/HU
    Quote:

    can we use amiga gdb 4.16 on MorphOS?

    Only for 68k software, i think, but i don't think it will work at all (because it uses exceptions, which is not emulated/taken over by MorphOS, i guess).

    And yes, unfortunately there's no finished/working/released (choose one) version of GDB for MorphOS yet(?).

    Indstead, try to use builtin debug facilities on MorphOS. It's not that confortable as GDB, but useable. For a detailed description read this.
    [.PegasosII/G4.:.Efika.:.Amiga2000/060.]
    [.Free Pascal Compiler MorphOS Port.]
    [.Hosting AmigaSpirit.hu.]
  • »17.08.06 - 08:44
    Profile Visit Website
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    bigfoot wrote:
    It'd be -mcpu=604e if you really wanted to.


    That is the default if no -mcpu= was given :) FWIW, for PowerUp I would recommend -mcpu=603e.
  • »08.09.06 - 12:52
    Profile