----- Original Message ----- From: "Robert Connolly" <rob...@linuxfromscratch.org> To: "Hardened LFS Development List" <hlfs-dev@linuxfromscratch.org> Sent: Tuesday, November 30, 2010 5:43 AM Subject: Re: TEXTREL zlib compilation issue on centos-5.5
> On Monday 29 November 2010 02:35:14 Gilles Espinasse wrote: >> As I have said, ipcop compile mostly LFS dev current (except gcc-4.4, >> linux-2.6.32) with some hardening options : >> glibc hardening >> CFLAGS="-Os -march=${MACHINE} -mtune=pentium -pipe -fomit-frame-pointer >> -D_F ORTIFY_SOURCE=2 -fstack-protector-all -fPIE -Wl,-z,now" >> LDFLAGS="-Wl,--hash-style=gnu" >> >> There is still some TEXTREL in code but we live with that actually. >> Except when I try the compilation from a centos-5.5 box whre new problem >> happen. > > Compile Zlib with -fPIC instead of -fPIE and the TEXTREL should go away. > The TEXTREL is probably because of -fPIE. > > robert Yes that's the solution. zlib-1.2.5 already has -fPIC where needed When you have -fPIE on unmodified gcc specs, that cause TEXTREL. But what caught me was that I look on other boxes where I compile with same CFLAGS and didn't find the TEXTREL on same libz.so-1.2.5 That was wrong and same TEXREL is everywhere. Gilles -- http://linuxfromscratch.org/mailman/listinfo/hlfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page