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
|
CFLAGS += -I include
CFLAGS += -DRELATIVE_SOURCE_PATH="\".\""
CFLAGS += -fno-strict-aliasing
CFLAGS += -ffreestanding
CFLAGS += -fshort-wchar
CFLAGS += -fwide-exec-charset=UCS2
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)
LDFLAGS += -Wl,-z,nopack-relative-relocs
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
|