Date: Sat, 13 Feb 2021 22:15:41 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 253275] [exp-run] base system PIE default Message-ID: <bug-253275-7788-Q9ECnRsPzk@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-253275-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-253275-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253275 --- Comment #10 from Ed Maste <emaste@freebsd.org> --- (In reply to michiel from comment #9) I'm not sure if setting WITH_PIE will work, it may require the changed defa= ult as in the linked review. I tried building www/mathopd on my laptop (with the PIE default changed) and do see the failure. You are correct, objects are being compiled w/o -fPIE but linking is attemp= ted with -pie. (After a moment) I see what's happening here - www/mathopd/Makefile has: CFLAGS+=3D -DFREEBSD_SENDFILE MAKE_ARGS=3D CFLAGS=3D"${CFLAGS}" Because option processing (bsd.opts.mk) does not happen in the context of t= he=20 ports Makefile, CFLAGS is just "-O2 -pipe" at this point, and we set MAKE_ARGS=3DCFLAGS=3D"-O2 -pipe -DFREEBSD_SENDFILE". This is used as CFLAGS= by bsd.prog.mk later on. If I make this (hacky) change: -CFLAGS+=3D -DFREEBSD_SENDFILE +CFLAGS+=3D -DFREEBSD_SENDFILE -fPIE the port builds successfully as PIE. I'm not sure how to do this properly though. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253275-7788-Q9ECnRsPzk>