All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken
@ 2015-07-27 20:28 Brendan Heading
  2015-07-27 20:48 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Brendan Heading @ 2015-07-27 20:28 UTC (permalink / raw)
  To: buildroot

Hi guys,

While looking at the dmraid build bug on nios2 I noted that it is not
possible to build a buildroot toolchain based on GCC 4.9.x for that
platform.

You can reproduce the problem using the following (one-line) defconfig :

BR2_nios2=y

I tested it against the commit : 5ccde01652bc41da325bf4c9a5abbf0031080784

The error is as follows :

=============
../../../libgcc/config/nios2/linux-atomic.c:23:24: fatal error:
asm/unistd.h: No such file or directory
 #include <asm/unistd.h>
                        ^
compilation terminated.
=============

The problem only occurs on GCC 4.9.x. GCC 5.x builds fine.

Someone already submitted a patch to fix this :

http://lists.busybox.net/pipermail/buildroot/2015-February/119084.html

The submitter promised to do some more work but it seems to have been left
that way since last February.

We can either :
- disable GCC 4.9.x for nios2 (leaving 5.x as the only supported buildroot
toolchain)
- integrate & test the above patch

What does everyone think ? Given that the above patch seems to be
considered incomplete maybe we should disable nios2 4.9.x for now until the
required additions have been submitted.

regards

Brendan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150727/fb963678/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken
  2015-07-27 20:28 [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken Brendan Heading
@ 2015-07-27 20:48 ` Thomas Petazzoni
  2015-08-01 16:15   ` Ezequiel Garcia
       [not found]   ` <55BCEF0B.5050101@free-electrons.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-07-27 20:48 UTC (permalink / raw)
  To: buildroot

Dear Brendan Heading,

On Mon, 27 Jul 2015 21:28:21 +0100, Brendan Heading wrote:

> While looking at the dmraid build bug on nios2 I noted that it is not
> possible to build a buildroot toolchain based on GCC 4.9.x for that
> platform.
> 
> You can reproduce the problem using the following (one-line) defconfig :
> 
> BR2_nios2=y
> 
> I tested it against the commit : 5ccde01652bc41da325bf4c9a5abbf0031080784
> 
> The error is as follows :
> 
> =============
> ../../../libgcc/config/nios2/linux-atomic.c:23:24: fatal error:
> asm/unistd.h: No such file or directory
>  #include <asm/unistd.h>
>                         ^
> compilation terminated.
> =============
> 
> The problem only occurs on GCC 4.9.x. GCC 5.x builds fine.
> 
> Someone already submitted a patch to fix this :
> 
> http://lists.busybox.net/pipermail/buildroot/2015-February/119084.html
> 
> The submitter promised to do some more work but it seems to have been left
> that way since last February.
> 
> We can either :
> - disable GCC 4.9.x for nios2 (leaving 5.x as the only supported buildroot
> toolchain)
> - integrate & test the above patch
> 
> What does everyone think ? Given that the above patch seems to be
> considered incomplete maybe we should disable nios2 4.9.x for now until the
> required additions have been submitted.

Hum, that's interesting. I indeed saw that gcc 4.9.3 was not building
properly for NIOS II. However, gcc 4.9.2 built fine for me. Look at
http://autobuild.buildroot.org/toolchains/tarballs/br-nios2-full-2015.05.tar.bz2:
it is a NIOS II gcc 4.9.2 toolchain generated by Buildroot.

So I don't really understand how Ezequiel fall into the problem of
<asm/unistd.h> with gcc 4.9.2. But I did indeed fall into this problem
with gcc 4.9.3.

Or maybe the problem is *not* gcc version related only, but also
related to the kernel headers version?

But in any case, Ezequiel's patch seems fine to me, I'll try to apply
something similar.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken
  2015-07-27 20:48 ` Thomas Petazzoni
@ 2015-08-01 16:15   ` Ezequiel Garcia
       [not found]   ` <55BCEF0B.5050101@free-electrons.com>
  1 sibling, 0 replies; 4+ messages in thread
From: Ezequiel Garcia @ 2015-08-01 16:15 UTC (permalink / raw)
  To: buildroot

(resending from a subscribed mail this time)

On 07/27/2015 05:48 PM, Thomas Petazzoni wrote:
> Dear Brendan Heading,
>

Hi Brendan,

Thanks a lot for the report.

> On Mon, 27 Jul 2015 21:28:21 +0100, Brendan Heading wrote:
>
>> While looking at the dmraid build bug on nios2 I noted that it is not
>> possible to build a buildroot toolchain based on GCC 4.9.x for that
>> platform.
>>
>> You can reproduce the problem using the following (one-line) defconfig :
>>
>> BR2_nios2=y
>>
>> I tested it against the commit : 5ccde01652bc41da325bf4c9a5abbf0031080784
>>
>> The error is as follows :
>>
>> =============
>> ../../../libgcc/config/nios2/linux-atomic.c:23:24: fatal error:
>> asm/unistd.h: No such file or directory
>>   #include <asm/unistd.h>
>>                          ^
>> compilation terminated.
>> =============
>>
>> The problem only occurs on GCC 4.9.x. GCC 5.x builds fine.
>>
>> Someone already submitted a patch to fix this :
>>
>> http://lists.busybox.net/pipermail/buildroot/2015-February/119084.html
>>
>> The submitter promised to do some more work but it seems to have been left
>> that way since last February.
>>

Not entirely true :-) I actually did re-submit the patch later,
together with the rest of the internal toolchain support (as was
requested):

