diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-11-13 13:21:18 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-14 11:38:40 +0000 |
commit | df06552b4882554fd2cc1979f5dcc2575d3f6a64 (patch) | |
tree | d75c3711109334e09ed1f49184605e55db851220 /Ports/zlib | |
parent | 7e5b22333e4898c5b58608239834e7ac782be0fc (diff) | |
download | serenity-df06552b4882554fd2cc1979f5dcc2575d3f6a64.zip |
Ports: Fix building zlib with Clang
Even though Clang generates PIC objects by default, an R_386_PC32
relocation still slips into libz.a if we don't set -fPIC explicitly.
Diffstat (limited to 'Ports/zlib')
-rwxr-xr-x | Ports/zlib/package.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Ports/zlib/package.sh b/Ports/zlib/package.sh index 6ef8ed2589..2641ea770c 100755 --- a/Ports/zlib/package.sh +++ b/Ports/zlib/package.sh @@ -5,6 +5,12 @@ useconfigure=true files="https://www.zlib.net/zlib-${version}.tar.gz zlib-${version}.tar.gz c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" auth_type="sha256" +pre_configure() { + # HACK: Even though Clang generates PIC objects by default, an R_386_PC32 + # relocation still slips into libz.a if we don't set -fPIC explicitly. + export CFLAGS="-fPIC -O3" +} + configure() { # Set uname to linux to prevent it finding the host's `libtool` on e.g. Darwin run ./configure --uname=linux |