gcode-mirror / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
1 stars 0 forks source link

native 64bit toolchain on linux #212

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

after two weeks I've finally managed to fix odcctools and a corresponding gcc 
to compile successfully on 64bit linux.

I've created ubuntu packages on my launchpad ppa at

https://launchpad.net/~flosoft/+archive/ppa

There were 2 "big" bugs in the odcctools which caused the trouble with native 
64bit:

1. in include/foreign/machine/vm_types.h: the vm_address_t was forced to 32bit, 
but its used for storing memory addressing (->> CRASH)
2. in libmacho/arch.c: in the NXGetArchInfoFromCpuType you returned a non 
static pointer on a static table - the driverdriver tried to change the table 
(->> CRASH)

now it fully works on 64bit linux without need of "-m32" in the CFLAGS/LDFLAGS

Original issue reported on code.google.com by florian...@googlemail.com on 7 Apr 2011 at 2:25

GoogleCodeExporter commented 9 years ago
the ppa-link changed: (created a apple-specific ppa)
https://launchpad.net/~flosoft/+archive/cross-apple

Original comment by florian...@googlemail.com on 16 Jun 2011 at 9:33

GoogleCodeExporter commented 9 years ago
Hi florian, your repo is over ;(
I get a 404 error when i update my package list on ubuntu !

Original comment by as...@me.com on 17 Jun 2011 at 9:11

GoogleCodeExporter commented 9 years ago
Hi, you have to set "maverick" as distribution. if you're using an older 
ubuntu/debian, you should download the source packages and rebuild it for your 
system - with newer ubuntu/debian, its not a problem

I ran into that problem too if I was using "add-apt-repository 
ppa:flosoft/cross-apple"

Original comment by florian...@googlemail.com on 17 Jun 2011 at 9:15

GoogleCodeExporter commented 9 years ago
How i use your repositery ? Which package i install and what's next ?

Original comment by as...@me.com on 17 Jun 2011 at 9:31

GoogleCodeExporter commented 9 years ago
I've been update my source.list ;)

Original comment by as...@me.com on 17 Jun 2011 at 9:32

GoogleCodeExporter commented 9 years ago
you can install these packages:

ii  apple-arm-odcctools                   758.159-0flosoft11                    
            Apple Darwin crosscompiler arm "binutils".
ii  apple-ppc-gcc                         4.2.1~5646.1flosoft2                  
            Apple ppc/ppc64 crosscompiler
ii  apple-ppc-odcctools                   758.159-0flosoft10                    
            Apple Darwin crosscompiler powerpc "binutils".
ii  apple-uni-framework-sdl               1.2.14-0flosoft3                      
            MacOSX SDL-framework for apple cross compiler
ii  apple-uni-framework-sdlmixer          1.2.11-0flosoft3                      
            MacOSX SDL_mixer-framework for apple cross compiler
ii  apple-uni-libminiupnpc                1.5-0flosoft5                         
            MacOSX libminiupnpc for apple cross compiler
ii  apple-uni-sdk-10.4u                   20110407-0.flosoft1                   
            MacOSX 10.4u SDK for apple cross compiler
ii  apple-uni-sdk-10.5                    20110407-0.flosoft1                   
            MacOSX 10.5 SDK for apple cross compiler
ii  apple-uni-sdk-10.6                    20110407-0.flosoft1                   
            MacOSX 10.6 SDK for apple cross compiler
ii  apple-x86-gcc                         4.2.1~5646.1flosoft2                  
            Apple i686/x86_64 crosscompiler
ii  apple-x86-odcctools                   758.159-0flosoft10                    
            Apple Darwin crosscompiler i686/x86_64 "binutils".
ii  ccache-lipo                           1.0-0flosoft3                         
            ccache extension for apple multi-arch file compilers.

now you have i686-apple-darwin10-* for 32/64bit apple binaries and 
powerpc-apple-darwin10-* for powerpc/powerpc64 binaries.

So you can compile i.e a "HelloWorld.c" with

i686-apple-darwin10-gcc -arch i386 -arch x86_64 -arch powerpc HelloWorld.c -o 
HelloWorld 

to an universal binary (the gcc will call the powerpc-variant as needed)

Original comment by florian...@googlemail.com on 17 Jun 2011 at 9:36

GoogleCodeExporter commented 9 years ago
the arm gcc (for iphone) is not yet finished

Original comment by florian...@googlemail.com on 17 Jun 2011 at 9:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
And i get same erros when compiling odcctools !

Original comment by as...@me.com on 17 Jun 2011 at 10:18

GoogleCodeExporter commented 9 years ago
how did you compile and which errors do you get? (perhaps you should open a new 
issue?)

Original comment by florian...@googlemail.com on 17 Jun 2011 at 10:20