http://patchwork.ozlabs.org/patch/440651/

>> We can either :
>> - disable GCC 4.9.x for nios2 (leaving 5.x as the only supported buildroot
>> toolchain)
>> - integrate & test the above patch
>>
>> What does everyone think ? Given that the above patch seems to be
>> considered incomplete maybe we should disable nios2 4.9.x for now until the
>> required additions have been submitted.
>
> Hum, that's interesting. I indeed saw that gcc 4.9.3 was not building
> properly for NIOS II. However, gcc 4.9.2 built fine for me. Look at
> http://autobuild.buildroot.org/toolchains/tarballs/br-nios2-full-2015.05.tar.bz2:
> it is a NIOS II gcc 4.9.2 toolchain generated by Buildroot.
>
> So I don't really understand how Ezequiel fall into the problem of
> <asm/unistd.h> with gcc 4.9.2. But I did indeed fall into this problem
> with gcc 4.9.3.
>

Hope I'm not being nonsense (it's been a while since February and I
haven't touched my nios2), but maybe you didn't fall because you had
my patch applied when you built that toolchain?

> Or maybe the problem is *not* gcc version related only, but also
> related to the kernel headers version?
>

Looking through the rest of the architectures, the only
ones that have any non-local includes are m68k and nios2:

$ find libgcc/config/ -name *atomic.c
libgcc/config/nios2/linux-atomic.c
libgcc/config/tilepro/atomic.c
libgcc/config/sh/linux-atomic.c
libgcc/config/m68k/linux-atomic.c
libgcc/config/arm/linux-atomic.c
libgcc/config/pa/linux-atomic.c

$ find libgcc/config/ -name *atomic.c | xargs grep "include <"
libgcc/config/nios2/linux-atomic.c:#include <asm/unistd.h>
libgcc/config/m68k/linux-atomic.c:#include <asm/unistd.h>
libgcc/config/m68k/linux-atomic.c:#include <stdbool.h>

The rest don't include anything, so I'd guess it's gcc what's wrong.
I don't know much about gcc, so it's really just a guess.

> But in any case, Ezequiel's patch seems fine to me, I'll try to apply
> something similar.
>

And maybe the GCC maintainers can manage to include this change
in future releases (Ccing Chung-Lin Tang).

-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken
       [not found]     ` <55BDAF2C.1050301@gmail.com>
@ 2015-08-03 15:48       ` Ezequiel Garcia
  0 siblings, 0 replies; 4+ messages in thread
From: Ezequiel Garcia @ 2015-08-03 15:48 UTC (permalink / raw)
  To: buildroot

