[Bug 275039] dns/void-zones-tools: not WITH_PIE safe

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 19 Nov 2023 15:12:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275039

--- Comment #4 from Vidar Karlsen <vidar@karlsen.tech> ---
(In reply to Robert Clausecker from comment #3)

> This patch doesn't look right as it now unconditionally adds -fpic, even if we create a position-dependent binary.

That is a very good point.

> I don't get why you had -fno-pic in there in the first place.  If you just remove that flag, I suspect it'll just work as expected.

I don't know either. It's coming from upstream, and I don't know enough about
compilers and their flags to put forth any meaningful argument about it.

Removing -fno-pic almost works, but the upstream Makefile does:
CFLAGS = $(CDEFS)
overwriting anything coming from the ports framework.
Changing that to += does seem to do the trick.
I'll upload a new patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.