-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
abidiff
to verify ABI compatibility
This should be both more reliable and more correct. 👍
- Loading branch information
Showing
6 changed files
with
72 additions
and
42 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
FROM buildpack-deps:{{ .debian.version }} | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
# install abigail-tools so we can use abidiff later to verify that we don't break Debian packages | ||
abigail-tools \ | ||
; \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# https://gcc.gnu.org/mirrors.html | ||
ENV GPG_KEYS \ | ||
# 1024D/745C015A 1999-11-09 Gerald Pfeifer <[email protected]> | ||
|
@@ -133,16 +141,10 @@ RUN set -ex; \ | |
ldconfig -v; \ | ||
# the libc created by gcc might be too old for a newer Debian | ||
# check that the Debian libstdc++ doesn't have newer requirements than the gcc one | ||
bash -Eeuo pipefail -xc ' \ | ||
deb="$(strings /usr/lib/*/libstdc++.so* | grep "^GLIBC" | sort -u)"; \ | ||
gcc="$(strings /usr/local/lib*/libstdc++.so | grep "^GLIBC" | sort -u)"; \ | ||
{{ if .debian.version == "bookworm" and (env.version | tonumber) >= 14 then ( -}} | ||
# https://github.com/docker-library/gcc/pull/103#issuecomment-2099134740 (using "comm" to avoid accidental partial matches / hairy "grep" regex) | ||
deb="$(comm -23 <(cat <<<"$deb") <(echo "GLIBC_2.16"))"; \ | ||
{{ ) else "" end -}} | ||
diff="$(comm -23 <(cat <<<"$deb") <(cat <<<"$gcc"))"; \ | ||
test -z "$diff"; \ | ||
' | ||
deb="$(readlink -ve /usr/lib/*/libstdc++.so* | head -1)"; \ | ||
gcc="$(readlink -ve /usr/local/lib*/libstdc++.so | head -1)"; \ | ||
# using LD_PRELOAD to make sure "abidiff" itself doesn't fail with the exact error we're trying to test for 😂😭 | ||
LD_PRELOAD="$deb" abidiff --no-added-syms "$deb" "$gcc" | ||
|
||
# ensure that alternatives are pointing to the new compiler and that old one is no longer used | ||
RUN set -ex; \ | ||
|