Re: Strange build error on PPC OS X 10.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xorquewasp@xxxxxxxxxxxxxx wrote:

I'm encountering a very strange error trying to build GCC 4.2.3 as
a cross compiler on OS X 10.4 PPC:

make GCC_FOR_TARGET="/dev-share/src/build-gcc/./gcc/xgcc
> -B/dev-share/src/build-gcc/./gcc/
> -B/usr/local/gcc-4.2.3-x-i386/i386-apple-darwin/bin/
> -B/usr/local/gcc-4.2.3-x-i386/i386-apple-darwin/lib/
> -isystem /usr/local/gcc-4.2.3-x-i386/i386-apple-darwin/include
> -isystem /usr/local/gcc-4.2.3-x-i386/i386-apple-darwin/sys-include" \

The 4 last options are trying to point to the target binutils,
including 'as' and 'ld' in 'bin', and to the target C library,
in 'lib' and '*include'...

/dev-share/src/build-gcc/./gcc/as: line 2: exec: i386: not found

In '/usr/local/gcc-4.2.3-x-i386/i386-apple-darwin/bin' you should
have the bare name 'as' and 'ld' plus some other binutils for the
Darwin/i386 target. And in '/usr/local/gcc-4.2.3-x-i386/bin' you
should have those 'i386-apple-darwin-as' and 'i386-apple-darwin-ld'
and other binutils for the human users, including configure scripts.

I'm not sure if I'm supposed to do something before the build of
gcc on OS X, but I'm pretty certain that $objdir/gcc/as isn't supposed
to look like this:

$ cat gcc/as #!/bin/sh
exec  "$@"

The other temporary 'binutils' look the same:

$ cat gcc/nm #!/bin/sh
exec  "$@"

What could be causing these files to be incorrectly generated?

The obvious reason is that you haven't the target binutils... Where
are they?  Just as well you should have the Darwin/i386 C libraries
preinstalled before starting to configure and build GCC !

In a native GCC build these target things are already there, in
'/usr/bin', '/usr/lib' and '/usr/include', but in a cross GCC
build the $tooldir should have those 'bin', 'lib' and '*include'
directories filled with the target stuff before the build... Or
they should be in the '$sysroot/usr' if one prefers the
'--with-sysroot=$sysroot'. But in Darwin case the Apple's 'ld'
probably cannot understand this search scheme...

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux