Comments (6)
Yes, they contain commas and that brings confusion to filter-out.
Sorry, I should have tested it before posting.
Does that work:
diff --git a/Makefile b/Makefile
index 790653c..347c061 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,11 @@ CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SO
LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
LIBS+=-lpcap
+ifeq ($(shell uname -s),Darwin)
+LDFLAGSTODROP:=-Wl,-z,relro -Wl,-z,now
+LDFLAGS:=$(filter-out $(LDFLAGSTODROP),$(LDFLAGS))
+endif
+
all: dhcpdump dhcpdump.8
clean:
from dhcpdump.
Thanks for reporting.
I do not have access to any MacOS system, can you test the following patch:
diff --git a/Makefile b/Makefile
index 790653c..38526bb 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,10 @@ CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SO
LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
LIBS+=-lpcap
+# silently eliminate flags that are not supported by the compiler
+CFLAGS:=$(foreach tfl,$(CFLAGS),$(shell $(CC) $(tfl) -xc -c /dev/null -o /dev/null >/dev/null 2>/dev/null&&echo $(tfl)))
+LDFLAGS:=$(foreach tfl,$(LDFLAGS),$(shell $(CC) $(tfl) -xc -c /dev/null -o /dev/null >/dev/null 2>/dev/null&&echo $(tfl)))
+
all: dhcpdump dhcpdump.8
clean:
from dhcpdump.
No effect. But this works; with a bit of adjustment it could detect the compiler instead of just the operating system.
CFLAGS+=${CPPFLAGS}
CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O3 -fPIE
LDFLAGS+=-g -fPIE -pie
LIBS+=-lpcap
UNAME := $(shell uname)
ifneq ($(UNAME), Darwin)
LDFLAGS+=-Wl,-z,relro -Wl,-z,now
endif
from dhcpdump.
That is quite the anti-pattern... Some day clang or whatever CC is there on Darwin may start supporting these options.
Please try this:
diff --git a/Makefile b/Makefile
index 790653c..5fa85a1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,11 @@ CFLAGS+=-Wall -Wextra -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SO
LDFLAGS+=-g -Wl,-z,relro -Wl,-z,now -fPIE -pie
LIBS+=-lpcap
+ifeq ($(shell uname -s),Darwin)
+LDFLAGS:=$(filter-out -Wl,-z,relro,$(LDFLAGS))
+LDFLAGS:=$(filter-out -Wl,-z,now,$(LDFLAGS))
+endif
+
all: dhcpdump dhcpdump.8
clean:
from dhcpdump.
Looks like you can't pass strings directly to filter-out
; they have to be within a variable.
from dhcpdump.
I'd assume it is OK
from dhcpdump.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhcpdump.