dns/void-zones-tools: Fix build with WITH_PIE=YES

Patch CFLAGS from being overridden and remove -fno-pic to facilitate
building with WITH_PIE=yes

PR:		275039
Reported by:	Marek Zarychta

(cherry picked from commit 11a7b638a6)
This commit is contained in:
Vidar Karlsen 2023-11-13 22:21:58 +01:00 committed by Robert Clausecker
parent 46cb74cb8b
commit 690ea2e84f
2 changed files with 13 additions and 3 deletions

View file

@ -2,6 +2,7 @@ PORTNAME= void-zones-tools
DISTVERSIONPREFIX= v
DISTVERSION= 1.0.2-18
DISTVERSIONSUFFIX= -g204634a
PORTREVISION= 1
CATEGORIES= dns
MAINTAINER= vidar@karlsen.tech

View file

@ -1,13 +1,22 @@
--- Makefile.orig 2023-08-28 22:28:23 UTC
+++ Makefile
@@ -26,9 +26,7 @@
@@ -26,15 +26,13 @@
CC ?= clang
DV != $(CC) -dumpversion
-.if $(MACHINE) == "i386" || $(MACHINE) == "amd64" || $(MACHINE) == "x86_64"
-CFLAGS = $(CDEFS) -march=native -mssse3
-.elif $(MACHINE) == "arm"
-CFLAGS = $(CDEFS) -fsigned-char
+.if $(MACHINE) == "arm"
CFLAGS = $(CDEFS) -fsigned-char
+CFLAGS += $(CDEFS) -fsigned-char
.else
CFLAGS = $(CDEFS)
-CFLAGS = $(CDEFS)
+CFLAGS += $(CDEFS)
.endif
-CFLAGS += -std=gnu11 -g0 -O3 -fno-pic -fvisibility=hidden -fstrict-aliasing -fno-common -fstack-protector -Wno-parentheses
+CFLAGS += -std=gnu11 -g0 -O3 -fvisibility=hidden -fstrict-aliasing -fno-common -fstack-protector -Wno-parentheses
# Clang only flags come here
.if $(DV) == "4.2.1"