u-boot/arch/powerpc/cpu/mpc85xx/config.mk
Pali Rohár 138b6061a1 powerpc/mpc85xx: Improve disabling of SPE instructions
Specifying -mspe=no also disables usage of SPE instructions. It is
documented in "[PATCH,rs6000] make -mno-spe work as expected" email:
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html

So replace -mspe=yes by -mspe=no, so make it clear that u-boot has to be
compiled without SPE instructions.

Linux kernel contains following Makefile code to achieve it:

    # No SPE instruction when building kernel
    # (We use all available options to help semi-broken compilers)
    KBUILD_CFLAGS += $(call cc-option,-mno-spe)
    KBUILD_CFLAGS += $(call cc-option,-mspe=no)

Do same for U-Boot.

Signed-off-by: Pali Rohár <pali@kernel.org>
2022-12-22 15:39:13 -05:00

24 lines
735 B
Makefile

# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2002,2003 Motorola Inc.
# Xianghua Xiao, X.Xiao@motorola.com
PLATFORM_CPPFLAGS += -msoft-float -mno-string
PLATFORM_RELFLAGS += -msingle-pic-base -fno-jump-tables
# No SPE instruction when building u-boot
# (We use all available options to help semi-broken compilers)
# see "[PATCH,rs6000] make -mno-spe work as expected" on
# http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html
PLATFORM_CPPFLAGS += $(call cc-option,-mno-spe) \
$(call cc-option,-mspe=no)
ifdef CONFIG_E6500
PLATFORM_CPPFLAGS += -mcpu=e6500
else ifdef CONFIG_E5500
PLATFORM_CPPFLAGS += -mcpu=e5500
else ifdef CONFIG_E500MC
PLATFORM_CPPFLAGS += -mcpu=e500mc
else
PLATFORM_CPPFLAGS += -mcpu=8540
endif