• G
    Makefile: Fix unrecognized cross-compiler command line options · a1c48bb1
    Geert Uytterhoeven 提交于
    On architectures that setup CROSS_COMPILE in their arch/*/Makefile
    (arc, blackfin, m68k, mips, parisc, score, sh, tile, unicore32, xtensa),
    cc-option and cc-disable-warning may check against the wrong compiler,
    causing errors like
    
        cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
    
    if the host gcc supports a compiler option, while the cross compiler
    doesn't support that option.
    
    Move all logic using cc-option or cc-disable-warning below the inclusion
    of the arch's Makefile to fix this.
    
    Introduced by
      - commit e74fc973 ("Turn off
        -Wmaybe-uninitialized when building with -Os"),
      - commit 61163efa ("kbuild: LLVMLinux:
        Add Kbuild support for building kernel with Clang").
    
    As -Wno-maybe-uninitialized requires a quite recent gcc (gcc 4.6.3 on
    Ubuntu 12.04 LTS doesn't support it), this only showed up recently (gcc
    4.8.2 on Ubuntu 14.04 LTS does support it).
    Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: NMichal Marek <mmarek@suse.cz>
    a1c48bb1
Makefile 50.9 KB