Re: Building Relocatable GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 1, 2011 at 3:10 PM, NightStrike <nightstrike@xxxxxxxxx> wrote:
> On Tue, Jan 25, 2011 at 5:19 PM, Kyle Girard <kyle@xxxxxxxxxxxxxxxx> wrote:
>>
>> I'm trying compile a version of gcc-4.5 on linux x86 for linux x86 which
>> is relocatable but I'm having difficulty.
>>
>> Does anyone have an example of how to build such a relocatable gcc?
>>
>> I've been building binutils, and gcc-4.5 over and over
>> with many different options. ÂAfter reading the docs I thought the key
>> configure options are the --with-sysroot=/my/root and --prefix=/my/root
>> for both binutils and gcc with those options and it should be
>> relocatable but I've had no luck. ÂFor most of my attempts I can compile
>> binutils fine but gcc compilation fails saying it cannot file system
>> headers in /my/root/usr/include.. Am I missing a step somewhere? ÂI've
>> even tried the bringing in eglibc/libc into the mix and trying to create
>> a cross-compiler from linux x86 to linux x86 but that was even worse.
>>
>> From the googling that I've done it doesn't seem like it's that
>> difficult. ÂI think I'm missing some critical step somewhere
>
> Yes. ÂYou have to pre-populate /my/root with an actual sysroot,
> including system headers and a crt. ÂYou can do this by rolling your
> own, copying from /usr/, or any of a few other means.

Or, have crosstool-ng help you :)

http://ymorin.is-a-geek.org/projects/crosstool
hg clone http://ymorin.is-a-geek.org/hg/crosstool-ng/
or
wget http://ymorin.is-a-geek.org/download/crosstool-ng/crosstool-ng-1.10.0.tar.bz2

-Bryan



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux