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/>
index | next in thread | previous in thread | raw e-mail
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 CFLAGS are set https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275018 --- 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=-O2 -pipe -fno-strict-aliasing WITH_PIE=YES WITH_RELRO=YES it looks like setting CFLAGS is killing -fPIC at some point which results in: 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.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-275018-32340-hZqYigzlA0>
