Gentoo Archives: gentoo-user

From: Kraus Philipp <philipp.kraus@×××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] distcc cross-compiling for OSX
Date: Sat, 29 Sep 2012 20:01:18
Message-Id: E7981D08-AAC6-4141-9D22-61AED675FF5F@flashpixx.de
In Reply to: Re: [gentoo-user] distcc cross-compiling for OSX by Andrea Conti
1 Am 27.09.2012 um 23:34 schrieb Andrea Conti:
2
3 >> Thanks for this link, I have read it before I write the post. Did I understand thr problem correct:
4 >> I need a full OSX compatible toolchain !? So I download all Apple developer tools, compile
5 >> it under my Gentoo box and add all header files which I used under OSX to my Linux box?
6 >
7 > According to those instructions, for distcc use you only need cctools
8 > and a compiler. You don't need any headers as the code distcc sends to
9 > servers is preprocessed on the client.
10 >
11 > You won't be able to cross-compile directly on the linux box (you're
12 > missing headers, libraries and frameworks), but that should not be a
13 > problem.
14 >
15 > The OpenDarwin project died a long time ago, so odcctools is no more.
16 > The source packages for cctools and apple's blend of gcc can be
17 > downloaded from opensource.apple.com. I have no idea whether they
18 > support building on Linux or not (especially cctools)...
19
20 This seems to be working, I download for my OSX the correct gcc, run on my
21 Mac gcc -v and get the target, that I copy the /Developer/SDKs directory, that I would
22 use, to the Linux box and run this commands
23
24 mkdir darwin
25 cd darwin
26 ../gcc_42-5577/configure --prefix=/opt/osxtoolchain/snowleopard/ --enable-languages=c,c++ --target=i686-apple-darwin10 --with-sysroot=/opt/osxtoolchain/snowleopard/MacOSX10.6.sdk/
27 make
28
29 configure runs, but the make creates an error:
30
31 # APPLE LOCAL use -mlongcall for large text support
32 /root/darwin/./gcc/xgcc -B/root/darwin/./gcc/ -B/opt/osxtoolchain/snowleopard//i686-apple-darwin10/bin/ -B/opt/osxtoolchain/snowleopard//i686-apple-darwin10/lib/ -isystem /opt/osxtoolchain/snowleopard//i686-apple-darwin10/include -isystem /opt/osxtoolchain/snowleopard//i686-apple-darwin10/sys-include -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc_42-5577/gcc -I../../gcc_42-5577/gcc/. -I../../gcc_42-5577/gcc/../include -I../../gcc_42-5577/gcc/../libcpp/include -I../../gcc_42-5577/gcc/../libdecnumber -I../libdecnumber -mlongcall \
33 -fno-tree-dominator-opts \
34 \
35 -c ../../gcc_42-5577/gcc/config/darwin-crt3.c -o crt3.o
36 rch: invalid option -- 'f'
37 rch: invalid option -- 'o'
38 rch: invalid option -- 'r'
39 rch: invalid option -- 'c'
40 rch: invalid option -- 'e'
41 rch: invalid option -- '_'
42 rch: invalid option -- 'c'
43 rch: invalid option -- 'p'
44 rch: invalid option -- 'u'
45 rch: invalid option -- 's'
46 rch: invalid option -- 'u'
47 rch: invalid option -- 'b'
48 rch: invalid option -- 't'
49 rch: invalid option -- 'y'
50 rch: invalid option -- 'p'
51 rch: invalid option -- 'e'
52 rch: invalid option -- '_'
53 rch: invalid option -- 'A'
54 rch: invalid option -- 'o'
55 rch: rch: Unrecognized architecture
56 make[4]: *** [crt3.o] Error 1
57 make[4]: Leaving directory `/root/darwin/gcc'
58 make[3]: *** [extra] Error 2
59 make[3]: Leaving directory `/root/darwin/gcc'
60 make[2]: *** [stmp-multilib] Error 2
61 make[2]: Leaving directory `/root/darwin/gcc'
62 make[1]: *** [all-gcc] Error 2
63 make[1]: Leaving directory `/root/darwin'
64 make: *** [all] Error 2
65
66 Do you have any idea to solve the problem?
67
68 Phil