Skip to content

Commit

Permalink
dns/void-zones-tools: Fix build with WITH_PIE=YES
Browse files Browse the repository at this point in the history
Patch CFLAGS from being overridden and remove -fno-pic to facilitate
building with WITH_PIE=yes

PR:		275039
Reported by:	Marek Zarychta
  • Loading branch information
vkarlsen authored and clausecker committed Nov 24, 2023
1 parent 5137427 commit 11a7b63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions dns/void-zones-tools/Makefile
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions dns/void-zones-tools/files/patch-Makefile
@@ -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"

0 comments on commit 11a7b63

Please sign in to comment.