aboutsummaryrefslogtreecommitdiffstats
path: root/src/libpostexecseccomp
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-10-19 14:06:16 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2022-11-21 17:15:29 -0300
commit60a95f00bb1a3185fce4bacb5367201685767444 (patch)
treee4f7d7ab251be37f354d8626c1c6a331c0b857b8 /src/libpostexecseccomp
parentmakefiles: rename H_FILE_LIST and C_FILE_LIST (diff)
downloadfirejail-60a95f00bb1a3185fce4bacb5367201685767444.tar.gz
firejail-60a95f00bb1a3185fce4bacb5367201685767444.tar.zst
firejail-60a95f00bb1a3185fce4bacb5367201685767444.zip
makefiles: expand HDRS, SRCS and OBJS immediately
Use immediate expansion of the right-hand side (with `:=`) to set the variables to the output of the commands rather than to the (text of the) commands themselves. This should prevent deferred/lazy evaluation, which is something that might potentially result in the relevant files being looked up each time that HDRS and SRCS are evaluated. Commands used to search and replace: git grep -Ilz '^SRCS' -- src | xargs -0 -I '{}' \ sh -c "printf '%s\n' \"\$(sed \ -e 's/^HDRS =/HDRS :=/' \ -e 's/^SRCS =/SRCS :=/' \ -e 's/^OBJS =/OBJS :=/' '{}')\" >'{}'"
Diffstat (limited to 'src/libpostexecseccomp')
-rw-r--r--src/libpostexecseccomp/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libpostexecseccomp/Makefile b/src/libpostexecseccomp/Makefile
index 284e0973b..c0cab45fb 100644
--- a/src/libpostexecseccomp/Makefile
+++ b/src/libpostexecseccomp/Makefile
@@ -1,9 +1,9 @@
1ROOT = ../.. 1ROOT = ../..
2-include $(ROOT)/config.mk 2-include $(ROOT)/config.mk
3 3
4HDRS = $(sort $(wildcard *.h)) 4HDRS := $(sort $(wildcard *.h))
5SRCS = $(sort $(wildcard *.c)) 5SRCS := $(sort $(wildcard *.c))
6OBJS = $(SRCS:.c=.o) 6OBJS := $(SRCS:.c=.o)
7CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC -Wformat -Wformat-security 7CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC -Wformat -Wformat-security
8LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now 8LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now
9 9