Skip to content

__compiletime_assert in arch/x86/platform/efi/efi_64.c #256

@nathanchance

Description

@nathanchance

CONFIG_NO_AUTO_INLINE is a new config option in -next (commit) that prevents compilers from inlining any functions not marked as inline. It gets enabled in an allyesconfig build for x86_64.

The fail I noticed after this is

ld: arch/x86/platform/efi/efi_64.o: in function `efi_sync_low_kernel_mappings':
(.text+0x8e5): undefined reference to `__compiletime_assert_277'

I think it is one of the MAYBE_BUILD_BUG_ON because they involve __builtin_constant_p, relating it to #7. We might not have to worry about this on 4.20/5.0 but we'll see. Will try to look into this over the next few days unless someone else beats me to it.

As a workaround:

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 2a4274b756dc..12a9ade3aecb 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -213,6 +213,7 @@ config GDB_SCRIPTS
 
 config NO_AUTO_INLINE
        bool "Disable compiler auto-inline optimizations"
+       depends on !CC_IS_CLANG
        help
          This will prevent the compiler from optimizing the kernel by
          auto-inlining functions not marked with the inline keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [ARCH] x86_64This bug impacts ARCH=x86_64[BUG] linuxA bug that should be fixed in the mainline kernel.[FIXED][LINUX] 5.11This bug was fixed in Linux 5.11

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions