Re: [PATCH] blackfin: Makefile: Add -D__linux__ flag for KBUILD_CFLAGS

From: Chen Gang
Date: Sat Apr 04 2015 - 17:13:46 EST

On 4/4/15 06:56, Richard Weinberger wrote:
> On Fri, Apr 3, 2015 at 10:19 PM, Chen Gang <xili_gchen_5257@xxxxxxxxxxx> wrote:
>> The related error with allmodconfig:
> BTW: How do you generate this allmodconfig?
> "make allmodconfig ARCH=blackfin" cannot work as you need to specify a board...
> Hmm, what compiler are you using?
> It's odd that __linux__ is not defined...

I built the raw cross compiler from the latest gcc/binutils's upsteam

- binutils:

../binutils-gdb/configure --prefix=/upstream/release-blackfin --target=bfin-gchen-elf --disable-nls --with-sysroot=/upstream/release-blackfin --without-headers target_alias=bfin-gchen-elf
make && make install

[root@localhost build-binutils-blackfin]# /upstream/release-blackfin/bin/bfin-gchen-elf-ld -v
GNU ld (GNU Binutils)

- gcc:

../gcc-blackfin/configure --target=bfin-gchen-elf --disable-nls --disable-threads --disable-shared --disable-libssp --disable-libquadmath --disable-libgomp --disable-libatomic --prefix=/upstream/release-blackfin --without-headers target_alias=bfin-gchen-elf --enable-languages=c,lto
make all-gcc && make all-target-libgcc && make install

[root@localhost build-binutils-blackfin]# /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -v
Using built-in specs.
Target: bfin-gchen-elf
Configured with: ../gcc-blackfin/configure --target=bfin-gchen-elf --disable-nls --disable-threads --disable-shared --disable-libssp --disable-libquadmath --disable-libgomp --disable-libatomic --prefix=/upstream/release-blackfin --without-headers target_alias=bfin-gchen-elf --enable-languages=c,lto
Thread model: single
gcc version 5.0.0 20150401 (experimental) (GCC)

- kernel using:

make ARCH=blackfin CROSS_COMPILE=/upstream/release-blackfin/bin/bfin-gchen-elf-

Is what I have done above correct? Or can we treate it as gcc's issue?

Chen Gang

Open, share, and attitude like air, water, and life which God blessed
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at