* Re: Darwin cross-compile (i586): as fails on crtstuff.c
@ 2003-11-16 16:56 Dara Hazeghi
2003-11-17 1:50 ` Jan Fabry
0 siblings, 1 reply; 4+ messages in thread
From: Dara Hazeghi @ 2003-11-16 16:56 UTC (permalink / raw)
To: distcc; +Cc: gcc-help
Hello,
what you've described are the classic symptoms of
building a cross-compiler without having the necessary
tools installed.
You need to build and install binutils with the same
target and prefix you're building gcc with.
(--prefix=/opt/gcc-3.2.3 --target=i586-pc-linux-gnu).
You should probable add $PREFIX to $PATH too (so gcc
can find said binutils).
Once you do that though, you'll need i586 headers and
libraries to be available. See
<http://bytesex.org/cross-compiler.html> for instance.
Also note that you'll need to pass the
--with-headers=/path/to/i586/include/directory and
--with-libs=/path/to/i586/libs flags when building
(<http://gcc.gnu.org/install/configure.html> under the
section about cross-compilers, ignore the stuff about
sysroot, it's only for newer compilers).
For distcc, you can probably cheat (not use libraries,
headers). To do that, instead of doing make for gcc,
do make -k and make -k install. It'll break building
the libraries, but distcc doesn't actually need them.
You need binutils in any case.
That said, I can't imagine why you'd use an iBook on a
distcc farm. My poor tiBook takes many hours just to
compile gcc, and that's enough for me :-)
Cheers,
Dara
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Darwin cross-compile (i586): as fails on crtstuff.c
2003-11-16 16:56 Darwin cross-compile (i586): as fails on crtstuff.c Dara Hazeghi
@ 2003-11-17 1:50 ` Jan Fabry
2003-11-18 7:56 ` Dara Hazeghi
0 siblings, 1 reply; 4+ messages in thread
From: Jan Fabry @ 2003-11-17 1:50 UTC (permalink / raw)
To: Dara Hazeghi; +Cc: gcc-help
Thank you for your quick reply.
I already had binutils installed (for the correct target), and the
correct path was already included in $PATH. This directory contains
i586-pc-linux-gnu-* symlinks, I guess this is correct? (I didn't specify
this in the ./configure, they 'just appeared') The (gcc) Makefile seems
to be prepared for this.
However, the Makefile picks up the path to $AS_FOR_TARGET by doing
./gcc/xgcc -print-prog-name=as, which returns 'as'. I can understand it
does this if it would first build 'as' (because the binutils source is
unpacked in the same tree as the gcc source), but it seems this is not
the case.
I can remove these lines from the Makefile, and then $AS_FOR_TARGET gets
set to the correct file, but for the compilation, the wrong 'as' is used
again.
So, I still have a few questions:
- If I unpack the binutils source in the same tree as gcc, will it
'automagically' also be built and installed?
- If not, why does ./gcc/xgcc tell me 'as' is the assembler to use? How
can I change this?
Greetings,
Jan Fabry
PS: I'm doing this for fun, just to see if it would work. That's why
it's not a problem I only run it from an iBook, speed doesn't matter.
Dara Hazeghi wrote:
> Hello,
>
> what you've described are the classic symptoms of
> building a cross-compiler without having the necessary
> tools installed.
>
> You need to build and install binutils with the same
> target and prefix you're building gcc with.
> (--prefix=/opt/gcc-3.2.3 --target=i586-pc-linux-gnu).
> You should probable add $PREFIX to $PATH too (so gcc
> can find said binutils).
>
> Once you do that though, you'll need i586 headers and
> libraries to be available. See
> <http://bytesex.org/cross-compiler.html> for instance.
> Also note that you'll need to pass the
> --with-headers=/path/to/i586/include/directory and
> --with-libs=/path/to/i586/libs flags when building
> (<http://gcc.gnu.org/install/configure.html> under the
> section about cross-compilers, ignore the stuff about
> sysroot, it's only for newer compilers).
>
> For distcc, you can probably cheat (not use libraries,
> headers). To do that, instead of doing make for gcc,
> do make -k and make -k install. It'll break building
> the libraries, but distcc doesn't actually need them.
> You need binutils in any case.
>
> That said, I can't imagine why you'd use an iBook on a
> distcc farm. My poor tiBook takes many hours just to
> compile gcc, and that's enough for me :-)
>
> Cheers,
>
> Dara
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Darwin cross-compile (i586): as fails on crtstuff.c
2003-11-17 1:50 ` Jan Fabry
@ 2003-11-18 7:56 ` Dara Hazeghi
0 siblings, 0 replies; 4+ messages in thread
From: Dara Hazeghi @ 2003-11-18 7:56 UTC (permalink / raw)
To: Jan Fabry; +Cc: gcc-help
Hello,
>
> I already had binutils installed (for the correct
> target), and the
> correct path was already included in $PATH. This
> directory contains
> i586-pc-linux-gnu-* symlinks, I guess this is
> correct? (I didn't specify
> this in the ./configure, they 'just appeared') The
> (gcc) Makefile seems
> to be prepared for this.
So does $prefix/i586-pc-linux-gnu/bin contain
binutils? Somehow, when gcc is configured, it's
supposed to realize that the tools are in that
directory.
> So, I still have a few questions:
> - If I unpack the binutils source in the same tree
> as gcc, will it
> 'automagically' also be built and installed?
> - If not, why does ./gcc/xgcc tell me 'as' is the
> assembler to use? How
> can I change this?
Pretty much. Usually what I do is decompress binutils,
decompress gcc, create a new directory build, symlink
gcc/* to build/ and binutils/* to build/ . Then create
an objdir, configuring ../build/configure and so
forth. Hope that helps.
Dara
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
^ permalink raw reply [flat|nested] 4+ messages in thread
* Darwin cross-compile (i586): as fails on crtstuff.c
@ 2003-11-16 1:01 Jan Fabry
0 siblings, 0 replies; 4+ messages in thread
From: Jan Fabry @ 2003-11-16 1:01 UTC (permalink / raw)
To: gcc-help
Hello,
I am trying to cross-compile gcc 3.2.3 on my iBook, so it can be a part
of a distcc farm for an i586.
However, (Apple's) 'as' fails on crtstuff.c. Installing the GNU binutils
is not an option, as the assembler is not available for the Mac
platform. I have searched Google and this mailinglist for similar
messages, but couldn't find anything. I have also searched the CrossGCC
mailing list and FAQ, but that seemed more for embedded devices and
things like that.
I have already installed a (working) native gcc 3.2.3, and am using that
one instead of the one Apple provides (because of precompiler errors).
gcc -v:
Reading specs from
/opt/gcc-3.2.3/lib/gcc-lib/powerpc-apple-darwin6.8/3.2.3/specs
Configured with: ../src/gcc-3.2.3/configure --prefix=/opt/gcc-3.2.3
Thread model: single
gcc version 3.2.3
as -v:
Apple Computer, Inc. version cctools-446.1.obj~1, GNU assembler version 1.38
cat config.status:
#!/bin/sh
# This file was generated automatically by configure. Do not edit.
# This directory was configured as follows:
../src/gcc-3.2.3/configure
--with-gcc-version-trigger=/Users/distcc/src/gcc-3.2.3/gcc/version.c
--host=powerpc-apple-darwin6.8 --target=i586-pc-linux-gnu --norecursion
# using "mt-frag"
I used 'make', not 'make bootstrap', since I was cross-compiling, and I
already had a native GCC (I think this was the correct way to do,
otherwise I misunderstood the documentation).
This is the output of the last command of 'make':
/Users/distcc/gcc-obj/gcc/xgcc -B/Users/distcc/gcc-obj/gcc/
-B/usr/local/i586-pc-linux-gnu/bin/ -B/usr/local/i586-pc-linux-gnu/lib/
-isystem /usr/local/i586-pc-linux-gnu/include -O2 -DIN_GCC
-DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include -I. -I.
-I../../src/gcc-3.2.3/gcc -I../../src/gcc-3.2.3/gcc/.
-I../../src/gcc-3.2.3/gcc/config -I../../src/gcc-3.2.3/gcc/../include
-g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-omit-frame-pointer \
-Dinhibit_libc -c ../../src/gcc-3.2.3/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'Q' flag!
/usr/libexec/gcc/darwin/ppc/as: I don't understand 'y' flag!
crtstuff.c:2:unknown section type: @progbits
crtstuff.c:2:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:3:Unknown pseudo-op: .type
crtstuff.c:3:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:3:Invalid mnemonic 'object'
crtstuff.c:6:unknown section type: @progbits
crtstuff.c:6:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:7:Unknown pseudo-op: .type
crtstuff.c:7:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:7:Invalid mnemonic 'object'
crtstuff.c:10:unknown section type: @progbits
crtstuff.c:10:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:11:Unknown pseudo-op: .type
crtstuff.c:11:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:11:Invalid mnemonic 'object'
crtstuff.c:13:unknown section type: @progbits
crtstuff.c:13:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:14:Unknown pseudo-op: .type
crtstuff.c:14:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:14:Invalid mnemonic 'object'
crtstuff.c:17:Unknown pseudo-op: .hidden
crtstuff.c:17:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:22:Unknown pseudo-op: .type
crtstuff.c:22:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:22:Invalid mnemonic 'object'
crtstuff.c:26:Unknown pseudo-op: .type
crtstuff.c:26:Rest of line ignored. 1st junk character valued 112 (p).
crtstuff.c:26:Invalid mnemonic 'object'
crtstuff.c:29:Unknown pseudo-op: .local
crtstuff.c:29:Rest of line ignored. 1st junk character valued 99 (c).
crtstuff.c:30:Rest of line ignored. 1st junk character valued 44 (,).
crtstuff.c:32:Unknown pseudo-op: .p2align
crtstuff.c:32:Rest of line ignored. 1st junk character valued 52 (4).
crtstuff.c:33:Unknown pseudo-op: .type
crtstuff.c:33:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:33:Invalid mnemonic 'function'
crtstuff.c:35:Invalid mnemonic 'pushl'
crtstuff.c:36:Invalid mnemonic 'movl'
crtstuff.c:37:Invalid mnemonic 'pushl'
crtstuff.c:38:Invalid mnemonic 'pushl'
crtstuff.c:39:Invalid mnemonic 'cmpb'
crtstuff.c:40:Invalid mnemonic 'jne'
crtstuff.c:41:Invalid mnemonic 'movl'
crtstuff.c:42:Invalid mnemonic 'movl'
crtstuff.c:43:Invalid mnemonic 'testl'
crtstuff.c:44:Invalid mnemonic 'je'
crtstuff.c:45:Unknown pseudo-op: .p2align
crtstuff.c:45:Rest of line ignored. 1st junk character valued 52 (4).
crtstuff.c:47:Invalid mnemonic 'addl'
crtstuff.c:48:Invalid mnemonic 'movl'
crtstuff.c:49:Invalid mnemonic 'call'
crtstuff.c:50:Invalid mnemonic 'movl'
crtstuff.c:51:Invalid mnemonic 'movl'
crtstuff.c:52:Invalid mnemonic 'testl'
crtstuff.c:53:Invalid mnemonic 'jne'
crtstuff.c:55:Invalid mnemonic 'movl'
crtstuff.c:56:Invalid mnemonic 'testl'
crtstuff.c:57:Invalid mnemonic 'je'
crtstuff.c:58:Invalid mnemonic 'subl'
crtstuff.c:59:Invalid mnemonic 'pushl'
crtstuff.c:60:Invalid mnemonic 'call'
crtstuff.c:61:Invalid mnemonic 'addl'
crtstuff.c:63:Invalid mnemonic 'movb'
crtstuff.c:65:Invalid mnemonic 'leave'
crtstuff.c:66:Invalid mnemonic 'ret'
crtstuff.c:68:Expected comma after segment-name
crtstuff.c:68:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:71:Unknown pseudo-op: .local
crtstuff.c:71:Rest of line ignored. 1st junk character valued 111 (o).
crtstuff.c:72:Rest of line ignored. 1st junk character valued 44 (,).
crtstuff.c:73:Unknown pseudo-op: .p2align
crtstuff.c:73:Rest of line ignored. 1st junk character valued 52 (4).
crtstuff.c:74:Unknown pseudo-op: .type
crtstuff.c:74:Rest of line ignored. 1st junk character valued 102 (f).
crtstuff.c:74:Invalid mnemonic 'function'
crtstuff.c:76:Invalid mnemonic 'pushl'
crtstuff.c:77:Invalid mnemonic 'movl'
crtstuff.c:78:Invalid mnemonic 'movl'
crtstuff.c:80:Invalid mnemonic 'call'
crtstuff.c:82:Invalid mnemonic 'popl'
crtstuff.c:83:Invalid mnemonic 'addl'
crtstuff.c:85:Invalid mnemonic 'pushl'
crtstuff.c:86:Invalid mnemonic 'pushl'
crtstuff.c:87:Invalid mnemonic 'testl'
crtstuff.c:88:Invalid mnemonic 'je'
crtstuff.c:89:Invalid mnemonic 'pushl'
crtstuff.c:90:Invalid mnemonic 'pushl'
crtstuff.c:91:Invalid mnemonic 'pushl'
crtstuff.c:92:Invalid mnemonic 'pushl'
crtstuff.c:93:Invalid mnemonic 'call'
crtstuff.c:94:Invalid mnemonic 'addl'
crtstuff.c:96:Invalid mnemonic 'movl'
crtstuff.c:97:Invalid mnemonic 'testl'
crtstuff.c:98:Invalid mnemonic 'je'
crtstuff.c:99:Invalid mnemonic 'movl'
crtstuff.c:100:Invalid mnemonic 'testl'
crtstuff.c:101:Invalid mnemonic 'je'
crtstuff.c:102:Invalid mnemonic 'subl'
crtstuff.c:103:Invalid mnemonic 'pushl'
crtstuff.c:104:Invalid mnemonic 'call'
crtstuff.c:105:Invalid mnemonic 'addl'
crtstuff.c:107:Invalid mnemonic 'movl'
crtstuff.c:108:Invalid mnemonic 'popl'
crtstuff.c:109:Invalid mnemonic 'ret'
crtstuff.c:111:Expected comma after segment-name
crtstuff.c:111:Rest of line ignored. 1st junk character valued 32 ( ).
crtstuff.c:113:Unknown pseudo-op: .weak
crtstuff.c:113:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:114:Unknown pseudo-op: .weak
crtstuff.c:114:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:115:Unknown pseudo-op: .weak
crtstuff.c:115:Rest of line ignored. 1st junk character valued 95 (_).
crtstuff.c:116:Unknown pseudo-op: .ident
crtstuff.c:116:Rest of line ignored. 1st junk character valued 34 (").
make[1]: *** [crtbegin.o] Error 1
make: *** [all-gcc] Error 2
If you need more output, please reply to me, or take a look at [
http://www.scoco.be/distcc ], where I have placed the full output from
'configure' and 'make'.
If someone could point me to more information to help me get past this
problem, I would be extremely thankful!
Greetings,
Jan Fabry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-18 7:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-16 16:56 Darwin cross-compile (i586): as fails on crtstuff.c Dara Hazeghi
2003-11-17 1:50 ` Jan Fabry
2003-11-18 7:56 ` Dara Hazeghi
-- strict thread matches above, loose matches on Subject: below --
2003-11-16 1:01 Jan Fabry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).