summaryrefslogtreecommitdiffstats
path: root/tools/libtool
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2021-09-24 14:28:20 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2023-03-13 22:53:41 +0100
commita22c54e39f8cb668ea5d717a51359fe2409fa336 (patch)
treeb60f47eddcaae88b37267f884ebcf27944e88717 /tools/libtool
parentefe56a51bcd0b2c2db39c682e88fb166a2431727 (diff)
downloadopenwrt-a22c54e39f8cb668ea5d717a51359fe2409fa336.tar.gz
openwrt-a22c54e39f8cb668ea5d717a51359fe2409fa336.tar.bz2
openwrt-a22c54e39f8cb668ea5d717a51359fe2409fa336.zip
tools/libtool: fix hard-coded paths
libtoolize hardcodes some paths. This is fine when building libtool and then using it (for example in OpenWrt's buildroot). But when using an SDK the paths are most likely different. For example, when building util-linux within an SDK we're greeted with the following message: libtoolize: error: $pkgauxdir is not a directory: '/path/to/openwrt/staging_dir/host/share/libtool/build-aux' This is because staging_dir/host/bin/libtoolize contains the following hard-coded paths from when the SDK was built in the first place: prefix="/path/to/openwrt/staging_dir/host" datadir="/path/to/openwrt/staging_dir/host/share" pkgauxdir="/path/to/openwrt/staging_dir/host/share/libtool/build-aux" pkgltdldir="/path/to/openwrt/staging_dir/host/share/libtool" aclocaldir="/path/to/openwrt/staging_dir/host/share/aclocal" This commits updates 000-relocatable.patch to correct the paths, relative to "$STAGING_DIR_HOST". Ref: 96e05e2e3 ("libtool: Revert "libtool: bump to 2.4.6"") Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net> [adapted to older libtool version before bumping, use STAGING_DIR_HOST] Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'tools/libtool')
-rw-r--r--tools/libtool/patches/000-relocatable.patch34
1 files changed, 22 insertions, 12 deletions
diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch
index 6ac293afbe..f4d5b47677 100644
--- a/tools/libtool/patches/000-relocatable.patch
+++ b/tools/libtool/patches/000-relocatable.patch
@@ -66,48 +66,58 @@ Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}
-@@ -2487,10 +2494,17 @@ func_check_macros ()
+@@ -2486,11 +2493,21 @@ func_check_macros ()
+ all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
# Locations for important files:
- prefix=@prefix@
+- prefix=@prefix@
- datadir=@datadir@
- pkgdatadir=@pkgdatadir@
- pkgltdldir=@pkgdatadir@
- aclocaldir=@aclocaldir@
+ if test -n "$STAGING_DIR_HOST"; then
++ prefix="$STAGING_DIR_HOST"
+ datadir="$STAGING_DIR_HOST/share"
++ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux"
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool"
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool"
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal"
+ else
-+ datadir=@datadir@
-+ pkgdatadir=@pkgdatadir@
-+ pkgltdldir=@pkgdatadir@
-+ aclocaldir=@aclocaldir@
++ prefix="@prefix@"
++ datadir="@datadir@"
++ pkgauxdir="@pkgauxdir@"
++ pkgdatadir="@pkgdatadir@"
++ pkgltdldir="@pkgdatadir@"
++ aclocaldir="@aclocaldir@"
+ fi
auxdir=
macrodir=
configure_ac=configure.in
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
-@@ -1453,10 +1453,17 @@ func_check_macros ()
+@@ -1452,11 +1452,21 @@ func_check_macros ()
+ all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
# Locations for important files:
- prefix=@prefix@
+- prefix=@prefix@
- datadir=@datadir@
- pkgdatadir=@pkgdatadir@
- pkgltdldir=@pkgdatadir@
- aclocaldir=@aclocaldir@
+ if test -n "$STAGING_DIR_HOST"; then
++ prefix="$STAGING_DIR_HOST"
+ datadir="$STAGING_DIR_HOST/share"
++ pkgauxdir="$STAGING_DIR_HOST/share/libtool/build-aux"
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool"
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool"
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal"
+ else
-+ datadir=@datadir@
-+ pkgdatadir=@pkgdatadir@
-+ pkgltdldir=@pkgdatadir@
-+ aclocaldir=@aclocaldir@
++ prefix="@prefix@"
++ datadir="@datadir@"
++ pkgauxdir="@pkgauxdir@"
++ pkgdatadir="@pkgdatadir@"
++ pkgltdldir="@pkgdatadir@"
++ aclocaldir="@aclocaldir@"
+ fi
auxdir=
macrodir=