-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMake.defaults
More file actions
41 lines (38 loc) · 1.09 KB
/
Make.defaults
File metadata and controls
41 lines (38 loc) · 1.09 KB
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
32
33
34
35
36
37
38
39
40
41
CFLAGS += -I include
CFLAGS += -DRELATIVE_SOURCE_PATH="\".\""
CFLAGS += -fno-strict-aliasing
CFLAGS += -ffreestanding
CFLAGS += -fshort-wchar
ifneq ($(CC),clang)
CFLAGS += -fwide-exec-charset=UCS2
endif
CFLAGS += -mstack-protector-guard=global
CFLAGS += -DCOLOR_NORMAL=0x0f
CFLAGS += -fno-lto
CFLAGS += '-DEFI_MACHINE_TYPE_NAME="x64"'
CFLAGS += '-DGIT_VERSION="1.0-ubuntu0"'
CFLAGS += -O2
LDFLAGS += -nostdlib
LDFLAGS += -static-pie
LDFLAGS += -Wl,--entry=efi_main
LDFLAGS += -Wl,--fatal-warnings
LDFLAGS += -Wl,-static,-pie,--no-dynamic-linker,-z,text
LDFLAGS += -z common-page-size=4096
LDFLAGS += -z max-page-size=4096
LDFLAGS += -z noexecstack
LDFLAGS += -z relro
LDFLAGS += -z separate-code
LDFLAGS += $(shell $(CC) -print-libgcc-file-name)
ifneq ($(ARCH),riscv64)
LDFLAGS += -Wl,-z,nopack-relative-relocs
endif
LDFLAGS += -fcf-protection=none
LDFLAGS += -fno-asynchronous-unwind-tables
LDFLAGS += -fno-exceptions -fno-unwind-tables
LDFLAGS += -fno-lto
# # DEBUG
# CFLAGS += -O0 -g
# # Find unused functions
# CFLAGS += -ffunction-sections
# LDFLAGS += -Wl,--gc-sections
# LDFLAGS += -Wl,--print-gc-sections