Skip to content

Commit

Permalink
Fix #501: add --with-lto to 3.10 and newer
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Oct 19, 2021
1 parent 35fa20f commit 1fa00a0
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions 3.10/alpine3.13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.10/alpine3.14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.10/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.10/bullseye/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.10/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.10/buster/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.11-rc/alpine3.14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.11-rc/bullseye/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions 3.11-rc/bullseye/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-slim.template
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ RUN set -ex \
--enable-optimizations \
--enable-option-checking=fatal \
--enable-shared \
--with-lto \
--with-system-expat \
--with-system-ffi \
--without-ensurepip \
Expand Down
5 changes: 5 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,10 @@ for version in "${versions[@]}"; do
if [ "$minor" -lt 9 ]; then
sed -ri -e '/tzdata/d' "$dir/Dockerfile"
fi

if [ "$minor" -lt 10 ]; then
# <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance
sed -ri -e '/with-lto/d' "$dir/Dockerfile"
fi
done
done

0 comments on commit 1fa00a0

Please sign in to comment.