]> git.baikalelectronics.ru Git - kernel.git/commit
Makefile: Fix unrecognized cross-compiler command line options
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 27 May 2014 07:54:12 +0000 (09:54 +0200)
committerMichal Marek <mmarek@suse.cz>
Mon, 9 Jun 2014 21:28:07 +0000 (23:28 +0200)
commit3d2ea45071be2c39d733f64ced02538ab31a713f
treecbfd5f69b03cd1cec418f5d90e4124a422f8688e
parentaf7c8a3312b39326eca0980fe98026a0b97b9b91
Makefile: Fix unrecognized cross-compiler command line options

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 ca81ba750ad19f680a1edc569c862b9c9f84fea6 ("Turn off
    -Wmaybe-uninitialized when building with -Os"),
  - commit 87b0a485064e42ccf9599079d97c23bf1b304074 ("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: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile