diff --git a/3.10/bullseye/Dockerfile b/3.10/bullseye/Dockerfile index 9ebf62473..331d9e488 100644 --- a/3.10/bullseye/Dockerfile +++ b/3.10/bullseye/Dockerfile @@ -54,7 +54,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.10/buster/Dockerfile b/3.10/buster/Dockerfile index 5e200cfa5..1854da855 100644 --- a/3.10/buster/Dockerfile +++ b/3.10/buster/Dockerfile @@ -54,7 +54,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.11-rc/bullseye/Dockerfile b/3.11-rc/bullseye/Dockerfile index bf7d88c7c..05348e501 100644 --- a/3.11-rc/bullseye/Dockerfile +++ b/3.11-rc/bullseye/Dockerfile @@ -54,7 +54,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.11-rc/buster/Dockerfile b/3.11-rc/buster/Dockerfile index 3fce4115b..6adac4d57 100644 --- a/3.11-rc/buster/Dockerfile +++ b/3.11-rc/buster/Dockerfile @@ -54,7 +54,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.7/bullseye/Dockerfile b/3.7/bullseye/Dockerfile index 6370c9591..08d0fada3 100644 --- a/3.7/bullseye/Dockerfile +++ b/3.7/bullseye/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ # setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ diff --git a/3.7/buster/Dockerfile b/3.7/buster/Dockerfile index f3a13363a..8a5159625 100644 --- a/3.7/buster/Dockerfile +++ b/3.7/buster/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ # setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \ test_array \ diff --git a/3.8/bullseye/Dockerfile b/3.8/bullseye/Dockerfile index b5b6ab7b6..eda4387c3 100644 --- a/3.8/bullseye/Dockerfile +++ b/3.8/bullseye/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.8/buster/Dockerfile b/3.8/buster/Dockerfile index fa5a647ef..4792cdaa0 100644 --- a/3.8/buster/Dockerfile +++ b/3.8/buster/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.9/bullseye/Dockerfile b/3.9/bullseye/Dockerfile index 65a0cfd00..d2fb4dde0 100644 --- a/3.9/bullseye/Dockerfile +++ b/3.9/bullseye/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/3.9/buster/Dockerfile b/3.9/buster/Dockerfile index 5d2083359..0fa56c72d 100644 --- a/3.9/buster/Dockerfile +++ b/3.9/buster/Dockerfile @@ -53,7 +53,6 @@ RUN set -eux; \ ; \ nproc="$(nproc)"; \ make -j "$nproc" \ - LDFLAGS="-Wl,--strip-all" \ ; \ make install; \ cd /; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index e5d2529f0..f2e445a6d 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -170,7 +170,9 @@ RUN set -eux; \ # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \ {{ ) else "" end -}} +{{ if is_slim or is_alpine then ( -}} LDFLAGS="-Wl,--strip-all" \ +{{ ) else "" end -}} {{ if env.version == "3.7" then ( -}} # setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 PROFILE_TASK='-m test.regrtest --pgo \