Skip to content
  • Paul Burton's avatar
    compiler.h: Allow arch-specific asm/compiler.h · 3c3bec81
    Paul Burton authored
    [ Upstream commit 04f264d3 ]
    
    We have a need to override the definition of
    barrier_before_unreachable() for MIPS, which means we either need to add
    architecture-specific code into linux/compiler-gcc.h or we need to allow
    the architecture to provide a header that can define the macro before
    the generic definition. The latter seems like the better approach.
    
    A straightforward approach to the per-arch header is to make use of
    asm-generic to provide a default empty header & adjust architectures
    which don't need anything specific to make use of that by adding the
    header to generic-y. Unfortunately this doesn't work so well due to
    commit 28128c61 ("kconfig.h: Include compiler types to avoid missed
    struct attributes") which caused linux/compiler_types.h to be included
    in the compilation of every C file via the -include linux/kconfig.h flag
    in c_flags.
    
    Because the -include flag is present for all C files we compile, we need
    the ar...
    3c3bec81