Skip to content
  • Mike Frysinger's avatar
    gen_matypes: fix cross-compiling with gcc · 73c9b4b0
    Mike Frysinger authored and Matt Turner's avatar Matt Turner committed
    
    
    The current gen_matypes logic assumes that the host compiler will produce
    information that is useful for the target compiler.  Unfortunately, this
    is not the case whenever cross-compiling.
    
    When we detect that we're cross-compiling and using GCC, use the target
    compiler to produce assembly from the gen_matypes.c source, then process
    it with a shell script to create a usable header.  This is similar to how
    the linux kernel creates its asm-offsets.c file.
    
    Reviewed-by: default avatarMatt Turner <mattst88@gmail.com>
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    73c9b4b0