public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* LDFLAGS gets lost during bootstrap
@ 2012-03-13  8:12 Christer Solskogen
  2012-03-13 21:13 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Christer Solskogen @ 2012-03-13  8:12 UTC (permalink / raw)
  To: gcc-help

I'm trying to create a toolchain that is as independent of the operating 
system as possible. That is binutils, gcc and eglibc with its own 
sysroot. That does mean that everything that is installed using that 
toolchain is dependent on having that toolchain installed, and I'm fine 
with that. Both gcc and binutils itself will also be dependent on the 
eglibc that I'm installing.
LFS is doing almost the same, but it depends that you have root on that 
machine, my goal is that my project is not.

My process is:
1) Compile and install binutils and gcc using the already installed 
toolchain.
1.5) Install kernel headers.
2) Using the newly build binutils and gcc to compile and install eglibc.
3) Compile and install binutils and gcc again agains the newly installed 
eglibc.

This might not seem that that since both binutils and gcc supports 
sysroot. The problem is that I do not want to use the toolchain in a 
chroot. So I must tell both binutils and gcc to use only the headers and 
libraries that I installed, and not the ones provided by the host.
I've gotten that to work as well, but telling binutils and gcc to prefix 
the path I've installed the toolchain into RPATH is where I'm stranded 
now. Adding LDFLAGS to binutils was fine, so the RPATH is working as I 
want now. But GCC is giving me a hard time.

My ldflags is 
"-Wl,-I,$HOME/obj/tools/lib/ld-linux-x86-64.so.2,-rpath,$HOME/obj/tools/lib" 
- but during bootstrap they are lost. How can I ensure that the LDFLAGS 
that I want is being used in every stage? I've also tried setting 
BOOT_FLAGS=${LDFLAGS} as well, but still no go.

-- 
chs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LDFLAGS gets lost during bootstrap
  2012-03-13  8:12 LDFLAGS gets lost during bootstrap Christer Solskogen
@ 2012-03-13 21:13 ` Ian Lance Taylor
  2012-03-14 21:53   ` Christer Solskogen
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2012-03-13 21:13 UTC (permalink / raw)
  To: Christer Solskogen; +Cc: gcc-help

Christer Solskogen <christer.solskogen@gmail.com> writes:

> My ldflags is
> "-Wl,-I,$HOME/obj/tools/lib/ld-linux-x86-64.so.2,-rpath,$HOME/obj/tools/lib"
> - but during bootstrap they are lost. How can I ensure that the
> LDFLAGS that I want is being used in every stage? I've also tried
> setting BOOT_FLAGS=${LDFLAGS} as well, but still no go.

That's BOOT_LDFLAGS.  See also the configure option --with-boot-ldflags.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: LDFLAGS gets lost during bootstrap
  2012-03-13 21:13 ` Ian Lance Taylor
@ 2012-03-14 21:53   ` Christer Solskogen
  0 siblings, 0 replies; 3+ messages in thread
From: Christer Solskogen @ 2012-03-14 21:53 UTC (permalink / raw)
  To: gcc-help

On 13/3-2012 10:12 PM, Ian Lance Taylor wrote:
> Christer Solskogen<christer.solskogen@gmail.com>  writes:
>
>> My ldflags is
>> "-Wl,-I,$HOME/obj/tools/lib/ld-linux-x86-64.so.2,-rpath,$HOME/obj/tools/lib"
>> - but during bootstrap they are lost. How can I ensure that the
>> LDFLAGS that I want is being used in every stage? I've also tried
>> setting BOOT_FLAGS=${LDFLAGS} as well, but still no go.
>
> That's BOOT_LDFLAGS.  See also the configure option --with-boot-ldflags.
>

That did the trick. Thanks :-)

-- 
chs



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-14 21:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13  8:12 LDFLAGS gets lost during bootstrap Christer Solskogen
2012-03-13 21:13 ` Ian Lance Taylor
2012-03-14 21:53   ` Christer Solskogen

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).