* [Buildroot] [PATCH 1/1] boot/shim: force arm mode instead of Thumb mode
@ 2024-02-29 21:56 Fabrice Fontaine
2024-03-01 18:06 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2024-02-29 21:56 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
Use OPTIMIZATIONS parameter to pass -marm to fix the following build
failure in Thumb mode:
/tmp/ccEjPM4h.s:941: Error: selected processor does not support `mrc p15,0,r2,c9,c13,0' in Thumb mode
CFLAGS can't be overridden as it is defined as:
CFLAGS = $(FEATUREFLAGS) \
$(OPTIMIZATIONS) \
$(WARNFLAGS) \
$(if $(findstring clang,$(CC)),$(CLANG_WARNINGS)) \
$(ARCH_CFLAGS) \
$(WERRFLAGS) \
$(INCLUDES) \
$(DEFINES)
Fixes:
- http://autobuild.buildroot.org/results/580156f89cfd72122fef07aa2fe37b4fdd4c316b
- http://autobuild.buildroot.org/results/8980c0f422516c7263d8d0c9cc6123f30c4b7ee4
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
boot/shim/shim.mk | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/boot/shim/shim.mk b/boot/shim/shim.mk
index 19b11f4086..ae57677320 100644
--- a/boot/shim/shim.mk
+++ b/boot/shim/shim.mk
@@ -13,10 +13,19 @@ SHIM_CPE_ID_VENDOR = redhat
SHIM_INSTALL_TARGET = NO
SHIM_INSTALL_IMAGES = YES
+SHIM_CFLAGS = $(TARGET_CFLAGS)
SHIM_MAKE_OPTS = \
ARCH="$(GNU_EFI_PLATFORM)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
- DASHJ="-j$(PARALLEL_JOBS)"
+ DASHJ="-j$(PARALLEL_JOBS)" \
+ OPTIMIZATIONS="$(SHIM_CFLAGS)"
+
+# shim has some assembly function that is not present in Thumb mode:
+# Error: selected processor does not support `mrc p15,0,r2,c9,c13,0' in Thumb mode
+# so, we desactivate Thumb mode
+ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
+SHIM_CFLAGS += -marm
+endif
define SHIM_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(SHIM_MAKE_OPTS)
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/shim: force arm mode instead of Thumb mode
2024-02-29 21:56 [Buildroot] [PATCH 1/1] boot/shim: force arm mode instead of Thumb mode Fabrice Fontaine
@ 2024-03-01 18:06 ` Peter Korsgaard
2024-03-18 13:26 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-01 18:06 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> Use OPTIMIZATIONS parameter to pass -marm to fix the following build
> failure in Thumb mode:
> /tmp/ccEjPM4h.s:941: Error: selected processor does not support `mrc p15,0,r2,c9,c13,0' in Thumb mode
> CFLAGS can't be overridden as it is defined as:
> CFLAGS = $(FEATUREFLAGS) \
> $(OPTIMIZATIONS) \
> $(WARNFLAGS) \
> $(if $(findstring clang,$(CC)),$(CLANG_WARNINGS)) \
> $(ARCH_CFLAGS) \
> $(WERRFLAGS) \
> $(INCLUDES) \
> $(DEFINES)
> Fixes:
> - http://autobuild.buildroot.org/results/580156f89cfd72122fef07aa2fe37b4fdd4c316b
> - http://autobuild.buildroot.org/results/8980c0f422516c7263d8d0c9cc6123f30c4b7ee4
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] boot/shim: force arm mode instead of Thumb mode
2024-03-01 18:06 ` Peter Korsgaard
@ 2024-03-18 13:26 ` Peter Korsgaard
0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-18 13:26 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
>> Use OPTIMIZATIONS parameter to pass -marm to fix the following build
>> failure in Thumb mode:
>> /tmp/ccEjPM4h.s:941: Error: selected processor does not support `mrc p15,0,r2,c9,c13,0' in Thumb mode
>> CFLAGS can't be overridden as it is defined as:
>> CFLAGS = $(FEATUREFLAGS) \
>> $(OPTIMIZATIONS) \
>> $(WARNFLAGS) \
>> $(if $(findstring clang,$(CC)),$(CLANG_WARNINGS)) \
>> $(ARCH_CFLAGS) \
>> $(WERRFLAGS) \
>> $(INCLUDES) \
>> $(DEFINES)
>> Fixes:
>> - http://autobuild.buildroot.org/results/580156f89cfd72122fef07aa2fe37b4fdd4c316b
>> - http://autobuild.buildroot.org/results/8980c0f422516c7263d8d0c9cc6123f30c4b7ee4
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> Committed, thanks.
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-18 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 21:56 [Buildroot] [PATCH 1/1] boot/shim: force arm mode instead of Thumb mode Fabrice Fontaine
2024-03-01 18:06 ` Peter Korsgaard
2024-03-18 13:26 ` Peter Korsgaard
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.