-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When moving gcc libs, prefer the same directory as libc #639
Conversation
If libc ended up in a directory other than /lib, place GCC's libs in that directory as well. Signed-off-by: Alexey Neyman <stilor@att.net>
|
I noticed that the glibc-based toolchains where the glibc's default installation directory is not lib (e.g., aarch64-*-linux-gnu where it is lib64) fail in buildroot because, e.g., libraries end up in /lib64 and dynamic linker is installed into /lib. Before this change, even libraries were split between both locations. I'll propose a patch to handle ld-so being in a different directory to buildroot (this seems to be the case with multilib-musl as well). |
|
Causes a regression in powerpc64le-unknown-linux-gnu, where ld's and gcc's search paths differ: gcc wants to use /lib64 and ld searches /lib64le. As a result, libgcc_s.so (needed by libexpat.so but not specified explicitly via the -lgcc_s) is not found by linker. |
binutils 2.23 and earlier are not affected, they had the correct code. Signed-off-by: Alexey Neyman <stilor@att.net>
... and in addition to final toolchain aliasing, use it when configuring multilibs for glibc/musl. Note that uClibc does not need it, it is explicitly selecting the tools using CROSS_PREFIX. Signed-off-by: Alexey Neyman <stilor@att.net>
Convert absolute targets to relative so that they are valid on the host, too. The procedure is very similar to uclibc, so it is moved into a common function. Signed-off-by: Alexey Neyman <stilor@att.net>
Also a fix for CT_IterateMultilibs: it didn't pass multi_os_dir_gcc, so it only worked if the caller did *not* declare it as a local variable. Signed-off-by: Alexey Neyman <stilor@att.net>
... as we are going through various multilibs in ld.so.conf Signed-off-by: Alexey Neyman <stilor@att.net>
Signed-off-by: Alexey Neyman <stilor@att.net>
... and default to 'n'. Signed-off-by: Alexey Neyman <stilor@att.net>
GCC does not distinguish the resulting binary by the CFLAGS (e.g. based on which -march= was given). This means, while it will use the right libraries for linking, at runtime they are all going to request the same ld.so path and load the libraries from the same default path. Signed-off-by: Alexey Neyman <stilor@att.net>
It turns out buildroot does not currently accept a toolchain where a dynamic linker does not reside in the multi-os-directory. Unfortunately this is how glibc installs itself on AArch64 without any extra tricks. So, provide an option to force everything into /lib or /usr/lib; patch to buildroot will be worked on separately. Signed-off-by: Alexey Neyman <stilor@att.net>
067a950
to
63b2a19
Compare
If libc ended up in a directory other than /lib, place GCC's libs
in that directory as well.
Signed-off-by: Alexey Neyman stilor@att.net