From c498aaa161a1bf13855457a65bcd5f3883a7b4b4 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Wed, 10 May 2023 15:59:47 +0200 Subject: [PATCH] Link with pack-relative-relocs to save space --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 112cb0f..d19ba3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apk add --no-cache \ bash \ tar \ build-base \ + lld \ autoconf automake \ libtool \ diffutils \ @@ -56,7 +57,7 @@ RUN apk add --no-cache \ # other options to get hardened build (same as ffmpeg hardened) ARG CFLAGS="-O3 -static-libgcc -fno-strict-overflow -fstack-protector-all -fPIC" ARG CXXFLAGS="-O3 -static-libgcc -fno-strict-overflow -fstack-protector-all -fPIC" -ARG LDFLAGS="-Wl,-z,relro,-z,now" +ARG LDFLAGS="-fuse-ld=lld -Wl,-z,relro,-z,now -Wl,-z,pack-relative-relocs" # retry dns and some http codes that might be transient errors ARG WGET_OPTS="--retry-on-host-error --retry-on-http-error=429,500,502,503"