LDFLAGS gets lost during bootstrap

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

 



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



[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