Skip to content

Commit fc50d2f

Browse files
committed
Better compilation flags
This includes some hardening flags
1 parent 025eb94 commit fc50d2f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

shmoverride/Makefile

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ endif
2828

2929
LIBDIR ?= /usr/lib64
3030
extra_cflags := -g -O2 -I../include/ -fPIC -Wall -Wextra -Werror \
31-
-DBACKEND_VMM_$(BACKEND_VMM) \
32-
-DSHMOVERRIDE_LIB_PATH=\"$(LIBDIR)/qubes-gui-daemon/shmoverride.so\" \
33-
-I../include -fvisibility=hidden -pthread
31+
-Wp,-DBACKEND_VMM_$(BACKEND_VMM) \
32+
-Wp,-DSHMOVERRIDE_LIB_PATH=\"$(LIBDIR)/qubes-gui-daemon/shmoverride.so\" \
33+
-I../include -fvisibility=hidden -pthread \
34+
-Wp,-D_GNU_SOURCE=1 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-all \
35+
-fcf-protection -fstack-clash-protection -Wl,-Bsymbolic
3436
CC=gcc
3537

3638
all: shmoverride.so X-wrapper-qubes
3739

3840
shmoverride.so: shmoverride.o ./list.o
3941
$(CC) $(CFLAGS) $(extra_cflags) -shared -o shmoverride.so \
40-
shmoverride.o list.o -ldl -lxenctrl -lxengnttab -Wl,-Bsymbolic
42+
shmoverride.o list.o -ldl -lxenctrl -lxengnttab
4143

4244
vpath %.c ../common
4345

0 commit comments

Comments
 (0)