diff options
author | Benjamin Barenblat <bbaren@google.com> | 2022-01-31 16:58:42 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2022-01-31 16:58:42 -0500 |
commit | 8bd0ae5f71bfbbe3509f644cba58157810b65269 (patch) | |
tree | 401d928708cef25c002d87ebc0a0fe2161274dba | |
parent | ab52b3b9670a5bb555c148d9d5638a1a7fa3e877 (diff) |
Stop forcing -Wl,--as-needed on dependents
Commit 8081530e824c092d36b1ef7947783c5859eb8b61 added -Wl,--as-needed
-latomic -Wl,--no-as-needed to ensure libatomic got linked on platforms
that needed it (see https://bugs.debian.org/973492). However, this
inadventantly added -Wl,--no-as-needed to dependents’ link lines when
they built with CMake. Switch to -Wl,--push-state,--as-needed -latomic
-Wl,--pop-state instead to ensure dependents’ link settings remain
intact. As an added bonus, this removes -Wl,--as-needed from the Abseil
build itself, allowing a bunch of libraries that don’t actually need
libc to omit a libc dependency.
Closes: https://bugs.debian.org/1001596
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/libabsl20210324.lintian-overrides | 22 | ||||
-rw-r--r-- | debian/patches/latomic.diff | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index f69c9522..0347674f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ abseil (0~20210324.2-1) UNRELEASED; urgency=medium * Correct debian/watch search URLs to avoid picking up rc versions. * Mangle upstream version in debian/watch to match manual mangling in debian/changelog. + * Stop forcing -Wl,--no-as-needed on dependents. (Closes: #1001596) * Compute Thumb function bounds correctly. (Closes: #987314) * Reenable unit tests on arm64 and mips64el. diff --git a/debian/libabsl20210324.lintian-overrides b/debian/libabsl20210324.lintian-overrides index 7557abac..eda83e40 100644 --- a/debian/libabsl20210324.lintian-overrides +++ b/debian/libabsl20210324.lintian-overrides @@ -12,5 +12,27 @@ # License for the specific language governing permissions and limitations under # the License. +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_bad_any_cast_impl.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_bad_optional_access.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_bad_variant_access.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_exponential_biased.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_flags_commandlineflag.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_flags_commandlineflag_internal.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_hash.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_hashtablez_sampler.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_log_severity.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_periodic_sampler.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_random_internal_randen.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_random_internal_randen_hwaes_impl.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_random_internal_randen_slow.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_stacktrace.so* +libabsl20210324: library-not-linked-against-libc usr/lib/*/libabsl_throw_delegate.so* libabsl20210324: no-symbols-control-file usr/lib/*/libabsl_* libabsl20210324: package-name-doesnt-match-sonames libabsl-* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_city.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_flags.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_leak_check.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_leak_check_disable.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_random_internal_platform.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_random_internal_randen_hwaes.so* +libabsl20210324: shared-library-lacks-prerequisites usr/lib/*/libabsl_wyhash.so* diff --git a/debian/patches/latomic.diff b/debian/patches/latomic.diff index 404144e2..861f20bf 100644 --- a/debian/patches/latomic.diff +++ b/debian/patches/latomic.diff @@ -14,7 +14,7 @@ if anything needs libatomic and add the DT_NEEDED entry where necessary. endif() +list(APPEND ABSL_DEFAULT_LINKOPTS -+ "-Wl,--as-needed" "-latomic" "-Wl,--no-as-needed" ++ "-Wl,--push-state,--as-needed" "-latomic" "-Wl,--pop-state" +) + set(ABSL_CXX_STANDARD "${CMAKE_CXX_STANDARD}") |