This is the mail archive of the gcc@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: Question regarding compiling a toolchain for a Broadcom SB1


I don't have a mips64 version of glibc, I'm having to
build the entire toolchain from the ground up. (Yuck.)
I'm trying to build the entire toolchain as 64-bit
native, which is adding to my problems.

(Crosstool, for example, only supports 32-bit MIPS -
and even then the build matrix is a pretty shade of
red for the most part.)

I tried building GCC 4.0.1, glibc 2.3.5 and binutils
2.16.1 as per the Linux-MIPS guide. GCC built to the
bootstrap version, which I then installed. The
compiler could not then be used to compile anything,
though - crt1.o and crti.o were missing in action.

I repeated the procedure using the versions of GCC,
glibc and binutils in CVS. I get the same error.
Again, if someone has these files for a recent
toolchain for the SB1-Linux-Gnu target, I'd truly
appreciate a copy as that may be sufficient to make
some real progress.

Now, although I do not have 64-bit tools for MIPS, I
do have 32-bit tools. So, as a backup plan I tried to
build a cross-compiling 64-bit toolchain for the MIPS
box - my plan being to then compile a "native" 64-bit
toolchain with the cross-compiler, so I could then
kick the 32-bit tools off the system entirely.

Binutils is protesting this plan, complaining that
some of the object files are in the wrong format.
(I'll post actual error messages when I go into work
in about 6 hours.)

The bad news is that this might be a valid complaint.
One of the reasons I want to eliminate the old
toolchain completely is that a number of programs
(such as OpenMPI) have complained that the assembler
is producing buggy code. I'm hoping it is good enough
to compile a replacement, but it might not be.

If it isn't, then I will definitely need the
cross-compiler hosted on the Intel Linux box -OR-
known good MIPS64 binaries.

Now we get to the other problem. Binaries. Broadcom's
binaries are 32-bit and compiled against a Red Hat 7.2
distribution. The distribution might not matter - it
depends on what is assumed from that environment and
what external libraries were used. The 32-bits part is
a bigger problem, unless I can use it to generate a
proper 64-bit toolchain. It looks like it is also only
a bootstrap compiler, as they say on their SiByte
webpage that it won't compile Linux applications and
is only good for firmware development.

There's also a Debian MIPS distribution. Also 32-bit.
Probably a little more complete than a firmware
compiler and definitely one of the better options.

MIPS.com has a toolchain. For Red Hat 7.1 and glibc
2.2.3. It would take a few rounds to bring it up to
date. The fact that neither they nor Broadcom have
anything more recent disturbs me a bit as the thought
that springs to my mind (given the headaches I've had
so far) is that maybe they haven't been able to.

After giving the crosstools another go, and seeing if
I can get the Debian packages installed, I'm going to
see if OpenEmbedded offers any possibilities. Gentoo
would be nicer, as that doesn't need a pre-existing
system, but Gentoo don't do MIPS64 distributions.

Jonathan Day

--- Richard Sandiford <richard@codesourcery.com>
wrote:

> Further to Eric's good advice:
> 
> Do you already have access to a mips64 version of
> glibc?  (You said in
> your message that you'd tried a native build, but I
> wasn't sure whether
> that was using a 32-bit OS or a 64-bit OS)
> 
> It's tricky to build a toolchain and glibc in tandem
> (i.e. when neither
> is available beforehand), and like Eric says,
> crosstool is probably the
> best thing to use for that.  (Although to be honest,
> I don't use crosstool
> myself, so I'm not 100% sure whether it supports
> mips64 or not.)
> 
> On the other hand, if you already have access to a
> 64-bit glibc, you
> should be able to build the toolchain in the same
> way as any other
> version of gcc.  So if you do have access to a
> 64-bit glibc: which
> version(s) of gcc are you trying to build, and what
> errors do you get?
> 
> Richard
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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