Fix linker optimisation in linux standalone tarballs
authorJoey Hess <joeyh@joeyh.name>
Thu, 7 Sep 2023 16:59:20 +0000 (12:59 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 7 Sep 2023 16:59:27 +0000 (12:59 -0400)
Was only symlinking when there is a usr/ directory, but with usr/ merge,
there are none.

Sponsored-by: Dartmouth College's Datalad project
Build/LinuxMkLibs.hs
CHANGELOG
doc/todo/the_same_path_looked_up_3_times_for_libpcre__42__.so/comment_3_89701d7011c3c9085afaab33aa16c39f._comment [new file with mode: 0644]

index 44cc32cb30903cdba825b05fbd252ce980dcff42..6a5f8dea01251b1d96ba39e17282eb4411228469 100644 (file)
@@ -85,7 +85,9 @@ consolidateUsrLib top libdirs = go [] libdirs
                                                renameFile src dst
                        symlinkHwCapDirs top d
                        go c rest
-               _ -> go (x:c) rest
+               _ -> do
+                       symlinkHwCapDirs top x
+                       go (x:c) rest
 
 {- The linker looks for optimised versions of libraries depending on the
  - hardware capabilities. That causes a lot of extra work searching for
index 04b4583bdd0630799dd126f0a2abb343beed3eef..b6e2757436c11a0f465d95ad666492c8129cdf9a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 git-annex (10.20230829) UNRELEASED; urgency=medium
 
   * Removed the vendored git-lfs and the GitLfs build flag.
+  * Fix linker optimisation in linux standalone tarballs.
 
  -- Joey Hess <id@joeyh.name>  Mon, 28 Aug 2023 13:10:17 -0400
 
diff --git a/doc/todo/the_same_path_looked_up_3_times_for_libpcre__42__.so/comment_3_89701d7011c3c9085afaab33aa16c39f._comment b/doc/todo/the_same_path_looked_up_3_times_for_libpcre__42__.so/comment_3_89701d7011c3c9085afaab33aa16c39f._comment
new file mode 100644 (file)
index 0000000..be04a64
--- /dev/null
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2023-09-07T16:50:20Z"
+ content="""
+I tracked this down: The /usr merge broke the optimisation,
+since it was symlinking the tls and hwcaps directories only
+when there was a /usr directory.
+
+Here I was seeing 3 failed stats for libpcre in a `git-annex version`
+and with the fix, it's down to 0.
+"""]]