Skip to contentSkip to conversation

libtool: don't prefix the installed binary

RFC PATCH In review Ross Burton 4 participants 17 messages Dec 10, 2021 – Dec 13, 2021

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/10 libtool: don't prefix the installed binary

Typically libtool installs the binary to 'libtool' in the source tree, but we've got patches to rename this to ${host_sys}-libtool. As this isn't standard any upstream that don't respect the LIBTOOL variable need to be told explicitly where libtool is, which is a long-term maintenance burden for us on top of the initial libtool patches.

The reasoning for this renaming appears to stem from the design to be sure that we're using our new/patched libtool and not the host's binary. However, now that we have HOSTTOOLS, there's no way to run the host libtool so this argument is moot.

This patch removes the libtool renaming, follow-up patches remove the required modifications from the rest of the recipes.

---
 .../libtool/libtool-cross_2.4.6.bb            | 11 ++-
 .../libtool/libtool-native_2.4.6.bb           |  4 +-
 .../libtool/libtool/prefix.patch              | 98 -------------------
 .../libtool/nativesdk-libtool_2.4.6.bb        |  6 +-
 4 files changed, 11 insertions(+), 108 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/prefix.patch
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +6 -5
index 4a43867b3ec..4448373afc4 100644
@@ -1,7 +1,7 @@
 require libtool-${PV}.inc
 
 PACKAGES = ""
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 datadir = "${STAGING_DIR_TARGET}${target_datadir}"
@@ -22,15 +22,16 @@ do_configure:prepend () {
 # Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
 #
 do_install () {
+	ln -s false ${D}
 	install -d ${D}${bindir_crossscripts}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	install -m 0755 libtool ${D}${bindir_crossscripts}/libtool
 	sed -e 's@^\(predep_objects="\).*@\1"@' \
 	    -e 's@^\(postdep_objects="\).*@\1"@' \
 	    -e 's@^CC="ccache.@CC="@' \
 	    -e 's@^LTCC="ccache.@LTCC="@' \
-	    -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	    -i ${D}${bindir_crossscripts}/libtool
+	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
+	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
 	GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
 	chmod 0755 ${D}${bindir_crossscripts}/libtoolize
 	install -d ${D}${target_datadir}/libtool/build-aux/
meta/recipes-devtools/libtool/libtool-native_2.4.6.bb +2 -2
index 3b20ce3e69f..c68527f2609 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 DEPENDS = ""
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 
 inherit native
 
@@ -18,5 +18,5 @@ do_configure:prepend () {
 do_install () {
 	autotools_do_install
 	install -d ${D}${bindir}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
+	install -m 0755 libtool ${D}${bindir}/libtool
 }
meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -98

98 lines not on this page · raw message

meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb +3 -3
index e3ad6721fdf..cede2092db0 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 inherit nativesdk
@@ -20,12 +20,12 @@ do_configure:prepend () {
 do_install () {
 	autotools_do_install
 	install -d ${D}${bindir}/
-	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
+	install -m 0755 libtool ${D}${bindir}/
 }
 
 SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
 
 libtoolnativesdk_sysroot_preprocess () {
 	install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-	install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
+	install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool
 }
Signature · 1 line
2.25.1
#1 lore raw

RFC PATCH 2/10 binutils: don't expect libtool to be host-prefixed

We update the libtool m4 files in binutils with the latest files from our patched libtool so that we can use the --with-libtool-sysroot option.

Remove the chunks that are specific to the libtool renaming, which now doesn't happen.

---
 .../binutils/0013-Use-libtool-2.4.patch       | 171 ------------------
 1 file changed, 171 deletions(-)
meta/recipes-devtools/binutils/binutils/0013-Use-libtool-2.4.patch +0 -171
index a75e72105f2..8f87cfdb777 100644
@@ -796,25 +796,6 @@ index daa51244369..79d0c4b4623 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7706,7 +8201,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7795,7 +8291,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8093,8 +8589,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -2757,25 +2738,6 @@ index bf6461dab1e..8e6f6d30b4d 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7593,7 +8088,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7682,7 +8178,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7980,8 +8476,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -4696,25 +4658,6 @@ index 789d1b38b33..7ac563a13ad 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7318,7 +7813,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7407,7 +7903,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7705,8 +8201,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -6638,25 +6581,6 @@ index 5703bba4462..e1ac86ec797 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7220,7 +7715,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7309,7 +7805,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7607,8 +8103,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -8597,25 +8521,6 @@ index 2aeb3317b65..5ef46d31558 100755
  
  
  # Set options
-@@ -8077,7 +8582,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -8166,7 +8672,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8464,8 +8970,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -11220,25 +11125,6 @@ index 82bcf13a606..a7fb723a145 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8248,7 +8742,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -8337,7 +8832,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -8635,8 +9130,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -12422,16 +12308,6 @@ index 9a13f3b117a..5be47564443 100644
  
  
  # LT_PREREQ(VERSION)
-@@ -92,7 +94,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
- 
- _LT_SETUP
 @@ -166,10 +169,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  dnl
  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
@@ -12446,15 +12322,6 @@ index 9a13f3b117a..5be47564443 100644
  
  _LT_CONFIG_LIBTOOL_INIT([
  # See if we are running on zsh, and set the options which allow our
-@@ -199,7 +205,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -632,7 +638,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  configured by $[0], generated by m4_PACKAGE_STRING.
@@ -20267,25 +20134,6 @@ index 3513e408ce1..133948631e9 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7470,7 +7965,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7559,7 +8055,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7857,8 +8353,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
@@ -22209,25 +22057,6 @@ index 695819cd54b..14b5f28013a 100755
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7300,7 +7795,8 @@ fi
- LIBTOOL_DEPS="$ltmain"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- 
- 
- 
-@@ -7389,7 +7885,7 @@ aix3*)
- esac
- 
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
- 
- # All known linkers require a `.a' archive for static linking (except MSVC,
 @@ -7687,8 +8183,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
Signature · 1 line
2.25.1
#2 lore raw

RFC PATCH 3/10 pkgconfig: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 .../fix-glib-configure-libtool-usage.patch    | 45 -------------------
 .../pkgconfig/pkgconfig_git.bb                |  1 -
 2 files changed, 46 deletions(-)
 delete mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/fix-glib-configure-libtool-usage.patch
meta/recipes-devtools/pkgconfig/pkgconfig/fix-glib-configure-libtool-usage.patch deleted +0 -45
deleted file mode 100644
index 01c62472c1d..00000000000
@@ -1,45 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Saul Wold <[email protected]>
-
-
-Index: pkg-config-0.28/glib/configure.ac
-===================================================================
---- pkg-config-0.28.orig/glib/configure.ac
-+++ pkg-config-0.28/glib/configure.ac
-@@ -1438,7 +1438,7 @@ if test x"$glib_native_win32" = xyes; th
-   G_MODULE_LDFLAGS=
- else
-   export SED
--  G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+  G_MODULE_LDFLAGS=`(./${host_alias}-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- fi
- dnl G_MODULE_IMPL= don't reset, so cmd-line can override
- G_MODULE_NEED_USCORE=0
-@@ -1503,13 +1503,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMP
- 	LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
- dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
- 	echo "void glib_plugin_test(void) { }" > plugin.c
--	${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
-+	${SHELL} ./${host_alias}-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
- 		${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
--	${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
-+	${SHELL} ./${host_alias}-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
- 		${LDFLAGS} -module -o plugin.la -export-dynamic \
- 		-shrext ".o" -avoid-version plugin.lo \
- 		-rpath /dont/care >/dev/null 2>&1
--	eval `./libtool --config | grep ^objdir`
-+	eval `./${host_alias}-libtool --config | grep ^objdir`
- 	AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
- 		glib_cv_rtldglobal_broken,[
- 		AC_TRY_RUN([
-@@ -1582,7 +1582,7 @@ fi
- 
- AC_MSG_CHECKING(for the suffix of module shared libraries)
- export SED
--shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
-+shrext_cmds=`./${host_alias}-libtool --config | grep '^shrext_cmds='`
- eval $shrext_cmds
- module=yes eval std_shrext=$shrext_cmds
- # chop the initial dot
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +0 -1
index c220bafd905..16efcef5613 100644
@@ -14,7 +14,6 @@ PV = "0.29.2+git${SRCPV}"
 SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \
            file://pkg-config-esdk.in \
            file://pkg-config-native.in \
-           file://fix-glib-configure-libtool-usage.patch \
            file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
            file://0001-autotools-remove-support-for-the-__int64-type.-See-1.patch \
            file://0001-autotools-use-C99-printf-format-specifiers-on-Window.patch \
Signature · 1 line
2.25.1
#3 lore raw

RFC PATCH 4/10 gtk+3: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 meta/recipes-gnome/gtk+/gtk+3.inc             |  3 --
 .../gtk+/gtk+3/0001-Hardcoded-libtool.patch   | 47 -------------------
 meta/recipes-gnome/gtk+/gtk+3_3.24.30.bb      |  1 -
 3 files changed, 51 deletions(-)
 delete mode 100644 meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
meta/recipes-gnome/gtk+/gtk+3.inc +0 -3
index 47cdb83dce6..4de4dcf5324 100644
@@ -27,9 +27,6 @@ ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
 
 do_configure:prepend() {
-    # Do this because the configure script is running ./libtool directly
-    rm -f libtool
-    ln -s ${TARGET_PREFIX}libtool libtool
     #delete a file that will get confused with generated one in ${B}
     rm -f ${S}/gtk/gtktypefuncs.c
 
meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch deleted +0 -47

47 lines not on this page · raw message

meta/recipes-gnome/gtk+/gtk+3_3.24.30.bb +0 -1
index 7e7566f9af9..3de5b588eba 100644
@@ -3,7 +3,6 @@ require gtk+3.inc
 MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
 
 SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-           file://0001-Hardcoded-libtool.patch \
            file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
            file://0003-Add-disable-opengl-configure-option.patch \
            file://link_fribidi.patch \
Signature · 1 line
2.25.1
#4 lore raw

RFC PATCH 5/10 db: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 meta/recipes-support/db/db_5.3.28.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-support/db/db_5.3.28.bb +1 -3
index d5b788a3d78..c5427f54eb0 100644
@@ -66,8 +66,6 @@ PACKAGECONFIG ??= ""
 PACKAGECONFIG[verify] = "--enable-verify, --disable-verify"
 PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm,"
 
-EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
-
 EXTRA_AUTORECONF += "--exclude=autoheader  -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
 AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
 
@@ -91,7 +89,7 @@ oe_runconf:prepend() {
 
 do_compile:prepend() {
     # Stop libtool adding RPATHs
-    sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
+    sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
 }
 
 do_install:append() {
Signature · 1 line
2.25.1
#5 lore raw

RFC PATCH 6/10 freetype: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 .../freetype/freetype/use-right-libtool.patch | 31 -------------------
 .../freetype/freetype_2.11.1.bb               |  4 +--
 2 files changed, 1 insertion(+), 34 deletions(-)
 delete mode 100644 meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
meta/recipes-graphics/freetype/freetype/use-right-libtool.patch deleted +0 -31
deleted file mode 100644
index b389455f5d4..00000000000
@@ -1,31 +0,0 @@
-From 50499e4482d40cff2ef05905c658ba4380e7e6fc Mon Sep 17 00:00:00 2001
-From: Ross Burton <[email protected]>
-Date: Thu, 7 Jan 2016 21:13:07 +0000
-Subject: [PATCH] freetype: enable out-of-tree builds, and use host zlib
-
-Freetype think that it knows best about where libtool is, and explicitly the
-libtool autoconf macros telling it where to find the libtool script.  Of course
-we prefix the script with the target triplet, so it's wrong.  Fix this by
-removing the forced assignment, so the configure script's knowledge of where it
-put libtool is used.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <[email protected]>
-
----
- builds/unix/unix-cc.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in
-index 89be450..72609d3 100644
---- a/builds/unix/unix-cc.in
-+++ b/builds/unix/unix-cc.in
-@@ -16,7 +16,7 @@ CC           := @CC@
- COMPILER_SEP := $(SEP)
- FT_LIBTOOL_DIR ?= $(PLATFORM_DIR)
- 
--LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
-+LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@ --tag CC
- 
- 
- # The object file extension (for standard and static libraries).  This can be
meta/recipes-graphics/freetype/freetype_2.11.1.bb +1 -3
index 78babdcbdb2..04b56adc6b2 100644
@@ -12,9 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=a5927784d823d443c6cae55701d01553 \
                     file://docs/FTL.TXT;md5=9f37b4e6afa3fef9dba8932b16bd3f97 \
                     file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
 
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz \
-           file://use-right-libtool.patch \
-          "
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BP}.tar.xz"
 SRC_URI[sha256sum] = "3333ae7cfda88429c97a7ae63b7d01ab398076c3b67182e960e5684050f2c5c8"
 
 UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.25.1
#6 lore raw

RFC PATCH 7/10 apr: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

This means that apr now installs libtool into the build-1 folder, but as this has never been needed before (as we use the system libtool) we can remove it (it contains build paths so is unreproducible). Also add a RDEPENDS on libtool for the target -dev package.

---
 meta/recipes-support/apr/apr_1.7.0.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-support/apr/apr_1.7.0.bb +5 -3
index 5f8fd6a4618..9c826d43807 100644
@@ -63,7 +63,7 @@ MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \
                     ${PN}-dev:${datadir}/build-1/apr_rules.mk"
 
 FILES:${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
-RDEPENDS:${PN}-dev += "bash"
+RDEPENDS:${PN}-dev += "bash libtool"
 
 RDEPENDS:${PN}-ptest += "libgcc"
 
@@ -80,6 +80,8 @@ do_install:append() {
 }
 
 do_install:append:class-target() {
+	rm -f ${D}${datadir}/build-1/libtool
+	sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g ${D}${datadir}/build-1/apr_rules.mk
 	sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
 	       -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
 	sed -i -e 's,${STAGING_DIR_HOST},,g' \
@@ -97,12 +99,12 @@ apr_sysroot_preprocess () {
 	cp ${S}/build/apr_rules.mk $d/
 	sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
 	sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
-	sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+	sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g $d/apr_rules.mk
 	sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
 	cp ${S}/build/mkdir.sh $d/
 	cp ${S}/build/make_exports.awk $d/
 	cp ${S}/build/make_var_export.awk $d/
-	cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+	cp ${S}/libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
 }
 
 do_compile_ptest() {
Signature · 1 line
2.25.1
#7 lore raw

RFC PATCH 8/10 qemu: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 meta/recipes-devtools/qemu/qemu.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/qemu/qemu.inc +0 -2
index ea7dfaecef8..fe35f94acf7 100644
@@ -98,8 +98,6 @@ EXTRA_OECONF = " \
     ${PACKAGECONFIG_CONFARGS} \
     "
 
-export LIBTOOL="${HOST_SYS}-libtool"
-
 B = "${WORKDIR}/build"
 
 #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
Signature · 1 line
2.25.1
#8 lore raw

Re: [OE-core] [RFC PATCH 08/10] qemu: remove obsolete support for renamed libtool

Quoted 1 line · Ross Burton

libtool is now longer renamed to ${host}-libtool, so

Typo now should be no

remove the changes

Quoted 36 lines

to support this.

---
 meta/recipes-devtools/qemu/qemu.inc | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-devtools/qemu/qemu.inc +0 -3
index ea7dfaecef8..fe35f94acf7 100644
@@ -98,8 +98,6 @@ EXTRA_OECONF = " \
     ${PACKAGECONFIG_CONFARGS} \
     "
 
-export LIBTOOL="${HOST_SYS}-libtool"
-
 B = "${WORKDIR}/build"
 
 #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#159535):
https://lists.openembedded.org/g/openembedded-core/message/159535
Mute This Topic: https://lists.openembedded.org/mt/87636636/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#9 lore raw

Re: [OE-core] [RFC PATCH 08/10] qemu: remove obsolete support for renamed libtool

Quoted 3 lines · Khem Raj
Quoted 1 line

libtool is now longer renamed to ${host}-libtool, so

Typo now should be no

Argh.

Dug out git-filter-branch, now fixed in poky-contrib:ross/libtool.

Ross

#10 lore raw

RFC PATCH 9/10 subversion: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 ...001-Fix-libtool-name-in-configure.ac.patch | 29 -------------------
 .../subversion/subversion_1.14.1.bb           |  1 -
 2 files changed, 30 deletions(-)
 delete mode 100644 meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch
meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch deleted +0 -29
deleted file mode 100644
index 5a1b10b2e11..00000000000
@@ -1,29 +0,0 @@
-From cbcfe0399347989e45a8fb695f55c855d6b3da72 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-Date: Mon, 7 Dec 2015 17:11:02 +0200
-Subject: [PATCH] Fix libtool name in configure.ac
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Alexander Kanavin <[email protected]>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4ed66d4..ceb64f9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,8 +221,8 @@ if test "$experimental_libtool" = "yes"; then
-   LIBTOOL="$sh_libtool"
-   SVN_LIBTOOL="$sh_libtool"
- else
--  sh_libtool="$abs_builddir/libtool"
--  SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
-+  sh_libtool="$abs_builddir/$host_alias-libtool"
-+  SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
- fi
- AC_SUBST(SVN_LIBTOOL)
- 
--- 
-2.6.2
-
meta/recipes-devtools/subversion/subversion_1.14.1.bb +0 -1
index 87dc359439c..a0a9376f3de 100644
@@ -10,7 +10,6 @@ DEPENDS:append:class-native = " file-replacement-native"
 
 SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://disable_macos.patch \
-           file://0001-Fix-libtool-name-in-configure.ac.patch \
            file://serfmacro.patch \
            "
 
Signature · 1 line
2.25.1
#11 lore raw

RFC PATCH 10/10 apmd: remove obsolete support for renamed libtool

In reply to Ross Burton

libtool is now longer renamed to ${host}-libtool, so remove the changes to support this.

---
 meta/recipes-bsp/apmd/apmd/libtool.patch | 22 +++++++++++++++-------
 meta/recipes-bsp/apmd/apmd_3.2.2-15.bb   |  2 +-
 2 files changed, 16 insertions(+), 8 deletions(-)
meta/recipes-bsp/apmd/apmd/libtool.patch +15 -7
index 834ee080a1f..fd0a952890d 100644
@@ -1,3 +1,8 @@
+From d5dde7ca91a5aed273d8fe269e1a5194e85c8c79 Mon Sep 17 00:00:00 2001
+From: Scott Garman <[email protected]>
+Date: Tue, 13 Jul 2010 16:46:46 +0800
+Subject: [PATCH] apmd: upgrade to 3.2.2-14
+
 Add by RP to address "unable to infer tagged configuration" error:
    commit 35de05e61b88c0808a5e885bb0efdf420555d5ad
    Author: Richard Purdie <[email protected]>
@@ -15,15 +20,18 @@ Upstream-Status: Pending
 
 Signed-off-by: Scott Garman <[email protected]>
 
-Index: apmd-3.2.2.orig/Makefile
-===================================================================
---- apmd-3.2.2.orig.orig/Makefile	2004-01-04 08:13:18.000000000 +0000
-+++ apmd-3.2.2.orig/Makefile	2008-04-21 17:10:03.000000000 +0100
-@@ -58,9 +57,8 @@
- #CFLAGS=-O3 -m486 -fomit-frame-pointer
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 92fc0fd..8e283dc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,8 +59,8 @@ RANLIB=ranlib
  #LDFLAGS=-s
  
--LIBTOOL=libtool --quiet
+ LIBTOOL=libtool --quiet
 -LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
 -LT_LINK = $(LIBTOOL) --mode=link $(CC)
 +LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
meta/recipes-bsp/apmd/apmd_3.2.2-15.bb +1 -1
index da17e5a2350..1779e8b2a03 100644
@@ -43,7 +43,7 @@ EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 do_compile() {
 	# apmd doesn't use whole autotools. Just libtool for installation
-	oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" apm apmd
+	oe_runmake apm apmd
 }
 
 do_install() {
Signature · 1 line
2.25.1
#12 lore raw
In reply to Ross Burton

Note that meta-oe-contrib:ross/libtool contains the patches needed to get this working against meta-oe, as far as I can tell in my testing.

Ross

Quoted 222 lines · Ross Burton via lists.openembedded.org

Typically libtool installs the binary to 'libtool' in the source tree, but we've got patches to rename this to ${host_sys}-libtool. As this isn't standard any upstream that don't respect the LIBTOOL variable need to be told explicitly where libtool is, which is a long-term maintenance burden for us on top of the initial libtool patches.

The reasoning for this renaming appears to stem from the design to be sure that we're using our new/patched libtool and not the host's binary. However, now that we have HOSTTOOLS, there's no way to run the host libtool so this argument is moot.

This patch removes the libtool renaming, follow-up patches remove the required modifications from the rest of the recipes.

---
 .../libtool/libtool-cross_2.4.6.bb            | 11 ++-
 .../libtool/libtool-native_2.4.6.bb           |  4 +-
 .../libtool/libtool/prefix.patch              | 98 -------------------
 .../libtool/nativesdk-libtool_2.4.6.bb        |  6 +-
 4 files changed, 11 insertions(+), 108 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/prefix.patch
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +6 -5
index 4a43867b3ec..4448373afc4 100644
@@ -1,7 +1,7 @@
 require libtool-${PV}.inc
 
 PACKAGES = ""
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 datadir = "${STAGING_DIR_TARGET}${target_datadir}"
@@ -22,15 +22,16 @@ do_configure:prepend () {
 # Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
 #
 do_install () {
+       ln -s false ${D}
        install -d ${D}${bindir_crossscripts}/
-       install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+       install -m 0755 libtool ${D}${bindir_crossscripts}/libtool
        sed -e 's@^\(predep_objects="\).*@\1"@' \
            -e 's@^\(postdep_objects="\).*@\1"@' \
            -e 's@^CC="ccache.@CC="@' \
            -e 's@^LTCC="ccache.@LTCC="@' \
-           -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-       sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-       sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+           -i ${D}${bindir_crossscripts}/libtool
+       sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
+       sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
        GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
        chmod 0755 ${D}${bindir_crossscripts}/libtoolize
        install -d ${D}${target_datadir}/libtool/build-aux/
meta/recipes-devtools/libtool/libtool-native_2.4.6.bb +2 -2
index 3b20ce3e69f..c68527f2609 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 DEPENDS = ""
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 
 inherit native
 
@@ -18,5 +18,5 @@ do_configure:prepend () {
 do_install () {
        autotools_do_install
        install -d ${D}${bindir}/
-       install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool
+       install -m 0755 libtool ${D}${bindir}/libtool
 }
meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -98
deleted file mode 100644
index a73df2e4a7a..00000000000
@@ -1,98 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
-it can't be confused with the host libtool.
-
-Originally by: RP
-
-Updated: Date: 2010/06/28
-Nitin A Kamble <[email protected]>
-
-It also adjusts libtool so that the header at the script is used for
-script execution and not thevalue of $SHELL. This is because many
-Makefiles change $SHELL so dash can get used to execute what is
-otherwise configured as a bash shell script. Since we don't need to
-execute scipts this way on any system I'm aware of us building upon,
-the simplest fix is just to remove $SHELL.
-
-Updated: Date: 2011/11/09
-RP
-
-Updated by: Robert Yang <[email protected]>
-
-diff --git a/Makefile.am b/Makefile.am
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -31,7 +31,7 @@ SUBDIRS                      = .
- DIST_SUBDIRS          = $(SUBDIRS)
- EXTRA_DIST            =
-
--BUILT_SOURCES         = libtool libtoolize
-+BUILT_SOURCES         = $(host_alias)-libtool libtoolize
-
- CLEANFILES            =
- MOSTLYCLEANFILES      =
-@@ -67,7 +67,7 @@ build_scripts        = $(srcdir)/$(aux_dir)/announce-gen \
-
- EXTRA_DIST     += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
-                 GNUmakefile
--CLEANFILES     += libtool libtoolize
-+CLEANFILES     += $(host_alias)-libtool libtoolize
-
- ## If a file is named several times below, and especially if it
- ## is a distributed file created during Libtool bootstrap, we
-@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
-       -e 's|@srcdir\@|$(srcdir)|g'
-
- # The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtool
-+bin_SCRIPTS = $(host_alias)-libtool
-
- libtoolize: $(libtoolize_in) $(config_status)
-       $(AM_V_at)rm -f '$@'
-@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
- # We used to do this with a 'stamp-vcl' file, but non-gmake builds
- # would rerun configure on every invocation, so now we manually
- # check the version numbers from the build rule when necessary.
--libtool: $(ltmain_sh) $(config_status) $(dotversion)
-+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
-       @$(rebuild); \
-       if test -f '$@'; then \
-         eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
-@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
-
- BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
-       LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
--      LIBTOOL="$(abs_top_builddir)/libtool" \
-+      LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
-       tst_aclocaldir="$(abs_top_srcdir)/m4"
-
- INSTALLCHECK_ENVIRONMENT = \
-       LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
--      LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
-+      LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
-       LTDLINCL="-I$(includedir)" \
-       LIBLTDL="$(libdir)/libltdl.la" \
-       tst_aclocaldir="$(aclocaldir)"
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS=$ltmain
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
-
- _LT_SETUP
-@@ -199,7 +200,7 @@ aix3*)
- esac
-
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
-
- # All known linkers require a '.a' archive for static linking (except MSVC,
meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb +3 -4
index e3ad6721fdf..cede2092db0 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 inherit nativesdk
@@ -20,12 +20,12 @@ do_configure:prepend () {
 do_install () {
        autotools_do_install
        install -d ${D}${bindir}/
-       install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
+       install -m 0755 libtool ${D}${bindir}/
 }
 
 SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
 
 libtoolnativesdk_sysroot_preprocess () {
        install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-       install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
+       install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool
 }
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159530): https://lists.openembedded.org/g/openembedded-core/message/159530
Mute This Topic: https://lists.openembedded.org/mt/87636630/1676615
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#13 lore raw
In reply to Ross Burton
Quoted 6 lines · Ross Burton

Typically libtool installs the binary to 'libtool' in the source tree, but we've got patches to rename this to ${host_sys}-libtool. As this isn't standard any upstream that don't respect the LIBTOOL variable need to be told explicitly where libtool is, which is a long-term maintenance burden for us on top of the initial libtool patches.

Quoted 8 lines

The reasoning for this renaming appears to stem from the design to be sure that we're using our new/patched libtool and not the host's binary. However, now that we have HOSTTOOLS, there's no way to run the host libtool so this argument is moot.

This patch removes the libtool renaming, follow-up patches remove the required modifications from the rest of the recipes.

Does it mean that it can now run original libtool script accidentally which is pregenerated part of package which may be not what we want

Quoted 230 lines
---
 .../libtool/libtool-cross_2.4.6.bb            | 11 ++-
 .../libtool/libtool-native_2.4.6.bb           |  4 +-
 .../libtool/libtool/prefix.patch              | 98 -------------------
 .../libtool/nativesdk-libtool_2.4.6.bb        |  6 +-
 4 files changed, 11 insertions(+), 108 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/prefix.patch
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +2 -2
index 4a43867b3ec..4448373afc4 100644
@@ -1,7 +1,7 @@
 require libtool-${PV}.inc
 
 PACKAGES = ""
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 datadir = "${STAGING_DIR_TARGET}${target_datadir}"
@@ -22,15 +22,16 @@ do_configure:prepend () {
 # Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
 #
 do_install () {
+       ln -s false ${D}
        install -d ${D}${bindir_crossscripts}/
-       install -m 0755 ${HOST_SYS}-libtool

${D}${bindir_crossscripts}/${HOST_SYS}-libtool

meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +1 -2
+       install -m 0755 libtool ${D}${bindir_crossscripts}/libtool
        sed -e 's@^\(predep_objects="\).*@\1"@' \
            -e 's@^\(postdep_objects="\).*@\1"@' \
            -e 's@^CC="ccache.@CC="@' \
            -e 's@^LTCC="ccache.@LTCC="@' \
-           -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-       sed -i '/^archive_cmds=/s/\-nostdlib//g'

${D}${bindir_crossscripts}/${HOST_SYS}-libtool
- sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g'
${D}${bindir_crossscripts}/${HOST_SYS}-libtool

meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +2 -0
+           -i ${D}${bindir_crossscripts}/libtool
+       sed -i '/^archive_cmds=/s/\-nostdlib//g'

${D}${bindir_crossscripts}/libtool
+ sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g'
${D}${bindir_crossscripts}/libtool

        GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize
Quoted 1 line

${D}${bindir_crossscripts}/libtoolize

        chmod 0755 ${D}${bindir_crossscripts}/libtoolize
        install -d ${D}${target_datadir}/libtool/build-aux/
meta/recipes-devtools/libtool/libtool-native_2.4.6.bb +1 -2
index 3b20ce3e69f..c68527f2609 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 DEPENDS = ""
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 
 inherit native
 
@@ -18,5 +18,5 @@ do_configure:prepend () {
 do_install () {
        autotools_do_install
        install -d ${D}${bindir}/
-       install -m 0755 ${HOST_SYS}-libtool

${D}${bindir}/${HOST_SYS}-libtool

meta/recipes-devtools/libtool/libtool-native_2.4.6.bb +1 -0
+       install -m 0755 libtool ${D}${bindir}/libtool
 }
meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -35
deleted file mode 100644
index a73df2e4a7a..00000000000
@@ -1,98 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
-it can't be confused with the host libtool.
-
-Originally by: RP
-
-Updated: Date: 2010/06/28
-Nitin A Kamble <[email protected]>
-
-It also adjusts libtool so that the header at the script is used for
-script execution and not thevalue of $SHELL. This is because many
-Makefiles change $SHELL so dash can get used to execute what is
-otherwise configured as a bash shell script. Since we don't need to
-execute scipts this way on any system I'm aware of us building upon,
-the simplest fix is just to remove $SHELL.
-
-Updated: Date: 2011/11/09
-RP
-
-Updated by: Robert Yang <[email protected]>
-
-diff --git a/Makefile.am b/Makefile.am
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -31,7 +31,7 @@ SUBDIRS                      = .
- DIST_SUBDIRS          = $(SUBDIRS)
- EXTRA_DIST            =
-
--BUILT_SOURCES         = libtool libtoolize
-+BUILT_SOURCES         = $(host_alias)-libtool libtoolize
-
- CLEANFILES            =
- MOSTLYCLEANFILES      =
-@@ -67,7 +67,7 @@ build_scripts        =

$(srcdir)/$(aux_dir)/announce-gen \
-
- EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk
maint.mk \

meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -25
-                 GNUmakefile
--CLEANFILES     += libtool libtoolize
-+CLEANFILES     += $(host_alias)-libtool libtoolize
-
- ## If a file is named several times below, and especially if it
- ## is a distributed file created during Libtool bootstrap, we
-@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
-       -e 's|@srcdir\@|$(srcdir)|g'
-
- # The libtool distributor and the standalone libtool script.
--bin_SCRIPTS = libtool
-+bin_SCRIPTS = $(host_alias)-libtool
-
- libtoolize: $(libtoolize_in) $(config_status)
-       $(AM_V_at)rm -f '$@'
-@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
- # We used to do this with a 'stamp-vcl' file, but non-gmake builds
- # would rerun configure on every invocation, so now we manually
- # check the version numbers from the build rule when necessary.
--libtool: $(ltmain_sh) $(config_status) $(dotversion)
-+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
-       @$(rebuild); \
-       if test -f '$@'; then \
-         eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
-@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)"

CFLAGS="$(CFLAGS)" \

meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -9
-
- BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
-       LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
--      LIBTOOL="$(abs_top_builddir)/libtool" \
-+      LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
-       tst_aclocaldir="$(abs_top_srcdir)/m4"
-
- INSTALLCHECK_ENVIRONMENT = \
-       LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED)

'$(program_transform_name)'`" \
-- LIBTOOL="$(bindir)/`echo libtool |$(SED)
'$(program_transform_name)'`" \
-+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED)
'$(program_transform_name)'`" \

meta/recipes-devtools/libtool/libtool/prefix.patch deleted +0 -25
-       LTDLINCL="-I$(includedir)" \
-       LIBLTDL="$(libdir)/libltdl.la" \
-       tst_aclocaldir="$(aclocaldir)"
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
- LIBTOOL_DEPS=$ltmain
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(top_builddir)'
-+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
- AC_SUBST(LIBTOOL)dnl
-
- _LT_SETUP
-@@ -199,7 +200,7 @@ aix3*)
- esac
-
- # Global variables:
--ofile=libtool
-+ofile=${host_alias}-libtool
- can_build_shared=yes
-
- # All known linkers require a '.a' archive for static linking (except

MSVC,

meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb +2 -3
index e3ad6721fdf..cede2092db0 100644
@@ -2,7 +2,7 @@ require libtool-${PV}.inc
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
 
-SRC_URI += "file://prefix.patch"
+#SRC_URI += "file://prefix.patch"
 SRC_URI += "file://fixinstall.patch"
 
 inherit nativesdk
@@ -20,12 +20,12 @@ do_configure:prepend () {
 do_install () {
        autotools_do_install
        install -d ${D}${bindir}/
-       install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/
+       install -m 0755 libtool ${D}${bindir}/
 }
 
 SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
 
 libtoolnativesdk_sysroot_preprocess () {
        install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
-       install -m 755 ${D}${bindir}/${HOST_SYS}-libtool

${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool
+ install -m 755 ${D}${bindir}/libtool
${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool
}
--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#159530):
https://lists.openembedded.org/g/openembedded-core/message/159530
Mute This Topic: https://lists.openembedded.org/mt/87636630/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#14 lore raw
Quoted 1 line · Khem Raj

Does it mean that it can now run original libtool script accidentally which is pregenerated part of package which may be not what we want

Not really, if we run libtoolize then we replace any existing libtool binary. If we don't run libtoolize then there isn't our binary in the first place. Also, libtool-cross/libtool-native provide our libtool binary on $PATH.

Ross

#15 lore raw
In reply to Ross Burton
Quoted 14 lines · Ross Burton

Typically libtool installs the binary to 'libtool' in the source tree, but we've got patches to rename this to ${host_sys}-libtool. As this isn't standard any upstream that don't respect the LIBTOOL variable need to be told explicitly where libtool is, which is a long-term maintenance burden for us on top of the initial libtool patches.

The reasoning for this renaming appears to stem from the design to be sure that we're using our new/patched libtool and not the host's binary. However, now that we have HOSTTOOLS, there's no way to run the host libtool so this argument is moot.

This patch removes the libtool renaming, follow-up patches remove the required modifications from the rest of the recipes.

Quoted 8 lines
---
 .../libtool/libtool-cross_2.4.6.bb            | 11 ++-
 .../libtool/libtool-native_2.4.6.bb           |  4 +-
 .../libtool/libtool/prefix.patch              | 98 -------------------
 .../libtool/nativesdk-libtool_2.4.6.bb        |  6 +-
 4 files changed, 11 insertions(+), 108 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/prefix.patch

Whilst this was an RFC I've gone ahead and merged this as I think it is time to clean this up, the reasons for having it are mostly historical at this point.

I did remove the commented lines this patch left too.

Cheers,

Richard

#16 lore raw
Quoted 25 lines · Richard Purdie
Quoted 14 lines · Ross Burton

Typically libtool installs the binary to 'libtool' in the source tree, but we've got patches to rename this to ${host_sys}-libtool. As this isn't standard any upstream that don't respect the LIBTOOL variable need to be told explicitly where libtool is, which is a long-term maintenance burden for us on top of the initial libtool patches.

The reasoning for this renaming appears to stem from the design to be sure that we're using our new/patched libtool and not the host's binary. However, now that we have HOSTTOOLS, there's no way to run the host libtool so this argument is moot.

This patch removes the libtool renaming, follow-up patches remove the required modifications from the rest of the recipes.

Quoted 8 lines
---
 .../libtool/libtool-cross_2.4.6.bb            | 11 ++-
 .../libtool/libtool-native_2.4.6.bb           |  4 +-
 .../libtool/libtool/prefix.patch              | 98 -------------------
 .../libtool/nativesdk-libtool_2.4.6.bb        |  6 +-
 4 files changed, 11 insertions(+), 108 deletions(-)
 delete mode 100644 meta/recipes-devtools/libtool/libtool/prefix.patch
Quoted 4 lines

Whilst this was an RFC I've gone ahead and merged this as I think it is time to clean this up, the reasons for having it are mostly historical at this point.

I did remove the commented lines this patch left too.

I think there still are some regressions to look into e.g. when building with clang

https://errors.yoctoproject.org/Errors/Details/619251/
This is because libtool-cross stages a version of libtool ( recipe-sysroot/usr/bin/crossscripts/libtool )
which now has build time paths coded into it e.g. some paths seen I
have listed below. Some packages e.g. srecord picks them up verbatim ( via postdeps) and fails to find the compiler rt.
since its now looking for this into libtool-cross'es build dir instead of looking into its own.

compiler_lib_search_dirs="/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot-native/usr/bin/../lib/riscv32-yoe-linux /mnt/b/yoe/master/build/tmp/work/
riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot/usr/lib/riscv32-yoe-linux/11.2.0 /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot//usr/lib/r
iscv32-yoe-linux
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot//lib /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/rec
ipe-sysroot//usr/lib"

# Dependencies to place before and after the objects being linked to

# create a shared library.
predep_objects=""
postdep_objects=""
predeps=""
postdeps="-lc++ -lm
/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot/usr/lib/clang/13.0.1/lib/linux/libclang_rt.builtins-riscv32.a
-l:libunwind.so -
lc /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot/usr/lib/clang/13.0.1/lib/linux/libclang_rt.builtins-riscv32.a
-l:libunwind.so"

# The library search path used internally by the compiler when linking

# a shared library.
compiler_lib_search_path="-L/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot-native/usr/bin/../lib/riscv32-yoe-linux
-L/mnt/b/yoe/master/build/tmp/w
ork/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot/usr/lib/riscv32-yoe-linux/11.2.0
-L/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot//usr
/lib/riscv32-yoe-linux
-L/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.4.6-r0/recipe-sysroot//lib
-L/mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/libtool-cross/2.
4.6-r0/recipe-sysroot//usr/lib"
Quoted 14 lines

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#159588): https://lists.openembedded.org/g/openembedded-core/message/159588
Mute This Topic: https://lists.openembedded.org/mt/87636630/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-