This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=a081eb9d9ea73f03a78e5b47d12457b08f3270e4

commit a081eb9d9ea73f03a78e5b47d12457b08f3270e4
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Jul 10 05:31:55 2025 +0200

    Dpkg::Shlibs: Remove DEB_TARGET_ARCH handling from setup_library_paths()
    
    This code was always wrong, but was added at the time to workaround
    missing cross-compilation support in gcc packaging in ancient Debian
    versions, that had not been updated to use the expected variables.
    
    This has not been an issue for a long time now, and it is actually
    posing problems with cross-building for different operating systems.
    
    Reported-by: Helmut Grohne <[email protected]>
---
 scripts/Dpkg/Shlibs.pm | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm
index 3f04e416e..cc9a4e551 100644
--- a/scripts/Dpkg/Shlibs.pm
+++ b/scripts/Dpkg/Shlibs.pm
@@ -129,22 +129,10 @@ sub setup_library_paths {
         }
     }
 
-    # Adjust set of directories to consider when we're in a situation of a
-    # cross-build or a build of a cross-compiler.
-    my $multiarch;
-
-    # Detect cross compiler builds.
-    if ($ENV{DEB_TARGET_GNU_TYPE} and
-        ($ENV{DEB_TARGET_GNU_TYPE} ne $ENV{DEB_BUILD_GNU_TYPE}))
-    {
-        $multiarch = gnutriplet_to_multiarch($ENV{DEB_TARGET_GNU_TYPE});
-    }
-    # Host for normal cross builds.
+    # Adjust set of directories to consider during cross builds.
     if (get_build_arch() ne get_host_arch()) {
-        $multiarch = debarch_to_multiarch(get_host_arch());
-    }
-    # Define list of directories containing crossbuilt libraries.
-    if ($multiarch) {
+        my $multiarch = debarch_to_multiarch(get_host_arch());
+
         push @system_librarypaths, "/lib/$multiarch", "/usr/lib/$multiarch";
     }
 

-- 
Dpkg.Org's dpkg

Reply via email to