diff --git a/3.10/alpine3.22/Dockerfile b/3.10/alpine3.22/Dockerfile index 9d8817fb7..36c6bc92e 100644 --- a/3.10/alpine3.22/Dockerfile +++ b/3.10/alpine3.22/Dockerfile @@ -82,7 +82,7 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -92,7 +92,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.10/alpine3.23/Dockerfile b/3.10/alpine3.23/Dockerfile index bbde97a6f..c38dc49a3 100644 --- a/3.10/alpine3.23/Dockerfile +++ b/3.10/alpine3.23/Dockerfile @@ -82,7 +82,7 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -92,7 +92,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.10/bookworm/Dockerfile b/3.10/bookworm/Dockerfile index 5d4e0db90..b9879f453 100644 --- a/3.10/bookworm/Dockerfile +++ b/3.10/bookworm/Dockerfile @@ -65,7 +65,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.10/slim-bookworm/Dockerfile b/3.10/slim-bookworm/Dockerfile index 9fac25174..e380e755a 100644 --- a/3.10/slim-bookworm/Dockerfile +++ b/3.10/slim-bookworm/Dockerfile @@ -81,7 +81,7 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -91,7 +91,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.10/slim-trixie/Dockerfile b/3.10/slim-trixie/Dockerfile index 9c27605a7..54f9a5e59 100644 --- a/3.10/slim-trixie/Dockerfile +++ b/3.10/slim-trixie/Dockerfile @@ -81,7 +81,7 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -91,7 +91,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.10/trixie/Dockerfile b/3.10/trixie/Dockerfile index a0b09dab9..d39e2857e 100644 --- a/3.10/trixie/Dockerfile +++ b/3.10/trixie/Dockerfile @@ -65,7 +65,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/alpine3.22/Dockerfile b/3.11/alpine3.22/Dockerfile index a88b9e328..e580e4efb 100644 --- a/3.11/alpine3.22/Dockerfile +++ b/3.11/alpine3.22/Dockerfile @@ -82,7 +82,7 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -92,7 +92,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/alpine3.23/Dockerfile b/3.11/alpine3.23/Dockerfile index 095e792f4..a83dd2e4d 100644 --- a/3.11/alpine3.23/Dockerfile +++ b/3.11/alpine3.23/Dockerfile @@ -82,7 +82,7 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -92,7 +92,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/bookworm/Dockerfile b/3.11/bookworm/Dockerfile index 6b9158d70..a02baff26 100644 --- a/3.11/bookworm/Dockerfile +++ b/3.11/bookworm/Dockerfile @@ -65,7 +65,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/slim-bookworm/Dockerfile b/3.11/slim-bookworm/Dockerfile index 9137579df..c979c6419 100644 --- a/3.11/slim-bookworm/Dockerfile +++ b/3.11/slim-bookworm/Dockerfile @@ -81,7 +81,7 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -91,7 +91,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/slim-trixie/Dockerfile b/3.11/slim-trixie/Dockerfile index 43add477a..6d346528c 100644 --- a/3.11/slim-trixie/Dockerfile +++ b/3.11/slim-trixie/Dockerfile @@ -81,7 +81,7 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -91,7 +91,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.11/trixie/Dockerfile b/3.11/trixie/Dockerfile index 4daf9651d..d9c93cb21 100644 --- a/3.11/trixie/Dockerfile +++ b/3.11/trixie/Dockerfile @@ -65,7 +65,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/alpine3.22/Dockerfile b/3.12/alpine3.22/Dockerfile index 3d5f9a26d..278eac91e 100644 --- a/3.12/alpine3.22/Dockerfile +++ b/3.12/alpine3.22/Dockerfile @@ -82,25 +82,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -110,7 +110,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/alpine3.23/Dockerfile b/3.12/alpine3.23/Dockerfile index 5ed1166d5..571036dfb 100644 --- a/3.12/alpine3.23/Dockerfile +++ b/3.12/alpine3.23/Dockerfile @@ -82,25 +82,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -110,7 +110,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/bookworm/Dockerfile b/3.12/bookworm/Dockerfile index 5f51a938b..904b2b946 100644 --- a/3.12/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -56,24 +56,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -83,7 +83,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile index 28ea81d7e..c8debe41a 100644 --- a/3.12/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -81,25 +81,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -109,7 +109,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/slim-trixie/Dockerfile b/3.12/slim-trixie/Dockerfile index f473b4619..b9ff939e4 100644 --- a/3.12/slim-trixie/Dockerfile +++ b/3.12/slim-trixie/Dockerfile @@ -81,25 +81,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -109,7 +109,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.12/trixie/Dockerfile b/3.12/trixie/Dockerfile index c384b1a45..d2b592bae 100644 --- a/3.12/trixie/Dockerfile +++ b/3.12/trixie/Dockerfile @@ -56,24 +56,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -83,7 +83,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/alpine3.22/Dockerfile b/3.13/alpine3.22/Dockerfile index b3cc60e8b..5f4e534c5 100644 --- a/3.13/alpine3.22/Dockerfile +++ b/3.13/alpine3.22/Dockerfile @@ -77,25 +77,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -105,7 +105,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/alpine3.23/Dockerfile b/3.13/alpine3.23/Dockerfile index 98e9509df..88e61ae92 100644 --- a/3.13/alpine3.23/Dockerfile +++ b/3.13/alpine3.23/Dockerfile @@ -77,25 +77,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -105,7 +105,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index 2f928339a..ec3a15967 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -51,24 +51,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -78,7 +78,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index cce4a3fe2..046a2d7e1 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -76,25 +76,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -104,7 +104,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/slim-trixie/Dockerfile b/3.13/slim-trixie/Dockerfile index 216acae54..aeb98251f 100644 --- a/3.13/slim-trixie/Dockerfile +++ b/3.13/slim-trixie/Dockerfile @@ -76,25 +76,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -104,7 +104,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.13/trixie/Dockerfile b/3.13/trixie/Dockerfile index 8dabd54bc..cf709d74d 100644 --- a/3.13/trixie/Dockerfile +++ b/3.13/trixie/Dockerfile @@ -51,24 +51,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -78,7 +78,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/alpine3.22/Dockerfile b/3.14/alpine3.22/Dockerfile index e8afd6eff..e32939bfd 100644 --- a/3.14/alpine3.22/Dockerfile +++ b/3.14/alpine3.22/Dockerfile @@ -71,25 +71,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -99,7 +99,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/alpine3.23/Dockerfile b/3.14/alpine3.23/Dockerfile index 9d3f7fd66..b2d530afc 100644 --- a/3.14/alpine3.23/Dockerfile +++ b/3.14/alpine3.23/Dockerfile @@ -71,25 +71,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -99,7 +99,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/bookworm/Dockerfile b/3.14/bookworm/Dockerfile index 122347de9..4c3b74a15 100644 --- a/3.14/bookworm/Dockerfile +++ b/3.14/bookworm/Dockerfile @@ -50,24 +50,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -77,7 +77,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/slim-bookworm/Dockerfile b/3.14/slim-bookworm/Dockerfile index 391b65792..c957d0906 100644 --- a/3.14/slim-bookworm/Dockerfile +++ b/3.14/slim-bookworm/Dockerfile @@ -70,25 +70,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -98,7 +98,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/slim-trixie/Dockerfile b/3.14/slim-trixie/Dockerfile index 820d32355..552a9e64b 100644 --- a/3.14/slim-trixie/Dockerfile +++ b/3.14/slim-trixie/Dockerfile @@ -70,25 +70,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -98,7 +98,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.14/trixie/Dockerfile b/3.14/trixie/Dockerfile index 901ee09be..b10f61355 100644 --- a/3.14/trixie/Dockerfile +++ b/3.14/trixie/Dockerfile @@ -50,24 +50,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -77,7 +77,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/alpine3.22/Dockerfile b/3.15-rc/alpine3.22/Dockerfile index 08bd41af6..379607cbc 100644 --- a/3.15-rc/alpine3.22/Dockerfile +++ b/3.15-rc/alpine3.22/Dockerfile @@ -71,25 +71,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -99,7 +99,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/alpine3.23/Dockerfile b/3.15-rc/alpine3.23/Dockerfile index caf03e5ed..29770b3a7 100644 --- a/3.15-rc/alpine3.23/Dockerfile +++ b/3.15-rc/alpine3.23/Dockerfile @@ -71,25 +71,25 @@ RUN set -eux; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() # https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(apk --print-arch)"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(apk --print-arch)"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - x86_64|aarch64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - x86) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + x86_64|aarch64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + x86) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -99,7 +99,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/bookworm/Dockerfile b/3.15-rc/bookworm/Dockerfile index 160973db9..7be6c0497 100644 --- a/3.15-rc/bookworm/Dockerfile +++ b/3.15-rc/bookworm/Dockerfile @@ -50,24 +50,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -77,7 +77,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/slim-bookworm/Dockerfile b/3.15-rc/slim-bookworm/Dockerfile index 650dd8fd6..c9750daec 100644 --- a/3.15-rc/slim-bookworm/Dockerfile +++ b/3.15-rc/slim-bookworm/Dockerfile @@ -70,25 +70,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -98,7 +98,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/slim-trixie/Dockerfile b/3.15-rc/slim-trixie/Dockerfile index 604993d1a..8243a5ffe 100644 --- a/3.15-rc/slim-trixie/Dockerfile +++ b/3.15-rc/slim-trixie/Dockerfile @@ -70,25 +70,25 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -98,7 +98,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/3.15-rc/trixie/Dockerfile b/3.15-rc/trixie/Dockerfile index 6a1e063f7..e83cdde1e 100644 --- a/3.15-rc/trixie/Dockerfile +++ b/3.15-rc/trixie/Dockerfile @@ -50,24 +50,24 @@ RUN set -eux; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ - amd64|arm64) \ - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ - i386) \ - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + case "$arch" in \ + amd64|arm64) \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ + i386) \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -77,7 +77,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 0810a4ed0..92cc4f2b5 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -217,42 +217,42 @@ RUN set -eux; \ LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ {{ ) end -}} {{ if is_slim or is_alpine then ( -}} - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ + LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; \ {{ ) else "" end -}} {{ # Enabling frame-pointers only makes sense for Python 3.12 and newer as those have perf profiler support if rcVersion | IN("3.10", "3.11") then "" else ( -}} {{ if is_alpine then ( -}} - arch="$(apk --print-arch)"; \ + arch="$(apk --print-arch)"; \ {{ ) else ( -}} - arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ + arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ {{ ) end -}} # https://docs.python.org/3.12/howto/perf_profiling.html # https://github.com/docker-library/python/pull/1000#issuecomment-2597021615 - case "$arch" in \ + case "$arch" in \ {{ if is_alpine then ( -}} - x86_64|aarch64) \ + x86_64|aarch64) \ {{ ) else ( -}} - amd64|arm64) \ + amd64|arm64) \ {{ ) end -}} - # only add "-mno-omit-leaf" on arches that support it - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 - # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ - ;; \ + # only add "-mno-omit-leaf" on arches that support it + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html#index-momit-leaf-frame-pointer-2 + # https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/AArch64-Options.html#index-momit-leaf-frame-pointer + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"; \ + ;; \ {{ if is_alpine then ( -}} - x86) \ + x86) \ {{ ) else ( -}} - i386) \ + i386) \ {{ ) end -}} - # don't enable frame-pointers on 32bit x86 due to performance drop. - ;; \ - *) \ - # other arches don't support "-mno-omit-leaf" - EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ - ;; \ - esac; \ + # don't enable frame-pointers on 32bit x86 due to performance drop. + ;; \ + *) \ + # other arches don't support "-mno-omit-leaf" + EXTRA_CFLAGS="${EXTRA_CFLAGS:-} -fno-omit-frame-pointer"; \ + ;; \ + esac; \ {{ ) end -}} make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ @@ -263,7 +263,7 @@ RUN set -eux; \ rm python; \ make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ + "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" \ python \ ; \ make install; \