From 4e468a948874f661a53b498ac1a30012c7860fd1 Mon Sep 17 00:00:00 2001 From: vegbir Date: Fri, 14 Jul 2023 07:54:27 +0000 Subject: [PATCH 11/16] add secure compile option in meson Signed-off-by: vegbir --- Makefile | 2 +- meson.build | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 94f2021..38fbe04 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ .PHONY: all all: meson - ninja -C build + ninja -v -C build .PHONY: meson meson: diff --git a/meson.build b/meson.build index 379757f..56338b6 100644 --- a/meson.build +++ b/meson.build @@ -109,6 +109,9 @@ possible_cc_flags = [ '-Wreturn-local-addr', '-fsanitize=cfi', '-Wstringop-overflow', + '-ftrapv', + '-fPIC', + '-O2 -D_FORTIFY_SOURCE=2', ] possible_link_flags = [ -- 2.41.0