blob: 01b94908be56d96f1f5f6ea688cec0765a1d7ce4 [file] [log] [blame]
Juan Manuel Cruza0b54662015-02-17 11:16:47 -06001PERF_OPT_FLAG-y = -DPERF_OPT
2ALIGN_STACK_FLAG- = -mpreferred-stack-boundary=2
Juan Manuel Cruz6e666cf2015-05-06 10:30:41 -05003SECTION_GC_FLAG = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
Juan Manuel Cruza0b54662015-02-17 11:16:47 -06004LTO_FLAG-y = $(call cc-option,-flto,)
Juan Manuel Cruz06b41d12015-05-04 17:35:22 -05005PERF_OPT=$(if $(filter -Os,$(DEFAULTFLAGS)),,y)
Juan Manuel Cruza0b54662015-02-17 11:16:47 -06006PERF_OPT_FLAG = $(PERF_OPT_FLAG-$(PERF_OPT))
7ALIGN_STACK_FLAG = $(ALIGN_STACK_FLAG-$(PERF_OPT))
Juan Manuel Cruza0b54662015-02-17 11:16:47 -06008LTO_FLAG = $(LTO_FLAG-$(CONFIG_LTO))
Juan Manuel Cruz71c70832015-05-04 17:37:57 -05009ifneq ($(CONFIG_BSP_QUARK),y)
10iSSE_FP_MATH_ ?= -mno-sse
11iSSE_FP_MATH ?= ${iSSE_FP_MATH_${CONFIG_SSE_FP_MATH}}
12endif
Juan Manuel Cruza0b54662015-02-17 11:16:47 -060013x86_FLAGS += $(ALIGN_STACK_FLAG)
14x86_FLAGS += $(SECTION_GC_FLAG)
15x86_FLAGS += $(LTO_FLAG)
16x86_FLAGS += $(LTO_FLAG)
17x86_FLAGS += $(PERF_OPT_FLAG)
Juan Manuel Cruz71c70832015-05-04 17:37:57 -050018x86_FLAGS += $(iSSE_FP_MATH)
19
Juan Manuel Cruzfbc59562015-05-04 17:31:43 -050020ISA_FLAG_pentium4-$(CONFIG_BSP_PCPENTIUM4) = -march=pentium4
21ISA_FLAG_minuteia-$(CONFIG_BSP_PCMINUTEIA) = -march=pentium
22ISA_FLAG_atom_n28xx-$(CONFIG_BSP_ATOM_N28XX) = -march=atom -mtune=atom
23ISA_FLAG_x86 = $(strip $(ISA_FLAG_pentium4-y) $(ISA_FLAG_minuteia-y) $(ISA_FLAG_atom_n28xx-y))
Juan Manuel Cruze7de0f62015-04-30 14:14:29 -050024
25QEMU_BIOS ?= /usr/share/qemu
26QEMU_CPU_TYPE_x86 = qemu32
27QEMU_FLAGS_x86 = -m 32 -cpu $(QEMU_CPU_TYPE_x86) \
28 -no-reboot -nographic -display none -net none \
29 -clock dynticks -no-acpi -balloon none -no-hpet \
30 -L $(QEMU_BIOS) -bios bios.bin \
31 -serial mon:stdio -machine type=pc-0.14
32QEMU_x86 = qemu-system-i386
33
Juan Manuel Cruzfbc59562015-05-04 17:31:43 -050034export ISA_FLAG_x86 QEMU_FLAGS_x86 QEMU_x86 QEMU_CPU_TYPE_x86