* [PATCH 1/1] Makefile: ARMv7-M has no CPSR register
@ 2020-04-10 9:10 Heinrich Schuchardt
2020-04-24 17:11 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-04-10 9:10 UTC (permalink / raw)
To: u-boot
Compiling on ARMv7-M fails when trying to address the CPSR register which
is not available on this architecture.
Atomic functions refer to the CPSR register if compiled with
arch/arm/include/asm/proc-armv/system.h. On ARMv7-M we should hence
use arch/arm/thumb1/include/asm/proc-armv/system.h instead.
Cf. https://stackoverflow.com/questions/61097841/error-selected-processor-does-not-support-requested-special-purpose-register
Reported-by: Sicris Rey Embay <sicris.embay@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
Makefile | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 8de5ff6d94..4690eb5b87 100644
--- a/Makefile
+++ b/Makefile
@@ -701,13 +701,15 @@ KBUILD_CFLAGS += $(KCFLAGS)
# Use UBOOTINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
UBOOTINCLUDE := \
- -Iinclude \
- $(if $(KBUILD_SRC), -I$(srctree)/include) \
- $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
- $(if $(CONFIG_HAS_THUMB2),, \
- -I$(srctree)/arch/$(ARCH)/thumb1/include),) \
- -I$(srctree)/arch/$(ARCH)/include \
- -include $(srctree)/include/linux/kconfig.h
+ -Iinclude \
+ $(if $(KBUILD_SRC), -I$(srctree)/include) \
+ $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
+ $(if $(CONFIG_HAS_THUMB2), \
+ $(if $(CONFIG_CPU_V7M), \
+ -I$(srctree)/arch/arm/thumb1/include), \
+ -I$(srctree)/arch/arm/thumb1/include)) \
+ -I$(srctree)/arch/$(ARCH)/include \
+ -include $(srctree)/include/linux/kconfig.h
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] Makefile: ARMv7-M has no CPSR register
2020-04-10 9:10 [PATCH 1/1] Makefile: ARMv7-M has no CPSR register Heinrich Schuchardt
@ 2020-04-24 17:11 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-04-24 17:11 UTC (permalink / raw)
To: u-boot
On Fri, Apr 10, 2020 at 11:10:32AM +0200, Heinrich Schuchardt wrote:
> Compiling on ARMv7-M fails when trying to address the CPSR register which
> is not available on this architecture.
>
> Atomic functions refer to the CPSR register if compiled with
> arch/arm/include/asm/proc-armv/system.h. On ARMv7-M we should hence
> use arch/arm/thumb1/include/asm/proc-armv/system.h instead.
>
> Cf. https://stackoverflow.com/questions/61097841/error-selected-processor-does-not-support-requested-special-purpose-register
>
> Reported-by: Sicris Rey Embay <sicris.embay@gmail.com>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200424/0c704814/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-24 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10 9:10 [PATCH 1/1] Makefile: ARMv7-M has no CPSR register Heinrich Schuchardt
2020-04-24 17:11 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.