Commit 9d85d630 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

component/zlib: add -fPIC flag to compile on newest Fedora

Fedora 36 and 37 were failing with following message:

cc -shared -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.12 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes
/usr/bin/ld: /tmp/ccrAYWgY.ltrans0.ltrans.o: warning: relocation against `zcfree' in read-only section `.text'
/usr/bin/ld: /tmp/ccrAYWgY.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_length_code' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
parent daaea02f
......@@ -7,3 +7,5 @@ recipe = slapos.recipe.cmmi
shared = true
url = https://zlib.net/fossils/zlib-1.2.12.tar.gz
md5sum = 5fc414a9726be31427b440b434d05f78
environment =
CFLAGS=-fPIC
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment