From: Sebastian Kemper Date: Fri, 24 Sep 2021 12:28:20 +0000 (+0200) Subject: tools/libtool: fix hard-coded paths X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a22c54e39f8cb668ea5d717a51359fe2409fa336;p=openwrt%2Fstaging%2Fblogic.git 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 [adapted to older libtool version before bumping, use STAGING_DIR_HOST] Signed-off-by: Michael Pratt --- diff --git a/tools/libtool/patches/000-relocatable.patch b/tools/libtool/patches/000-relocatable.patch index 6ac293afbe5a..f4d5b4767751 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 : ${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=