1 # Code size reduction. 2 # 3 CFLAGS += -fstrength-reduce -fomit-frame-pointer 4 5 # Code size reduction. gcc3 needs a different syntax to gcc2 if you 6 # want to avoid spurious warnings. 7 # 8 CFLAGS += -falign-jumps=1 -falign-loops=1 -falign-functions=1 9 10 # Use %rip-relative addressing wherever possible. 11 # 12 CFLAGS += -fpie 13 14 # Force 64-bit code 15 # 16 CFLAGS += -m64 17 ASFLAGS += --64 18 LDFLAGS += -m elf_x86_64 19 20 # EFI requires -fshort-wchar, and nothing else currently uses wchar_t 21 # 22 CFLAGS += -fshort-wchar 23 24 # We need to undefine the default macro "i386" when compiling .S 25 # files, otherwise ".arch i386" translates to ".arch 1"... 26 # 27 CFLAGS += -Ui386 28 29 # x86_64-specific directories containing source files 30 # 31 SRCDIRS += arch/x86_64/prefix 32 33 # Include common x86 Makefile 34 # 35 MAKEDEPS += arch/x86/Makefile 36 include arch/x86/Makefile 37 38 # Include platform-specific Makefile 39 # 40 MAKEDEPS += arch/x86_64/Makefile.$(PLATFORM) 41 include arch/x86_64/Makefile.$(PLATFORM) 42