From: Bryan Hundven <bryanhundven@gmail.com>
To: NightStrike <nightstrike@gmail.com>
Cc: Kyle Girard <kyle@kdmanalytics.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Building Relocatable GCC
Date: Wed, 02 Feb 2011 01:28:00 -0000 [thread overview]
Message-ID: <AANLkTikhYs9r=+sw6NOHOC5yoW-XoB4u83PeBpg7uprO@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinjUD=4xVip2y_MBhb4cqNJK0HB682PVQ8JYgs=@mail.gmail.com>
On Tue, Feb 1, 2011 at 3:10 PM, NightStrike <nightstrike@gmail.com> wrote:
> On Tue, Jan 25, 2011 at 5:19 PM, Kyle Girard <kyle@kdmanalytics.com> 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
next prev parent reply other threads:[~2011-02-02 1:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1295993996.3050.2164.camel@Tak>
2011-02-01 23:10 ` NightStrike
2011-02-02 1:28 ` Bryan Hundven [this message]
2011-01-26 15:27 Building Relocatable gcc Kyle Girard
2011-01-26 15:34 ` Ian Lance Taylor
2011-01-26 19:24 ` Kyle Girard
2011-01-26 19:43 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTikhYs9r=+sw6NOHOC5yoW-XoB4u83PeBpg7uprO@mail.gmail.com' \
--to=bryanhundven@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=kyle@kdmanalytics.com \
--cc=nightstrike@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).