diff mbox

[v5,12/19] infra-libtool: no longer prepend STAGING_DIR to libdir

Message ID 1482241596-31688-13-git-send-email-jezz@sysmic.org
State Changes Requested
Headers show

Commit Message

Jérôme Pouiller Dec. 20, 2016, 1:46 p.m. UTC
Since `$lt_sysroot' is now correctly filled, it is no more necessary to patch
`.la' files. Indeed, if $libdir point to `/usr/lib', libtool will also search
in `$(lt_sysroot)/usr/lib'

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
 package/pkg-generic.mk | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Arnout Vandecappelle March 18, 2017, 3:37 p.m. UTC | #1
Hi Jerome,

On 20-12-16 14:46, Jérôme Pouiller wrote:
> Since `$lt_sysroot' is now correctly filled, it is no more necessary to patch
> `.la' files. Indeed, if $libdir point to `/usr/lib', libtool will also search
> in `$(lt_sysroot)/usr/lib'

 Unfortunately, not all packages that use libtool also use automake. So some
packages may die because of this.

 That said, we should probably just fix these individual packages.

 (Not yet giving my reviewed-by, I'm first going to check the rest of the series.)

 Regards,
 Arnout

> 
> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
> ---
>  package/pkg-generic.mk | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 827de62..5d12ac3 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -268,17 +268,6 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
>  				-e "s,@BASE_DIR@,$(BASE_DIR),g" \
>  				$(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
>  	fi
> -	@$(call MESSAGE,"Fixing libtool files")
> -	$(Q)find $(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
> -		$(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \
> -			-e "s:$(STAGING_DIR):@STAGING_DIR@:g" \
> -			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
> -				-e "s:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:g") \
> -			-e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \
> -			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
> -				-e "s:@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):g") \
> -			-e "s:@STAGING_DIR@:$(STAGING_DIR):g" \
> -			-e "s:@BASE_DIR@:$(BASE_DIR):g"
>  	@$(call step_end,install-staging)
>  	$(Q)touch $@
>  
>
Arnout Vandecappelle March 18, 2017, 5:22 p.m. UTC | #2
On 20-12-16 14:46, Jérôme Pouiller wrote:
> Since `$lt_sysroot' is now correctly filled, it is no more necessary to patch
> `.la' files. Indeed, if $libdir point to `/usr/lib', libtool will also search
                                       ^s
> in `$(lt_sysroot)/usr/lib'
> 
> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>


Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(tested on a static arm musl build with about 20 packages)


 Regards,
 Arnout

> ---
>  package/pkg-generic.mk | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 827de62..5d12ac3 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -268,17 +268,6 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
>  				-e "s,@BASE_DIR@,$(BASE_DIR),g" \
>  				$(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
>  	fi
> -	@$(call MESSAGE,"Fixing libtool files")
> -	$(Q)find $(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
> -		$(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \
> -			-e "s:$(STAGING_DIR):@STAGING_DIR@:g" \
> -			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
> -				-e "s:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:g") \
> -			-e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \
> -			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
> -				-e "s:@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):g") \
> -			-e "s:@STAGING_DIR@:$(STAGING_DIR):g" \
> -			-e "s:@BASE_DIR@:$(BASE_DIR):g"
>  	@$(call step_end,install-staging)
>  	$(Q)touch $@
>  
>
Jérôme Pouiller March 22, 2017, 10:21 a.m. UTC | #3
Hello Anrout,

On Saturday 18 March 2017 16:37:31 CET Arnout Vandecappelle wrote:
>  Hi Jerome,
> 
> On 20-12-16 14:46, Jérôme Pouiller wrote:
> > Since `$lt_sysroot' is now correctly filled, it is no more necessary to patch
> > `.la' files. Indeed, if $libdir point to `/usr/lib', libtool will also search
> > in `$(lt_sysroot)/usr/lib'
> 
>  Unfortunately, not all packages that use libtool also use automake.

You mean autoconf? Do you have an example of this?

>  So some packages may die because of this.
>
>  That said, we should probably just fix these individual packages.

yes, I think it very unusual.
Arnout Vandecappelle March 22, 2017, 11:19 a.m. UTC | #4
On 22-03-17 11:21, Jérôme Pouiller wrote:
> Hello Anrout,
> 
> On Saturday 18 March 2017 16:37:31 CET Arnout Vandecappelle wrote:
>>  Hi Jerome,
>>
>> On 20-12-16 14:46, Jérôme Pouiller wrote:
>>> Since `$lt_sysroot' is now correctly filled, it is no more necessary to patch
>>> `.la' files. Indeed, if $libdir point to `/usr/lib', libtool will also search
>>> in `$(lt_sysroot)/usr/lib'
>>
>>  Unfortunately, not all packages that use libtool also use automake.
> 
> You mean autoconf? Do you have an example of this?

 No, I mean automake. If it's not using autoconf that it shouldn't even be an
autotools-package, and we don't apply the libtool patches.

 IIUC, the --with-sysroot option is going to be substituted in the Makefiles
with an extra option to libtool. However, if a package is not using automake, it
is possible that that extra option doesn't get propagated. I think.


 Regards,
 Arnout

> 
>>  So some packages may die because of this.
>>
>>  That said, we should probably just fix these individual packages.
> 
> yes, I think it very unusual.
> 
>
diff mbox

Patch

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 827de62..5d12ac3 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -268,17 +268,6 @@  $(BUILD_DIR)/%/.stamp_staging_installed:
 				-e "s,@BASE_DIR@,$(BASE_DIR),g" \
 				$(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
 	fi
-	@$(call MESSAGE,"Fixing libtool files")
-	$(Q)find $(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
-		$(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \
-			-e "s:$(STAGING_DIR):@STAGING_DIR@:g" \
-			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
-				-e "s:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:g") \
-			-e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \
-			$(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\
-				-e "s:@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):g") \
-			-e "s:@STAGING_DIR@:$(STAGING_DIR):g" \
-			-e "s:@BASE_DIR@:$(BASE_DIR):g"
 	@$(call step_end,install-staging)
 	$(Q)touch $@