On 2 August 2015 at 02:48, Chung-Lin Tang <chunglin.tang@gmail.com> wrote:
> On 2015/8/2 12:08 AM, Ezequiel Garcia wrote:
>> On 07/27/2015 05:48 PM, Thomas Petazzoni wrote:
>>> Dear Brendan Heading,
>>>
>>
>> Hi Brendan,
>>
>> Thanks a lot for the report.
>>
>>> On Mon, 27 Jul 2015 21:28:21 +0100, Brendan Heading wrote:
>>>
>>>> While looking at the dmraid build bug on nios2 I noted that it is not
>>>> possible to build a buildroot toolchain based on GCC 4.9.x for that
>>>> platform.
>>>>
>>>> You can reproduce the problem using the following (one-line) defconfig :
>>>>
>>>> BR2_nios2=y
>>>>
>>>> I tested it against the commit : 5ccde01652bc41da325bf4c9a5abbf0031080784
>>>>
>>>> The error is as follows :
>>>>
>>>> =============
>>>> ../../../libgcc/config/nios2/linux-atomic.c:23:24: fatal error:
>>>> asm/unistd.h: No such file or directory
>>>>   #include <asm/unistd.h>
>>>>                          ^
>>>> compilation terminated.
>>>> =============
>>>>
>>>> The problem only occurs on GCC 4.9.x. GCC 5.x builds fine.
>>>>
>>>> Someone already submitted a patch to fix this :
>>>>
>>>> http://lists.busybox.net/pipermail/buildroot/2015-February/119084.html
>>>>
>>>> The submitter promised to do some more work but it seems to have been left
>>>> that way since last February.
>>>>
>>
>> Not entirely true :-) I actually did re-submit the patch later,
>> together with the rest of the internal toolchain support (as was
>> requested):
>>
>> http://patchwork.ozlabs.org/patch/440651/
>>
>>>> We can either :
>>>> - disable GCC 4.9.x for nios2 (leaving 5.x as the only supported buildroot
>>>> toolchain)
>>>> - integrate & test the above patch
>>>>
>>>> What does everyone think ? Given that the above patch seems to be
>>>> considered incomplete maybe we should disable nios2 4.9.x for now until the
>>>> required additions have been submitted.
>>>
>>> Hum, that's interesting. I indeed saw that gcc 4.9.3 was not building
>>> properly for NIOS II. However, gcc 4.9.2 built fine for me. Look at
>>> http://autobuild.buildroot.org/toolchains/tarballs/br-nios2-full-2015.05.tar.bz2:
>>> it is a NIOS II gcc 4.9.2 toolchain generated by Buildroot.
>>>
>>> So I don't really understand how Ezequiel fall into the problem of
>>> <asm/unistd.h> with gcc 4.9.2. But I did indeed fall into this problem
>>> with gcc 4.9.3.
>>>
>>
>> Hope I'm not being nonsense (it's been a while since February and I
>> haven't touched my nios2), but maybe you didn't fall because you had
>> my patch applied when you built that toolchain?
>>
>>> Or maybe the problem is *not* gcc version related only, but also
>>> related to the kernel headers version?
>>>
>>
>> Looking through the rest of the architectures, the only
>> ones that have any non-local includes are m68k and nios2:
>>
>> $ find libgcc/config/ -name *atomic.c
>> libgcc/config/nios2/linux-atomic.c
>> libgcc/config/tilepro/atomic.c
>> libgcc/config/sh/linux-atomic.c
>> libgcc/config/m68k/linux-atomic.c
>> libgcc/config/arm/linux-atomic.c
>> libgcc/config/pa/linux-atomic.c
>>
>> $ find libgcc/config/ -name *atomic.c | xargs grep "include <"
>> libgcc/config/nios2/linux-atomic.c:#include <asm/unistd.h>
>> libgcc/config/m68k/linux-atomic.c:#include <asm/unistd.h>
>> libgcc/config/m68k/linux-atomic.c:#include <stdbool.h>
>>
>> The rest don't include anything, so I'd guess it's gcc what's wrong.
>> I don't know much about gcc, so it's really just a guess.
>>
>>> But in any case, Ezequiel's patch seems fine to me, I'll try to apply
>>> something similar.
>>>
>>
>> And maybe the GCC maintainers can manage to include this change
>> in future releases (Ccing Chung-Lin Tang).
>
> I recently committed the patch to remove the '#include <asm/unistd.h>' line
> to upstream 5.x, 4.9.x branches, though it's not in 4.9.3.
> You can get it immediately if there's an option in buildroot to checkout
> stable branches of upstream GCC (as opposed to only released tarballs)
>

That's great! thanks for the update,
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-03 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 20:28 [Buildroot] nios2 : gcc 4.9.x buildroot toolchain broken Brendan Heading
2015-07-27 20:48 ` Thomas Petazzoni
2015-08-01 16:15   ` Ezequiel Garcia
     [not found]   ` <55BCEF0B.5050101@free-electrons.com>
     [not found]     ` <55BDAF2C.1050301@gmail.com>
2015-08-03 15:48       ` Ezequiel Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.