summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/hyx/files/hyx-ldflags.patch')
-rw-r--r--app-editors/hyx/files/hyx-ldflags.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/app-editors/hyx/files/hyx-ldflags.patch b/app-editors/hyx/files/hyx-ldflags.patch
new file mode 100644
index 000000000000..714e76a795db
--- /dev/null
+++ b/app-editors/hyx/files/hyx-ldflags.patch
@@ -0,0 +1,27 @@
+diff -Naur hyx-2021.06.09.org/Makefile hyx-2021.06.09/Makefile
+--- hyx-2021.06.09.org/Makefile 2021-06-09 18:09:18.000000000 +0200
++++ hyx-2021.06.09/Makefile 2022-08-31 08:20:27.711819466 +0200
+@@ -1,18 +1,19 @@
+
+ all: CFLAGS ?= -O2 -Wl,-s \
+- -Wl,-z,relro,-z,now -fpic -pie -D_FORTIFY_SOURCE=2 -fstack-protector-all
+-all: CFLAGS += -std=c99 -pedantic -Wall -Wextra -DNDEBUG
++ -std=c99 -pedantic -Wall -Wextra -DNDEBUG
++all: LDFLAGS ?= -Wl,-z,relro,-z,now -fpic -pie -D_FORTIFY_SOURCE=2 -fstack-protector-all
+ all: hyx
+
+ debug: CFLAGS ?= -O0 -g \
+ -fsanitize=undefined \
+- -Wl,-z,relro,-z,now -fpic -pie -fstack-protector-all
+-debug: CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
++ -std=c99 -pedantic -Wall -Wextra -Werror
++debug: LDFLAGS ?= -Wl,-z,relro,-z,now -fpic -pie -fstack-protector-all
+ debug: hyx
+
+ hyx: *.h *.c
+ $(CC) \
+ $(CFLAGS) \
++ $(LDFLAGS) \
+ hyx.c common.c blob.c history.c view.c input.c \
+ -o hyx
+