This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LDFLAGS gets lost during bootstrap


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]