From patchwork Tue Dec 20 13:46:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 707446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tjfJd69P2z9t0m for ; Wed, 21 Dec 2016 00:48:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E06D52EE58; Tue, 20 Dec 2016 13:48:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJyG35PST85E; Tue, 20 Dec 2016 13:48:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9ACD42FF33; Tue, 20 Dec 2016 13:47:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B1D9A1BFA57 for ; Tue, 20 Dec 2016 13:46:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AEB82820B8 for ; Tue, 20 Dec 2016 13:46:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6AJo32sWKIh3 for ; Tue, 20 Dec 2016 13:46:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0CE5F82122 for ; Tue, 20 Dec 2016 13:46:56 +0000 (UTC) Received: from lupi.online.net (sysmic.org [62.210.89.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id BFC4243060; Tue, 20 Dec 2016 14:46:52 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Tue, 20 Dec 2016 14:46:30 +0100 Message-Id: <1482241596-31688-14-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1482241596-31688-1-git-send-email-jezz@sysmic.org> References: <1482241596-31688-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: Thomas Petazzoni , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH v5 13/19] infra-libtool: correctly prefix $libdir with $STAGING_DIR X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Until now Builroot patched libtool in order to ignore `$libdir' provided by .la file. It used the path where it found the .la instead of `$libdir'. However, since v1.5 libtool correctly prepend sysroot to `$libdir' as we can see a few lines below patched lines: func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" (in fact, this line just prepend '=', and '=' is substituted later) Signed-off-by: Jérôme Pouiller Acked-by: Arnout Vandecappelle (Essensium/Mind) --- support/libtool/buildroot-libtool-v1.5.patch | 32 ++------------------------ support/libtool/buildroot-libtool-v2.2.patch | 30 +----------------------- support/libtool/buildroot-libtool-v2.4.4.patch | 11 --------- support/libtool/buildroot-libtool-v2.4.patch | 11 --------- 4 files changed, 3 insertions(+), 81 deletions(-) diff --git a/support/libtool/buildroot-libtool-v1.5.patch b/support/libtool/buildroot-libtool-v1.5.patch index cdd9c5a..609006a 100644 --- a/support/libtool/buildroot-libtool-v1.5.patch +++ b/support/libtool/buildroot-libtool-v1.5.patch @@ -34,24 +34,7 @@ if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" -@@ -2146,8 +2153,14 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - else - dir="$ladir/$objdir" -@@ -2272,7 +2285,7 @@ +@@ -2272,7 +2279,7 @@ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" @@ -60,18 +43,7 @@ fi # This is a shared library -@@ -5169,6 +5182,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -@@ -5487,10 +5504,13 @@ +@@ -5487,10 +5494,13 @@ # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. diff --git a/support/libtool/buildroot-libtool-v2.2.patch b/support/libtool/buildroot-libtool-v2.2.patch index 8bb7826..3af0604 100644 --- a/support/libtool/buildroot-libtool-v2.2.patch +++ b/support/libtool/buildroot-libtool-v2.2.patch @@ -67,24 +67,7 @@ # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects -@@ -5739,8 +5738,14 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5891,7 +5896,7 @@ +@@ -5891,7 +5890,7 @@ *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" @@ -93,14 +76,3 @@ fi ;; esac -@@ -8373,6 +8378,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.4.patch b/support/libtool/buildroot-libtool-v2.4.4.patch index bcdf30c..d71669b 100644 --- a/support/libtool/buildroot-libtool-v2.4.4.patch +++ b/support/libtool/buildroot-libtool-v2.4.4.patch @@ -82,14 +82,3 @@ Signed-off-by: Gustavo Zacarias fi ;; esac -@@ -10710,6 +10710,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.patch b/support/libtool/buildroot-libtool-v2.4.patch index f610b1b..bf40c94 100644 --- a/support/libtool/buildroot-libtool-v2.4.patch +++ b/support/libtool/buildroot-libtool-v2.4.patch @@ -76,14 +76,3 @@ fi ;; esac -@@ -9275,6 +9274,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib"