This is the mail archive of the
mailing list for the GCC project.
Re: x32_64 cross compiler
On Nov 10, 2007 3:57 PM, Diego . <email@example.com> wrote:
> On Nov 10, 2007 5:49 PM, NightStrike <firstname.lastname@example.org> wrote:
> > On Nov 10, 2007 7:35 AM, Diego . <email@example.com> wrote:
> > > Hello!!
> > >
> > > I'm triying to build a cross compiler for x32_64. I want to be able to
> > > build 64bits files from my 32bits linux machine.
> > >
> > > The problem i got now is some error, i tried some differents flags on
> > > configure. One of them is: --target=x86_64-pc-linux-gnu , is it well?
> > > or the parameter should be another combination of the triplets?
> > >
> > > Thanks,
> > > Diego.
> > To build a cross compiler, you need a complete toolchain that targets
> > the environment that interests you. In your case, you need to build
> > binutils with --target=x86_64-pc-linux, then a basic gcc (do make
> > all-gcc and make install-gcc), then a complete glibc using the basic
> > gcc you just build (when building the libc, target becomes host, host
> > becomes build, and build goes away). Make and install that after
> > placing the basic gcc first in your PATH. Then go back to the basic
> > gcc and do a full make / install.
> > That's the quick and dirty outline method.
> Thanks nightStrike for te quick reply
> There's a clean method to build it? or better, any web thar explains that?
> Thanks again!!
There's a program called "crosstool" that automates the process,
though I've found it easier to just do it myself assuming you have all
the tools in place that you need. Check here:
If you get stuck, I could probably build you a toolchain real fast and
send you a log of what I did so that you can see each command and how