]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.4.83/avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.83 / avr32-makefile-add-d__linux__-flag-for-gcc-4.4.7-use.patch
1 From 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 Mon Sep 17 00:00:00 2001
2 From: Chen Gang <gang.chen.5i5j@gmail.com>
3 Date: Sat, 1 Feb 2014 20:35:54 +0800
4 Subject: avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
5
6 From: Chen Gang <gang.chen.5i5j@gmail.com>
7
8 commit 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 upstream.
9
10 For avr32 cross compiler, do not define '__linux__' internally, so it
11 will cause issue with allmodconfig.
12
13 The related error:
14
15 CC [M] fs/coda/psdev.o
16 In file included from include/linux/coda.h:64,
17 from fs/coda/psdev.c:45:
18 include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'
19
20 The related toolchain version (which only download, not re-compile):
21
22 [root@gchen linux-next]# /upstream/toolchain/download/avr32-gnu-toolchain-linux_x86/bin/avr32-gcc -v
23 Using built-in specs.
24 Target: avr32
25 Configured with: /data2/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/src/gcc/configure --target=avr32 --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-languages=c,c++ --disable-nls --disable-libssp --disable-libstdcxx-pch --with-dwarf2 --enable-version-specific-runtime-libs --disable-shared --enable-doc --with-mpfr-lib=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/lib --with-mpfr-include=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/include --with-gmp=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --with-mpc=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-__cxa_atexit --disable-shared --with-newlib --with-pkgversion=AVR_32_bit_GNU_Toolchain_3.4.2_435 --with-bugurl=http://www
26 .atmel.com/avr
27 Thread model: single
28 gcc version 4.4.7 (AVR_32_bit_GNU_Toolchain_3.4.2_435)
29
30 Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
31 Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
32 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33
34 ---
35 arch/avr32/Makefile | 2 +-
36 1 file changed, 1 insertion(+), 1 deletion(-)
37
38 --- a/arch/avr32/Makefile
39 +++ b/arch/avr32/Makefile
40 @@ -11,7 +11,7 @@ all: uImage vmlinux.elf
41
42 KBUILD_DEFCONFIG := atstk1002_defconfig
43
44 -KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
45 +KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__
46 KBUILD_AFLAGS += -mrelax -mno-pic
47 KBUILD_CFLAGS_MODULE += -mno-relax
48 LDFLAGS_vmlinux += --relax