summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-12-10 14:22:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-12 18:10:22 +0000
commitebf34d5b252cc9bec3ba97039807e2fa03dcfbe2 (patch)
tree5ee9c87516fbddbf94b8259eddeda6d8161daff3
parent14cb87f9ae89a7113fd8d660925d2d3ede470be3 (diff)
downloadpoky-ebf34d5b252cc9bec3ba97039807e2fa03dcfbe2.tar.gz
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. [RP: Remove commented patch lines] (From OE-Core rev: 4b308773eca7570ce5007e8f953b56252c17fdb1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb10
-rw-r--r--meta/recipes-devtools/libtool/libtool-native_2.4.6.bb4
-rw-r--r--meta/recipes-devtools/libtool/libtool/prefix.patch98
-rw-r--r--meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb5
4 files changed, 8 insertions, 109 deletions
diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 4a43867b3e..93f1dd7825 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -1,7 +1,6 @@
1require libtool-${PV}.inc 1require libtool-${PV}.inc
2 2
3PACKAGES = "" 3PACKAGES = ""
4SRC_URI += "file://prefix.patch"
5SRC_URI += "file://fixinstall.patch" 4SRC_URI += "file://fixinstall.patch"
6 5
7datadir = "${STAGING_DIR_TARGET}${target_datadir}" 6datadir = "${STAGING_DIR_TARGET}${target_datadir}"
@@ -22,15 +21,16 @@ do_configure:prepend () {
22# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc" 21# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
23# 22#
24do_install () { 23do_install () {
24 ln -s false ${D}
25 install -d ${D}${bindir_crossscripts}/ 25 install -d ${D}${bindir_crossscripts}/
26 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool 26 install -m 0755 libtool ${D}${bindir_crossscripts}/libtool
27 sed -e 's@^\(predep_objects="\).*@\1"@' \ 27 sed -e 's@^\(predep_objects="\).*@\1"@' \
28 -e 's@^\(postdep_objects="\).*@\1"@' \ 28 -e 's@^\(postdep_objects="\).*@\1"@' \
29 -e 's@^CC="ccache.@CC="@' \ 29 -e 's@^CC="ccache.@CC="@' \
30 -e 's@^LTCC="ccache.@LTCC="@' \ 30 -e 's@^LTCC="ccache.@LTCC="@' \
31 -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool 31 -i ${D}${bindir_crossscripts}/libtool
32 sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool 32 sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
33 sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool 33 sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool
34 GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize 34 GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
35 chmod 0755 ${D}${bindir_crossscripts}/libtoolize 35 chmod 0755 ${D}${bindir_crossscripts}/libtoolize
36 install -d ${D}${target_datadir}/libtool/build-aux/ 36 install -d ${D}${target_datadir}/libtool/build-aux/
diff --git a/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
index 3b20ce3e69..19024f7830 100644
--- a/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool-native_2.4.6.bb
@@ -2,8 +2,6 @@ require libtool-${PV}.inc
2 2
3DEPENDS = "" 3DEPENDS = ""
4 4
5SRC_URI += "file://prefix.patch"
6
7inherit native 5inherit native
8 6
9EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}" 7EXTRA_OECONF = " --with-libtool-sysroot=${STAGING_DIR_NATIVE}"
@@ -18,5 +16,5 @@ do_configure:prepend () {
18do_install () { 16do_install () {
19 autotools_do_install 17 autotools_do_install
20 install -d ${D}${bindir}/ 18 install -d ${D}${bindir}/
21 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/${HOST_SYS}-libtool 19 install -m 0755 libtool ${D}${bindir}/libtool
22} 20}
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
deleted file mode 100644
index a73df2e4a7..0000000000
--- a/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ /dev/null
@@ -1,98 +0,0 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure
4it can't be confused with the host libtool.
5
6Originally by: RP
7
8Updated: Date: 2010/06/28
9Nitin A Kamble <nitin.a.kamble@intel.com>
10
11It also adjusts libtool so that the header at the script is used for
12script execution and not thevalue of $SHELL. This is because many
13Makefiles change $SHELL so dash can get used to execute what is
14otherwise configured as a bash shell script. Since we don't need to
15execute scipts this way on any system I'm aware of us building upon,
16the simplest fix is just to remove $SHELL.
17
18Updated: Date: 2011/11/09
19RP
20
21Updated by: Robert Yang <liezhi.yang@windriver.com>
22
23diff --git a/Makefile.am b/Makefile.am
24--- a/Makefile.am
25+++ b/Makefile.am
26@@ -31,7 +31,7 @@ SUBDIRS = .
27 DIST_SUBDIRS = $(SUBDIRS)
28 EXTRA_DIST =
29
30-BUILT_SOURCES = libtool libtoolize
31+BUILT_SOURCES = $(host_alias)-libtool libtoolize
32
33 CLEANFILES =
34 MOSTLYCLEANFILES =
35@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \
36
37 EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \
38 GNUmakefile
39-CLEANFILES += libtool libtoolize
40+CLEANFILES += $(host_alias)-libtool libtoolize
41
42 ## If a file is named several times below, and especially if it
43 ## is a distributed file created during Libtool bootstrap, we
44@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \
45 -e 's|@srcdir\@|$(srcdir)|g'
46
47 # The libtool distributor and the standalone libtool script.
48-bin_SCRIPTS = libtool
49+bin_SCRIPTS = $(host_alias)-libtool
50
51 libtoolize: $(libtoolize_in) $(config_status)
52 $(AM_V_at)rm -f '$@'
53@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status)
54 # We used to do this with a 'stamp-vcl' file, but non-gmake builds
55 # would rerun configure on every invocation, so now we manually
56 # check the version numbers from the build rule when necessary.
57-libtool: $(ltmain_sh) $(config_status) $(dotversion)
58+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion)
59 @$(rebuild); \
60 if test -f '$@'; then \
61 eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \
62@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
63
64 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \
65 LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \
66- LIBTOOL="$(abs_top_builddir)/libtool" \
67+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \
68 tst_aclocaldir="$(abs_top_srcdir)/m4"
69
70 INSTALLCHECK_ENVIRONMENT = \
71 LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \
72- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \
73+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \
74 LTDLINCL="-I$(includedir)" \
75 LIBLTDL="$(libdir)/libltdl.la" \
76 tst_aclocaldir="$(aclocaldir)"
77diff --git a/m4/libtool.m4 b/m4/libtool.m4
78--- a/m4/libtool.m4
79+++ b/m4/libtool.m4
80@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1])
81 LIBTOOL_DEPS=$ltmain
82
83 # Always use our own libtool.
84-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
85+LIBTOOL='$(top_builddir)'
86+LIBTOOL="$LIBTOOL/${host_alias}-libtool"
87 AC_SUBST(LIBTOOL)dnl
88
89 _LT_SETUP
90@@ -199,7 +200,7 @@ aix3*)
91 esac
92
93 # Global variables:
94-ofile=libtool
95+ofile=${host_alias}-libtool
96 can_build_shared=yes
97
98 # All known linkers require a '.a' archive for static linking (except MSVC,
diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
index e3ad6721fd..86c55ded7b 100644
--- a/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.4.6.bb
@@ -2,7 +2,6 @@ require libtool-${PV}.inc
2 2
3FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:" 3FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"
4 4
5SRC_URI += "file://prefix.patch"
6SRC_URI += "file://fixinstall.patch" 5SRC_URI += "file://fixinstall.patch"
7 6
8inherit nativesdk 7inherit nativesdk
@@ -20,12 +19,12 @@ do_configure:prepend () {
20do_install () { 19do_install () {
21 autotools_do_install 20 autotools_do_install
22 install -d ${D}${bindir}/ 21 install -d ${D}${bindir}/
23 install -m 0755 ${HOST_SYS}-libtool ${D}${bindir}/ 22 install -m 0755 libtool ${D}${bindir}/
24} 23}
25 24
26SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess" 25SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess"
27 26
28libtoolnativesdk_sysroot_preprocess () { 27libtoolnativesdk_sysroot_preprocess () {
29 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ 28 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
30 install -m 755 ${D}${bindir}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/${HOST_SYS}-libtool 29 install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool
31} 30}