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: cross compiling gcc


"Max S." <king@greatfreeworld.org> writes:

> So... I've been for several days now, attempting to build a cross
> compiler for an sh4-linux arch from a laptop with
> x86_64-unknown-linux-gnu.
> Not a Canadian cross or anything that special. just a version of gcc
> that runs on my laptop and produces executables for my
> hico7760(sh4-linux).

I strongly suggest looking at the scripts at http://crosstool.org/ .
Cross-compiling to GNU/Linux systems is painfully hard.

> Just to make sure I've understood it right heres what I understand about
> building a cross compiler.
> step 1) build the binutils
> step 2) get linux headers
> step 3) build a mini version of gcc
> step 4) build the standard libs
> step 5) use them to rebuild a full version of gcc

Yes.

> So the reaon this test fails is not necessarily because forced unwind
> support is missing, but because crt1.o is...

Interesting problem.  crt1.o actually comes from glibc, so it's no
surprise that gcc can't find it when configuring glibc for the first
time.

I don't know how to fix this except to reach into the glibc
configuration mechanism and tell it to not run this test.  You may be
able to do that by setting the libc_cv_forced_unwind in config.cache.

> It can't honestly be that hard to build a cross compiler.

Yes, I'm afraid it can.

Ian


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