mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-06 17:55:42 +00:00
Fixes Makefile.x86.preparch so that the ISA optimization passed to the compiler is based on the CPU rather than the BSP. Change-Id: I78e4ad10fbc3d25a20367ccd3c4df39ffbfa8380 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
35 lines
1.3 KiB
Makefile
35 lines
1.3 KiB
Makefile
PERF_OPT_FLAG-y = -DPERF_OPT
|
|
ALIGN_STACK_FLAG- = -mpreferred-stack-boundary=2
|
|
SECTION_GC_FLAG = $(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))
|
|
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 += $(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)
|
|
|
|
ISA_FLAG_pentium4-$(CONFIG_CPU_PENTIUM4) = -march=pentium4
|
|
ISA_FLAG_quark-$(CONFIG_CPU_MINUTEIA) = -march=pentium
|
|
ISA_FLAG_atom-$(CONFIG_CPU_ATOM) = -march=atom -mtune=atom
|
|
ISA_FLAG_x86 = $(strip $(ISA_FLAG_pentium4-y) $(ISA_FLAG_quark-y) $(ISA_FLAG_atom-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
|