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: x32_64 cross compiler


NightStrike wrote:
The OP was asking about how to build a cross compiler to target
x86_64-pc-linux and be hosted on i686-pc-linux.
So what is this "x86_64-pc-linux" ? For me it is something like Fedora7/x86_64 or SuSE 10.3/x86_64
or the Ubuntu one. The OP mentioned only cross compiler, not a "toolchain with which to create my own
Linux/x86_64 distro". In that case the target system wouldn't yet exist and when this being the case, quite
many have that political idea about starting from absolute scratch with everything - the crosstoolchain and
the still unexisting runtime (shared libraries for the target) shouldn't be bootstraped with any "suitable" target
glibc! Of course all those glibcs for Fedora, SuSE, Debian, Ubuntu are "suitable" in that 'x86_64-pc-linux-gnu'
target case. This thing can easily be seen being equivalent to "bootstraping" a new car with GoodYear tyres
when driving to a tyre shop to buy those "right" Firestones... Driving with bare wheels because not accepting
those GoodYears as the bootstrap tyres is one choice of course.


At least in those special Linux/PPC cases there has been no problems in using a Fedora/PPC glibc during
the GCC build, before building my own special Linux/PPC glibc with the new GCC...


I'm not sure why you
started talking about numerous other projects. To build a *complete*
toolchain, you need binutils, gcc, and a runtime. glibc works as a
runtime, as does uclibc and others. The only discussion is whether
it's easier to compile the various pieces yourself, use a tool like
crosstool (or even buildroot), or download at least part of the
toolchain requirements (such as the target-hosted runtime) from some
repository like fedora.
I have built 10 or more crosstoolchains for 'x86_64-pc-linux-gnu' targets like those Fedoras, SuSEs and
Ubuntus during the past two or three years. Just unpacking the original target glibcs and then building the
target binutils and GCC, will take totally 15-30 minutes. I think this being very easy... In that car analogy,
driving is easy when one knows where the gasoline, the engine oil, the windshield liquid etc should be put.
Knowing where to put the target stuff, or being capable to ask about this, is quite essential also with GCCs.


Andrew suggested using Fedora6 glibcs if that Linux/x86_64 target is still fuzzy... With Linux/x86 I have
used the RHL7.3 target and its glibc-2.2.5 as that "least common nominator". Whether the Fedora6 and
its glibc-2.5 would be that equivalent to Linux/x86_64 is then something which should be discussed. Even
GUI apps made for RHL7.3 seem to work ok on Fedora7/x86, SuSE 10.x etc.


The key thing in making a crosstoolchain really is to find out what on earth the target is! That 'x86-64-pc-linux'
is only the common name for all those custom Linux/x86_64 systems....




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