I am compiling u-boot v2020.04-rc5
My Environment.
Host: 18.04.1-Ubuntu SMP
Make Version: GNU Make 4.1
Toolchain: gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi
Target: STM32F769
Steps to Replicate Issue:
Step1: git clone https://github.com/u-boot/u-boot.git
Step2: cd u-boot
Step3: git checkout v2020.04-rc5
Step4: make ARCH=arm CROSS_COMPILE=~/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi- stm32f769-disco_defconfig
Step5: enable support for UBIFS (CONFIG_CMD_UBI=y) by menuconfig
Step6: make ARCH=arm CROSS_COMPILE=~/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi-
Desired Output: build is successful. Actual Output: Error as shown below.
$ /home/sicris/Downloads/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc -Wp,-MD,fs/ubifs/.super.o.d -nostdinc -isystem /home/sicris/Downloads/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/bin/../lib/gcc/arm-linux-gnueabi/7.5.0/include -Iinclude -I../include -I../arch/arm/include -include ../include/linux/kconfig.h -I../fs/ubifs -Ifs/ubifs -D_KERNEL_ -D_UBOOT_ -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -std=gnu11 -fshort-wchar -fno-strict-aliasing -fno-PIE -Os -fno-stack-protector -fno-delete-null-pointer-checks -g -fstack-usage -Wno-format-nonliteral -Werror=date-time -D_ARM_ -Wa,-mimplicit-it=always -mthumb -mthumb-interwork -mabi=aapcs-linux -mword-relocations -fno-pic -mno-unaligned-access -ffunction-sections -fdata-sections -fno-common -ffixed-r9 -msoft-float -pipe -march=armv7-m -D_LINUX_ARM_ARCH_=7 -I../../arch/arm/mach-stm32/include -I../arch/arm/mach-stm32/include -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(super)" -D"KBUILD_MODNAME=KBUILD_STR(super)" -c -o fs/ubifs/super.o ../fs/ubifs/super.c
{standard input}: Assembler messages:{standard input} :755: Error: selected processor does not support requested special purpose register – `mrs r1,cpsr'
{standard input}:757: Error: selected processor does not support requested special purpose register – msr cpsr_c,r3'{standard input}
:770: Error: selected processor does not support requested special purpose register –
msr cpsr_c,r1'
{standard input}:835: Error: selected processor does not support requested special purpose register – mrs r4,cpsr'{standard input}
:837: Error: selected processor does not support requested special purpose register –
msr cpsr_c,r2'
{standard input} :850: Error: selected processor does not support requested special purpose register – `msr cpsr_c,r4'
Notes:
I tried to add "-mtune=cortex-m7" compile flag. The result is the same.
I tried to add "-mcpu=cortex-m7" and "-march=armv7e-m". The result is the same.
Question:
Am I missing any compile flag setting?
Is there a workaround on this?
I will also post this question on the linaro developer technical support.
proc-arm/system.h
will be included during the build process . I removed my incorrect answer, sorry for the noise. – Frant