forked from nirs/sanlock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.mk
More file actions
31 lines (29 loc) · 683 Bytes
/
Copy pathcommon.mk
File metadata and controls
31 lines (29 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export CC ?= cc
check = $(shell echo "int main() { return 0; }" \
| $(CC) $(1) -xc - >&/dev/null && echo $(1) ||:)
export CFLAGS += -D_GNU_SOURCE -O2 -ggdb \
-Wall \
-Wformat \
-Wformat-security \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wextra \
-Wshadow \
-Wcast-align \
-Wwrite-strings \
-Waggregate-return \
-Wstrict-prototypes \
-Winline \
-Wredundant-decls \
-Wno-sign-compare \
-Wno-unused-parameter \
-Wp,-D_FORTIFY_SOURCE=2 \
-Wno-strict-overflow \
-fexceptions \
-fasynchronous-unwind-tables \
-fdiagnostics-show-option \
-Wp,-D_GLIBCXX_ASSERTIONS \
-fstack-protector-strong \
$(check -fstack-clash-protection) \
-Wl,-z,now