diff mbox series

[1/1] boot/shim: disable on mips64el

Message ID 20220419121409.2055818-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] boot/shim: disable on mips64el | expand

Commit Message

Fabrice Fontaine April 19, 2022, 12:14 p.m. UTC
Fix the following build failure on mips64el raised since commit
11b347c03ab0b38389ec11b48f63236a3b4d6547:

In file included from shim.h:47,
                 from shim.c:14:
/nvmedata/autobuild/instance-17/output-1/build/shim-15.4/include/system/stdarg.h:72:2: error: #error what arch is this
   72 | #error what arch is this
      |  ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/74f4f1d010cfde6978fd614195ef0006f0acb45a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 boot/shim/Config.in | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni April 19, 2022, 7:36 p.m. UTC | #1
On Tue, 19 Apr 2022 14:14:09 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failure on mips64el raised since commit
> 11b347c03ab0b38389ec11b48f63236a3b4d6547:
> 
> In file included from shim.h:47,
>                  from shim.c:14:
> /nvmedata/autobuild/instance-17/output-1/build/shim-15.4/include/system/stdarg.h:72:2: error: #error what arch is this
>    72 | #error what arch is this
>       |  ^~~~~

As usual, I don't like this kind of fixes that consist in simply "let's
disable in the specific case that causes problem". If you look at that
include/system/stdarg.h, you see:

#if defined(__aarch64__) || defined(__arm__) || defined(__i386__) || \
        defined(__i486__) || defined(__i686__)

...

#elif defined(__x86_64__)

...

#else
#error what arch is this
#endif

So basically, any architecture other than the ones listed above is
going to raise this build issue, not just mips64el.

Yes, BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS already disables on most CPU
architectures, but shim also has its own list of CPU architectures it
supports. So we probably want a BR2_TARGET_SHIM_ARCH_SUPPORTS, which
depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS and then adds an explicit
list of architectures that shim supports.

Thanks!

Thomas
Peter Korsgaard April 19, 2022, 7:48 p.m. UTC | #2
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure on mips64el raised since commit
 > 11b347c03ab0b38389ec11b48f63236a3b4d6547:

 > In file included from shim.h:47,
 >                  from shim.c:14:
 > /nvmedata/autobuild/instance-17/output-1/build/shim-15.4/include/system/stdarg.h:72:2: error: #error what arch is this
 >    72 | #error what arch is this
 >       |  ^~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/74f4f1d010cfde6978fd614195ef0006f0acb45a

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.
Peter Korsgaard May 22, 2022, 10:29 a.m. UTC | #3
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure on mips64el raised since commit
 > 11b347c03ab0b38389ec11b48f63236a3b4d6547:

 > In file included from shim.h:47,
 >                  from shim.c:14:
 > /nvmedata/autobuild/instance-17/output-1/build/shim-15.4/include/system/stdarg.h:72:2: error: #error what arch is this
 >    72 | #error what arch is this
 >       |  ^~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/74f4f1d010cfde6978fd614195ef0006f0acb45a

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/boot/shim/Config.in b/boot/shim/Config.in
index 2f74d6f332..b0e549a51b 100644
--- a/boot/shim/Config.in
+++ b/boot/shim/Config.in
@@ -2,6 +2,7 @@  config BR2_TARGET_SHIM
 	bool "shim"
 	# it includes gnu-efi
 	depends on BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS
+	depends on !BR2_mips64el
 	help
 	  Boot loader to chain-load signed boot loaders under Secure
 	  Boot.