Advertisement
ReillyBrogan

0001-Solus-only-Instruct-ldd-to-ignore-hwcaps-libs.patch

Mar 4th, 2024
277
0
122 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.17 KB | None | 0 0
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Reilly Brogan <reilly@reillybrogan.com>
  3. Date: Mon, 4 Mar 2024 15:10:18 -0600
  4. Subject: [PATCH] Solus-only: Instruct ldd to ignore hwcaps libs
  5.  
  6. Using a glibc tunable we can tell glibc to essentially ignore all hwcap libs.
  7. ---
  8. nuitka/freezer/DllDependenciesPosix.py | 3 ++-
  9.  1 file changed, 2 insertions(+), 1 deletion(-)
  10.  
  11. diff --git a/nuitka/freezer/DllDependenciesPosix.py b/nuitka/freezer/DllDependenciesPosix.py
  12. index 9e27270e8..12e73bc40 100644
  13. --- a/nuitka/freezer/DllDependenciesPosix.py
  14. +++ b/nuitka/freezer/DllDependenciesPosix.py
  15. @@ -79,7 +79,8 @@ def detectBinaryPathDLLsPosix(dll_filename, package_name, original_dir):
  16.          )
  17.      ):
  18.          # TODO: Check exit code, should never fail.
  19. -        stdout, stderr, _exit_code = executeProcess(command=("ldd", dll_filename))
  20. +        with withEnvironmentPathAdded("GLIBC_TUNABLES", "glibc.cpu.hwcaps=-AVX,-AVX2,-AVX512BW,-AVX512DQ,-AVX512F,-AVX512VL,-BMI1,-BMI2,-LZCNT,-MOVBE,-RTM,-SSE4_1,-SSE4_2,-SSSE3"):
  21. +            stdout, stderr, _exit_code = executeProcess(command=("ldd", dll_filename))
  22.  
  23.      stderr = b"\n".join(
  24.          line
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement