You are not logged in.
Pages: 1
I was fooling around trying to build a gcc cross compiler on arch. Using gcc-3.4.3..it kept failing to build. Without fail it borked on a couple of libs..signal.h and something else..can't recall just now..
Has anyone messed around with a X-compile on arch, or with gcc-3.4.3 in general?
I am thinking of trying an older version of gcc, and seeing how that would do. Then maybe I can use that for the bootstrap compiler and use the bootstrap compiler to build the cross-compiler.
*shrug* Anyone messed with this kind of stuff?
I was using the clean source from gnu.org for the binutils, gcc, and glibc sources.
I found an interesting doc on it.. https://www6.software.ibm.com/developer … ss-ltr.pdf
I was also trying to follow http://billgatliff.com/~bgat/twiki/bin/view/Crossgcc which apparently is almost gospel by now, but the versions listed are rather old, and there are some issues that are talked of in the wiki but not addressed (issues with glibc-2.3)..
oh, and someone in irc pointed me to linux from scratch, for boostrapping a toolchain, but that method relies heavily on having the libs, and other things, for the target architecture already available (from the cd). I am trying to do it without these..
Basically, as an exercise in "seeing if I can", I was trying to build a cross compiler for i386-pc-linux-gnu from inside the i686-pc-linux-gnu ArchLinux system. An exercise in targeting a different architecture. I figured I would start with i386 because it is classically the "best supported" toolchain wise.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Acutally it's pretty easy to create an i386 "cross-compiler" on an i686 system. I used the following gcc config for a i386 uClibc system:
../gcc-$pkgver/configure --prefix=/usr
--enable-languages=c --enable-threads=posix --enable-__cxa_atexit
--disable-shared --disable-nls i386-pc-linux-gnu
I'm sure you'll still need to set -march=i386.
Offline
looks like you are just using the pkgbuild. I am trying to use the source from gnu.org, clean.
Also, you are not building a bootstrap compiler, you are using the libs pre-existing on the system, not compiling new target libs..
I will give the pkgbuild a try. Maybe the patches to the gcc source are required for a successful compile.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Well, I only meant to show that putting the i386-pc-linux-gnu on the end gets you a 386 gcc with proper -march.
Do you want to build a static gcc?
For gcc 3.4.3 you can do it with:
make BOOT_LDFLAGS="-static" bootstrap
The --enable/disable-static affects whether libgcc/etc is static or shared, not gcc itself.
I mostly used the LFS method to build a uclibc based system.
Offline
hmmm...so you put it at the end without any flags?
I have been using the --target and --prefix flags to get it put in a certain place, but none of the dox I have read mentioned that part at the end...
hmmm
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
It is strange. The target/host/build stuff never did what I expected and seemed only useful for real cross compiling (eg i686 to ARM). Strangely a lot of configure scripts *know* their building with a cross-compiler but fail when they can't execute "foreign" test binaries. Talk about stupid... "I'm failing cause I can't run this uclibc-based binary on a glibc system, duh!".
I think what the last arg gets you is the arg value in certain paths:
/usr/bin/i686-pc-linux-gnu-gcc-3.4.3
/usr/include/c++/3.4.3/i686-pc-linux-gnu/*
/usr/lib/gcc/i686-pc-linux-gnu/*
...blah...blah...
Offline
I compiled once quite a long time ago (one year or more I think the most actual gcc was 3.3 back then) a gcc build for the GameBoy Advanced (ARM-cpu... as far as I know) according to this tutorial:
http://linux.gbadev.org/gcc-gba/
It was using a quite outdated gcc version (3.0.4) but as far as I can remember it all compiled well and I had a working GameBoy-Compiler with which I could create some simple programs for an GBA-emulator.
It isn't really the thing you were looking for, but maybe it helps anyway
Offline
I made a tigcc (http://tigcc.ticalc.org) package, and it works fine. I just used its built in install scripts, but if you pick them apart, you should be able to find out how it's done.
The suggestion box only accepts patches.
Offline
Bump!
cactus, where you able to do it with https://www6.software.ibm.com/developer … ss-ltr.pdf ?
Anyway, anyone has done a crossdev script for Arch or anything like that?
Anyone that has done his own cross compiler?
I need some help here, I'm trying to cross compile on my x86 Arch for my ppc32.
Offline
CLFS is around exactly for that purpose...
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
@belhifet
It has been a long time since I messed with cross compile stuff. I lost my "exotic" hardware. heh heh heh.
@B
cool link B.
Someday I want to pick up an ultrasparc, and this will be very useful to try putting arch on it.
Thanks!
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Actually building cross compiler is not that FUN You might be interested in following links:
http://kegel.com/crosstool/
http://kegel.com/crosstool/crosstool-0.43/buildlogs/
Offline
how about these?
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
Pages: 1