Skip to content

Instantly share code, notes, and snippets.

@SCOTT-HAMILTON
Created May 16, 2021 13:40
Show Gist options
  • Save SCOTT-HAMILTON/e1a76964698328d6afbb90179a72fa59 to your computer and use it in GitHub Desktop.
Save SCOTT-HAMILTON/e1a76964698328d6afbb90179a72fa59 to your computer and use it in GitHub Desktop.
diff --color -ur a/Makefile b/Makefile
--- a/Makefile 2021-05-16 13:55:08.033586154 +0200
+++ b/Makefile 2021-05-16 13:57:55.076889461 +0200
@@ -12,7 +12,10 @@
#LDFLAGS+=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
# arch & debian hardening workaround
-LDFLAGS+=-Wl,--no-as-needed
+KERNEL = $(shell uname -s)
+ifeq ($(KERNEL),Linux)
+ LDFLAGS+=-Wl,--no-as-needed
+endif
CFLAGS+=$(shell $(PKG_CONFIG) x11 --cflags)
LDFLAGS+=$(shell $(PKG_CONFIG) x11 --libs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment