This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building cross compiler in OS X?


Geoff Oltmans wrote:

configure for binutils complains that it can't find gmp.h.

Weird, I produced the Linux binutils-2.19.51.0.3 sources for m68k-elf target and recorded the configure and build messages. It never checked any 'gmp'...

I haven't built this yet.

Earlier you told that you have both mpfr and gmp :


>> I'm building gcc-4.3.3, using mpfr-2.4.1 and gmp-4.1.4.

Maybe you only had added their sources into the GCC sources?

But my try told that the binutils build doesn't need them
for anything. The GCC build would require them for the $host.

Does this also need to be built as a cross-platform library?

Not in this case.


>>> I went back and did that with the following:
/configure --target=m68k-elf --program-prefix=cf-

This doesn't tell where you did the configure :( Hopefully not in the main source directory but in a separate empty directory. For instance in an added 'build' subdirectory in the main source directory, then your command would start with '../configure .....'

Some people claim that the $BUILD directory should be totally
outside the sources but if one has 10+ binutils sources and 10+
GCC sources "under work", it would require 10+ separate extra
directories for the binutils builds and 10+ separate extra
"outside" directories for the GCC builds :(  For instance while
I recently had gcc-4.1.2 being built for one target and gcc-4.2.4
for another, I started binutils-2.17.50 build for a third target.
So having the separate build directory inside every sources is
much more 'compact'...

In any case configuring and building in the main source directory
via './configure' is strictly forbidden nowadays !

BUT !  The README in the main binutils source directory SUGGESTS
using './configure'.  This is really weird !

however now I get the following build error with binutils
checking whether the C compiler (gcc -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

This should be investigated, either something has changed or you really don't use 'gcc' but something else when you compile something! What it checks is the (native host) GCC which should produce the new binutils from their sources.

>> Should this 'gcc' be your normal 'CC' ?  If so then it seems like
>> you couldn't compile and link anything with your system compiler...

So your earlier :

>>>> This is while compiling under: i686-apple-darwin9-gcc-4.0.1

must mean something... For instance that this isn't what will be
invoked via 'gcc'.

Maybe you should first set 'CC' being 'i686-apple-darwin9-gcc-4.0.1'
in the environment before starting to configure, like :

CC=i686-apple-darwin9-gcc-4.0.1 \
../configure --target=m68k-elf --program-prefix=cf-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]