Date: Fri, 10 Nov 2023 21:13:54 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 275018] ports-mgmt/pkg: building with PIE and RELRO is broken when CFLAGS are set Message-ID: <bug-275018-32340-hZqYigzlA0@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-275018-32340@https.bugs.freebsd.org/bugzilla/> References: <bug-275018-32340@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody) <pkg@FreeBSD.org> for maintainer-feedback: Bug 275018: ports-mgmt/pkg: building with PIE and RELRO is broken when CFLA= GS are set https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275018 --- Description --- Since WITH_PIE and WITH_RELRO were introduced to ports, it was impossible to build ports-mgmt/pkg when CFLAGS were also set. To reproduce try to build ports-mgmt/pkg with these settings in make.conf: CFLAGS=3D-O2 -pipe -fno-strict-aliasing=20 WITH_PIE=3DYES=20 WITH_RELRO=3DYES it looks like setting CFLAGS is killing -fPIC at some point which results i= n: ld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC I initially believed it was only a flaw, but I was encouraged to submit a PR about it.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-275018-32340-hZqYigzlA0>