zephyr/scripts/Makefile.x86.preparch

40 lines
1.5 KiB
Makefile

PERF_OPT_FLAG-y = -DPERF_OPT
ALIGN_STACK_FLAG- = -mpreferred-stack-boundary=2
SECTION_GC_FLAG-y = $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
LTO_FLAG-y = $(call cc-option,-flto,)
PERF_OPT=$(if $(filter -Os,$(DEFAULTFLAGS)),,y)
PERF_OPT_FLAG = $(PERF_OPT_FLAG-$(PERF_OPT))
ALIGN_STACK_FLAG = $(ALIGN_STACK_FLAG-$(PERF_OPT))
SECTION_GC_FLAG = $(SECTION_GC_FLAG-$(CONFIG_SECTION_GARBAGE_COLLECTION))
LTO_FLAG = $(LTO_FLAG-$(CONFIG_LTO))
ifneq ($(CONFIG_BSP_QUARK),y)
iSSE_FP_MATH_ ?= -mno-sse
iSSE_FP_MATH ?= ${iSSE_FP_MATH_${CONFIG_SSE_FP_MATH}}
endif
x86_FLAGS = -DVXMICRO_ARCH_x86
x86_FLAGS += -DVXMICRO_ARCH=x86
x86_FLAGS += $(ALIGN_STACK_FLAG)
x86_FLAGS += $(SECTION_GC_FLAG)
x86_FLAGS += $(LTO_FLAG)
x86_FLAGS += $(LTO_FLAG)
x86_FLAGS += $(PERF_OPT_FLAG)
x86_FLAGS += $(iSSE_FP_MATH)
LDFLAG_LINKERCMD = -DVXMICRO_ARCH_x86
ISA_FLAG_pentium4-$(CONFIG_BSP_PCPENTIUM4) = -march=pentium4
ISA_FLAG_minuteia-$(CONFIG_BSP_PCMINUTEIA) = -march=pentium
ISA_FLAG_atom_n28xx-$(CONFIG_BSP_ATOM_N28XX) = -march=atom -mtune=atom
ISA_FLAG_x86 = $(strip $(ISA_FLAG_pentium4-y) $(ISA_FLAG_minuteia-y) $(ISA_FLAG_atom_n28xx-y))
QEMU_BIOS ?= /usr/share/qemu
QEMU_CPU_TYPE_x86 = qemu32
QEMU_FLAGS_x86 = -m 32 -cpu $(QEMU_CPU_TYPE_x86) \
-no-reboot -nographic -display none -net none \
-clock dynticks -no-acpi -balloon none -no-hpet \
-L $(QEMU_BIOS) -bios bios.bin \
-serial mon:stdio -machine type=pc-0.14
QEMU_x86 = qemu-system-i386
export ISA_FLAG_x86 QEMU_FLAGS_x86 QEMU_x86 QEMU_CPU_TYPE_x86