This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: crosstool - x86_64 as i686->i686 or x86_64->i686


Dan Kegel wrote:

On 1/9/06, Keith Kyzivat <kkyzivat@physiometrix.com> wrote:


Ok, I've been struggling with this one for a few days now, to no avail.

I'm trying to build up a cross-compiler that forces crosstool to compile
as i686 with target of i686.
Versions: gcc 3.3.2, glibc 2.3.3, binutils 2.14, linux 2.6.3, crosstool-0.38
The purpose of this is to have a standardized gcc and glibc in use at my
location, and to build this under my gentoo-linux EM64T rig (amd64 build
of gentoo).



You just need to set the C compiler used to build crosstool to one that generates x86 binaries instead of x86_64 binaries, I think.

summary:
I've got a sucessful canadian cross that is x86_64 built, i686 hosted and i686 targetted, but ran into some ranlib problems that I fixed.




After analyzing this for a while, even though I have an i686 cross compiler already built, I came to the conclusion that I wanted to do a canadian cross, and rebuild a known compiler, if only just to have something I know is built correctly.

Steps from Dan's Canadian Cross description (http://kegel.com/crosstool/crosstool-0.38/doc/crosstool-howto.html#canadian)

1/2. BUILD=x86_64 HOST=x86_64 TARGET=i686 (destination HOST and TARGET are the same - no need for separate steps 1 and 2 as they are the same)
3. BUILD=x86_64 HOST/GCC_HOST=i686 TARGET=i686



Step 1/2 worked fine.
After setting up the requsite GCC_HOST, AR, and CC vars and exporting them, and starting the build,
I came by an error looking for (now this is from memory since I was too quick to blow it away and try another approach):
i686_host-unknown-linux-gnu-ranlib and failed (it doesn't exist).


The obvious thing to choose was to set RANLIB the same way I set AR and CC, with the ranlib generated from step 1.
investigating crosstool.sh seemed to support that argument, and off I sent crosstool.


Now it's done, and voila! I've got a canadian cross x86_64 built i686 -> i686 cross-compiler.

Now, here's the question: why is RANLIB not detected properly? Why wasn't this caught before by Dan when he put in the bit of info on canadian cross builds? (from all this, it seems that Dan put this section together when he was doing 32bit x86->x86_64 canadian crosses).
If the last part is true, why would 32bit x86 -> x86_64 canadian crosses find ranlib automatically?


Just some info to throw out there.

~Keith Kyzivat
Embedded Linux Software Engineer
Hospira, Inc.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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