From 603e1f9506d6917e41980f0d303175c58c7a3034 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 12 Dec 2016 10:56:38 -0800 Subject: [PATCH] Remove "-fpie" -- causes compilation downstream failures See https://github.com/docker-library/php/issues/347#issuecomment-266517942. --- 5.6/Dockerfile | 3 +-- 5.6/alpine/Dockerfile | 3 +-- 5.6/apache/Dockerfile | 3 +-- 5.6/fpm/Dockerfile | 3 +-- 5.6/fpm/alpine/Dockerfile | 3 +-- 5.6/zts/Dockerfile | 3 +-- 5.6/zts/alpine/Dockerfile | 3 +-- 7.0/Dockerfile | 3 +-- 7.0/alpine/Dockerfile | 3 +-- 7.0/apache/Dockerfile | 3 +-- 7.0/fpm/Dockerfile | 3 +-- 7.0/fpm/alpine/Dockerfile | 3 +-- 7.0/zts/Dockerfile | 3 +-- 7.0/zts/alpine/Dockerfile | 3 +-- 7.1/Dockerfile | 3 +-- 7.1/alpine/Dockerfile | 3 +-- 7.1/apache/Dockerfile | 3 +-- 7.1/fpm/Dockerfile | 3 +-- 7.1/fpm/alpine/Dockerfile | 3 +-- 7.1/zts/Dockerfile | 3 +-- 7.1/zts/alpine/Dockerfile | 3 +-- Dockerfile-alpine.template | 3 +-- Dockerfile-debian.template | 3 +-- 23 files changed, 23 insertions(+), 46 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 89f6fe4bd..749a47383 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -33,12 +33,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/alpine/Dockerfile b/5.6/alpine/Dockerfile index 9a73a7929..1b90f4ac9 100644 --- a/5.6/alpine/Dockerfile +++ b/5.6/alpine/Dockerfile @@ -38,12 +38,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 31d5a50b3..ff0e2da8a 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -89,12 +89,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index d7536790e..e5918b9c5 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/fpm/alpine/Dockerfile b/5.6/fpm/alpine/Dockerfile index ab9a90f4a..b79f65f38 100644 --- a/5.6/fpm/alpine/Dockerfile +++ b/5.6/fpm/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/zts/Dockerfile b/5.6/zts/Dockerfile index 4895987b5..4fbe4d5e7 100644 --- a/5.6/zts/Dockerfile +++ b/5.6/zts/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/5.6/zts/alpine/Dockerfile b/5.6/zts/alpine/Dockerfile index 29bcf7cfe..5209b9daf 100644 --- a/5.6/zts/alpine/Dockerfile +++ b/5.6/zts/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/Dockerfile b/7.0/Dockerfile index 6ce44750d..d6a03331a 100644 --- a/7.0/Dockerfile +++ b/7.0/Dockerfile @@ -33,12 +33,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/alpine/Dockerfile b/7.0/alpine/Dockerfile index 0fea38bc5..0b6c4d4e6 100644 --- a/7.0/alpine/Dockerfile +++ b/7.0/alpine/Dockerfile @@ -38,12 +38,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/apache/Dockerfile b/7.0/apache/Dockerfile index 18a7319fd..2ecccb6f0 100644 --- a/7.0/apache/Dockerfile +++ b/7.0/apache/Dockerfile @@ -89,12 +89,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/fpm/Dockerfile b/7.0/fpm/Dockerfile index f01de3c47..6b5b43e13 100644 --- a/7.0/fpm/Dockerfile +++ b/7.0/fpm/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/fpm/alpine/Dockerfile b/7.0/fpm/alpine/Dockerfile index fecf60bb0..97a2bb186 100644 --- a/7.0/fpm/alpine/Dockerfile +++ b/7.0/fpm/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/zts/Dockerfile b/7.0/zts/Dockerfile index 68c1b2ac9..e7b255478 100644 --- a/7.0/zts/Dockerfile +++ b/7.0/zts/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.0/zts/alpine/Dockerfile b/7.0/zts/alpine/Dockerfile index 2872392e3..9c57626a8 100644 --- a/7.0/zts/alpine/Dockerfile +++ b/7.0/zts/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/Dockerfile b/7.1/Dockerfile index 9acdbc82e..55a6a0779 100644 --- a/7.1/Dockerfile +++ b/7.1/Dockerfile @@ -33,12 +33,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/alpine/Dockerfile b/7.1/alpine/Dockerfile index 5f3cd9aee..7557d2402 100644 --- a/7.1/alpine/Dockerfile +++ b/7.1/alpine/Dockerfile @@ -38,12 +38,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/apache/Dockerfile b/7.1/apache/Dockerfile index a29b6a08d..07fd388c2 100644 --- a/7.1/apache/Dockerfile +++ b/7.1/apache/Dockerfile @@ -89,12 +89,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/fpm/Dockerfile b/7.1/fpm/Dockerfile index adf9cca62..1cea41918 100644 --- a/7.1/fpm/Dockerfile +++ b/7.1/fpm/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/fpm/alpine/Dockerfile b/7.1/fpm/alpine/Dockerfile index af61e203e..8898378f4 100644 --- a/7.1/fpm/alpine/Dockerfile +++ b/7.1/fpm/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/zts/Dockerfile b/7.1/zts/Dockerfile index 334efebb8..610dacc6a 100644 --- a/7.1/zts/Dockerfile +++ b/7.1/zts/Dockerfile @@ -34,12 +34,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/7.1/zts/alpine/Dockerfile b/7.1/zts/alpine/Dockerfile index 47c0a98a8..de81bfe00 100644 --- a/7.1/zts/alpine/Dockerfile +++ b/7.1/zts/alpine/Dockerfile @@ -39,12 +39,11 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 43e409742..72d42c0f9 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -32,12 +32,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both" diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 2f4de9cd8..89a798121 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -27,12 +27,11 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### # Apply stack smash protection to functions using local buffers and alloca() -# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64) # Enable optimization (-O2) # Enable linker optimization (this sorts the hash buckets to improve cache locality, and is non-default) # Adds GNU HASH segments to generated executables (this is used if present, and is much faster than sysv hash; in this configuration, sysv hash is also generated) # https://github.com/docker-library/php/issues/272 -ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" +ENV CFLAGS="-fstack-protector-strong -fpic -O2" ENV CPPFLAGS="$CFLAGS" ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both"