forked from microsoft/checkedc-libc-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.mak
18 lines (14 loc) · 863 Bytes
/
config.mak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC=clang
CFLAGS += -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wno-unused-function -Wno-missing-braces -Wno-unused -Wno-overflow
CFLAGS += -Wno-unknown-pragmas -fno-builtin
CFLAGS += -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith
CFLAGS += -g
LDFLAGS += -g
LDLIBS += -Wl,--start-group -lpthread -lm -lrt -lc -lclang_rt.builtins-x86_64 -Wl,--end-group
MUSL_CFLAGS=-nostdinc -isystem $(MUSL_PATH)/include
MUSL_LDFLAGS=-nostdlib -L $(MUSL_PATH)/lib -L $(RT_PATH)/lib/clang/10.0.0/lib/linux $(MUSL_PATH)/lib/libc.a $(MUSL_PATH)/lib/crt1.o $(MUSL_PATH)/lib/crti.o $(MUSL_PATH)/lib/crtn.o
CFLAGS += $(MUSL_CFLAGS) -fPIC -Wno-switch-bool -Wno-empty-translation-unit
LDFLAGS += $(MUSL_LDFLAGS) -fPIC
# glibc specific settings
CFLAGS += -D_FILE_OFFSET_BITS=64
LDLIBS += -lcrypt -ldl -lresolv -lutil -lpthread