[PATCH 00/12] Yocto Project libtool patch queue

2021-10-25 Thread Richard Purdie
Hi, I saw comments about a possible pending release and decided to take the opportunity to send out the bulk of Yocto Project's patch queue for libtool. We use it in a cross compiling environment and make extensive use of the sysroot support in the toolchain so most of our issues are in that

[PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils

2021-10-25 Thread Richard Purdie
From: Khem Raj This patch renames the --with-sysroot option to --with-libtool-sysroot to avoid namespace conflict with binutils, gcc and other toolchain components since these componets also add that option to configure and this becomes confusing and conflicting otherwise. Signed-off-by:

[PATCH 07/12] libtool: Fix support for NIOS2 processor

2021-10-25 Thread Richard Purdie
From: Marek Vasut The name of the system contains the string "nios2". This string is caught by the some of the greedy checks for OS/2 in libtool, in particular the *os2* branches of switch statements match for the nios2 string, which results in incorrect behavior of libtool. This patch adds an

[PATCH 11/12] ltmain.in: Handle prefix-map compiler options correctly

2021-10-25 Thread Richard Purdie
If lto is enabled, we need the prefix-map variables to be passed to the linker. Add these to the list of options libtool passes through. Signed-off-by: Richard Purdie --- build-aux/ltmain.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-aux/ltmain.in

[PATCH 12/12] libtool.m4: For reproducibility stop encoding hostname in libtool script

2021-10-25 Thread Richard Purdie
For reproducibilty, stop encoding the hostname into the libtool script, this isn't really adding much to debugging and most distros are carrying such a patch now as reproducibility is important. Signed-off-by: Richard Purdie --- m4/libtool.m4 | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 08/12] libtool: Check for static libs for internal compiler libraries

2021-10-25 Thread Richard Purdie
From: Khem Raj Libtool checks only for libraries linked as -l* when trying to find internal compiler libraries. Clang, however uses the absolute path to link its internal libraries e.g. compiler_rt. This patch handles clang's statically linked libraries when finding internal compiler libraries.

[PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly

2021-10-25 Thread Richard Purdie
Update libtool.m4 to resolve a problem with lt_sysroot not being properly updated if the option '--with[-libtool]-sysroot' is not provided when running the 'configure' script for a package so that "/" as a sysroot is handled correctly by libtool. Signed-off-by: Richard Purdie --- m4/libtool.m4

[PATCH 09/12] Makefile.am: make sure autoheader run before autoconf

2021-10-25 Thread Richard Purdie
From: Mingli Yu autoheader will update ../libtool-2.4.6/libltdl/config-h.in which autoconf needs, so there comes a race sometimes as below: | configure.ac:45: error: required file 'config-h.in' not found | touch '../libtool-2.4.6/libltdl/config-h.in' So make sure autoheader run before

[PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths

2021-10-25 Thread Richard Purdie
We don't want to add RPATHS which match default linker search paths, they're a waste of space. This patch filters libtools list of paths to encoode and removes the ones we don't need. Libtool may be passed link paths of the form "/usr/lib/../lib" so normalize the paths before comparision.

[PATCH 03/12] ltmain.in: Add missing sysroot to library path

2021-10-25 Thread Richard Purdie
From: Khem Raj When using a sysroot we should append it to libdir, which is helpful in cross builds as the system is staged in the sysroot. For normal builds, i.e. when lt_sysroot is not set, it will still behave the same and add -L/usr/lib to the relink command. Signed-off-by: Richard Purdie

[PATCH 10/12] Makefile.am: make sure autoheader run before automake

2021-10-25 Thread Richard Purdie
From: Mingli Yu When use automake to generate Makefile.in from Makefile.am, there comes below race: | configure.ac:45: error: required file 'config-h.in' not found It is because the file config-h.in in updating process by autoheader, so make automake run after autoheader to avoid the above

[PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs

2021-10-25 Thread Richard Purdie
There is a bug where RPATHs could end up containing sysroot values when cross compiling which is obviously incorrect. Strip out sysroot components from libdir when building RPATH values to avoid this. Signed-off-by: Richard Purdie --- build-aux/ltmain.in | 14 -- 1 file changed, 12

[PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly

2021-10-25 Thread Richard Purdie
A command like: libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/image/usr/lib/gnome-keyring/standalone/' where the path ends with a trailing slash currently fails. This occurs in software like gnome-keyring or pulseaudio and is because the comparision code doesn't see