Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / arch / x86_64 / Makefile
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 # Add -maccumulate-outgoing-args if required by this version of gcc
30 #
31 ifeq ($(CCTYPE),gcc)
32 MS_ABI_TEST_CODE := extern void __attribute__ (( ms_abi )) ms_abi(); \
33                     void sysv_abi ( void ) { ms_abi(); }
34 MS_ABI_TEST = $(ECHO) '$(MS_ABI_TEST_CODE)' | \
35               $(CC) -m64 -mno-accumulate-outgoing-args -x c -c - -o /dev/null \
36                     >/dev/null 2>&1
37 MS_ABI_FLAGS := $(shell $(MS_ABI_TEST) || $(ECHO) '-maccumulate-outgoing-args')
38 WORKAROUND_CFLAGS += $(MS_ABI_FLAGS)
39 endif
40
41 # x86_64-specific directories containing source files
42 #
43 SRCDIRS         += arch/x86_64/prefix
44
45 # Include common x86 Makefile
46 #
47 MAKEDEPS        += arch/x86/Makefile
48 include arch/x86/Makefile
49
50 # Include platform-specific Makefile
51 #
52 MAKEDEPS        += arch/x86_64/Makefile.$(PLATFORM)
53 include arch/x86_64/Makefile.$(PLATFORM)