__linux__ is not getting defined in android-build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Android |
Fix Released
|
High
|
Bernhard Rosenkraenzer | ||
Linaro Linux |
Triaged
|
Medium
|
Linus Walleij |
Bug Description
On 5 October 2011 09:03, Andy Green <email address hidden> wrote:
> On 10/05/2011 09:54 PM, Somebody in the thread at some point said:
>>
>> On 5 October 2011 08:39, Andy Green<email address hidden> wrote:
>
>>> #else /* One of the BSDs */
>>>
>>>
>>> #include<
>>>
>>> I assume you don't mean to be building for BSD.
>>>
>>> It looks like the way you build the kernel is broken.
>>
>> Hmm... We've got:
>>
>> make ARCH=arm
>> CROSS_COMPILE=
>> defconfig android_
>> make ARCH=arm
>> CROSS_COMPILE=
>> uImage&&\
>> make ARCH=arm
>> CROSS_COMPILE=
>> modules
>>
>> wouldn't __linux__ be defined in the kernel build system?
>
> Yes, and your make lines look reasonable.
>
> Is this perhaps coming from broken toolchain and / or binutils then? Didn't
> I read you are using HEAD toolchain pieces from somewhere now?
>
> There are several places in kernel that use code coming from BSD or designed
> to be 'dual use' that uses __linux__ like this, and it all works fine on my
> 4.5 stuff. Sebjan cooks the same trees using 4.6 gcc ok... it can be
> binutils or make issue too I guess.
>
> For reference my setup is
>
> binutils-
> gcc-4.5.1-5
> make-3.82-6
>
> Your best bet, if it's true you are using avant garde toolchain, is bounce
> it off toolchain guys, there's nothing to fix in our tree as it stands.
Yup. We're one the latest and greatest from Linaro. Its always listed on the build page at:
https:/
I've tried both:
build 3:
build 4:
(Linux/GNU Binutils) 2.21.53.
gcc version 4.6.2 20110908
...for make we're at Natty Narwhal at the moment.
Bero or Ken do you guys know where __linux__ gets defined in the build chain?
Is this a regression? Bero, would you mind taking a look?
> -Andy
>
> --
> Andy Green | TI Landing Team Leader
> Linaro.org │ Open source software for ARM SoCs | Follow Linaro
> http://
> http://
>
--
Zach Pfeffer
Android Platform Team Lead, Linaro Platform Teams
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://
http://
Changed in linaro-android: | |
assignee: | nobody → Bernhard Rosenkraenzer (berolinux) |
importance: | Undecided → High |
status: | New → Confirmed |
milestone: | none → 11.10 |
Changed in linux-linaro: | |
assignee: | Dave Martin (dave-martin-arm) → Linus Walleij (triad) |
status: | New → Triaged |
Changed in linux-linaro: | |
importance: | Undecided → Medium |
My believe is that a bare metal toolchain typically does not define __linux__ ... my gut feel is
that this is a kernel code regression.
Andy, can you check if the #ifdef __linux__ code was introduced after our last 3.0 kernel
drop that we are working with?