All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Compiling gcc for the target?
@ 2018-01-28  2:35 Stuart Longland
  2018-01-28  3:30 ` Baruch Siach
  0 siblings, 1 reply; 7+ messages in thread
From: Stuart Longland @ 2018-01-28  2:35 UTC (permalink / raw)
  To: buildroot

Hi all,

I'm trying to bootstrap a musl system and am running into a road-block
with regards to getting a C compiler running on the target.  My target
is ARMv5 (specifically, ARM926EJ-S).

The aim will be to use a QEMU VM to "natively" compile packages, as
there's lots of packages that just don't cross-compile.

The fun ensues when I try to select `gcc` as a package in buildroot:
>  /tmp/buildroot-2017.11.2/.config - Buildroot 2017.11.2 Configuration
>  ? Target packages ? Development tools ????????????????????????????????????????????
>   ?????????????????????????????? Development tools ??????????????????????????????
>   ?  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty     ?  
>   ?  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y> selects a  ?  
>   ?  feature, while <N> excludes a feature.  Press <Esc><Esc> to exit, <?> for  ?  
>   ?  Help, </> for Search.  Legend: [*] feature is selected  [ ] feature is     ?  
>   ? ??????(-)?????????????????????????????????????????????????????????????????? ?  
>   ? ?    [ ] cppunit                                                          ? ?  
>   ? ?    [ ] cvs                                                              ? ?  
>   ? ?    [ ] cxxtest                                                          ? ?  
>   ? ?    [ ] flex                                                             ? ?  
>   ? ?    [ ] gettext                                                          ? ?  
>   ? ?    [ ] git                                                              ? ?  
>   ? ?    [ ] git-crypt                                                        ? ?  
>   ? ?    [ ] gperf                                                            ? ?  
>   ? ?    [ ] jo                                                               ? ?  
>   ? ?    [ ] jq                                                               ? ?  
>   ? ?    [ ] libtool                                                          ? ?  
>   ? ??????(+)?????????????????????????????????????????????????????????????????? ?  
>   ???????????????????????????????????????????????????????????????????????????????  
>   ?          <Select>    < Exit >    < Help >    < Save >    < Load >           ?  
>   ???????????????????????????????????????????????????????????????????????????????  

As can be seen, `gcc` simply isn't an option given.  I recall that it
was one in the past.  What options must be selected in order to achieve
this?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180128/ee2e2a98/attachment.asc>

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  2:35 [Buildroot] Compiling gcc for the target? Stuart Longland
@ 2018-01-28  3:30 ` Baruch Siach
  2018-01-28  4:45   ` Stuart Longland
  0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2018-01-28  3:30 UTC (permalink / raw)
  To: buildroot

Hi Stuart,

On Sun, Jan 28, 2018 at 12:35:57PM +1000, Stuart Longland wrote:
> I'm trying to bootstrap a musl system and am running into a road-block
> with regards to getting a C compiler running on the target.  My target
> is ARMv5 (specifically, ARM926EJ-S).
> 
> The aim will be to use a QEMU VM to "natively" compile packages, as
> there's lots of packages that just don't cross-compile.

Which packages are these?

> The fun ensues when I try to select `gcc` as a package in buildroot:
> >  /tmp/buildroot-2017.11.2/.config - Buildroot 2017.11.2 Configuration
> >  ? Target packages ? Development tools ????????????????????????????????????????????
> >   ?????????????????????????????? Development tools ??????????????????????????????
> >   ?  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty     ?  
> >   ?  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y> selects a  ?  
> >   ?  feature, while <N> excludes a feature.  Press <Esc><Esc> to exit, <?> for  ?  
> >   ?  Help, </> for Search.  Legend: [*] feature is selected  [ ] feature is     ?  
> >   ? ??????(-)?????????????????????????????????????????????????????????????????? ?  
> >   ? ?    [ ] cppunit                                                          ? ?  
> >   ? ?    [ ] cvs                                                              ? ?  
> >   ? ?    [ ] cxxtest                                                          ? ?  
> >   ? ?    [ ] flex                                                             ? ?  
> >   ? ?    [ ] gettext                                                          ? ?  
> >   ? ?    [ ] git                                                              ? ?  
> >   ? ?    [ ] git-crypt                                                        ? ?  
> >   ? ?    [ ] gperf                                                            ? ?  
> >   ? ?    [ ] jo                                                               ? ?  
> >   ? ?    [ ] jq                                                               ? ?  
> >   ? ?    [ ] libtool                                                          ? ?  
> >   ? ??????(+)?????????????????????????????????????????????????????????????????? ?  
> >   ???????????????????????????????????????????????????????????????????????????????  
> >   ?          <Select>    < Exit >    < Help >    < Save >    < Load >           ?  
> >   ???????????????????????????????????????????????????????????????????????????????  
> 
> As can be seen, `gcc` simply isn't an option given.  I recall that it
> was one in the past.  What options must be selected in order to achieve
> this?

There used to be support for target toolchain, but this support has been 
removed long ago. See the FAQ at

  https://buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  3:30 ` Baruch Siach
@ 2018-01-28  4:45   ` Stuart Longland
  2018-01-28  5:16     ` Max Filippov
  0 siblings, 1 reply; 7+ messages in thread
From: Stuart Longland @ 2018-01-28  4:45 UTC (permalink / raw)
  To: buildroot

On 28/01/18 13:30, Baruch Siach wrote:
> Hi Stuart,
> 
> On Sun, Jan 28, 2018 at 12:35:57PM +1000, Stuart Longland wrote:
>> I'm trying to bootstrap a musl system and am running into a road-block
>> with regards to getting a C compiler running on the target.  My target
>> is ARMv5 (specifically, ARM926EJ-S).
>>
>> The aim will be to use a QEMU VM to "natively" compile packages, as
>> there's lots of packages that just don't cross-compile.
> 
> Which packages are these?

Off the top of my head, I know a lot of Python modules fail to
cross-compile.  "Don't use Python" isn't a valid answer.

In short though, I actually need a root FS with a compiler so that I can
build software within that environment.  It's a requirement of Gentoo's
release engineering tool, catalyst.

Basically, I've managed to cross *everything else* I need, except gcc.
gcc needs gcc to bulid gcc.  Specifically, gcc needs g++? which is even
worse.

> There used to be support for target toolchain, but this support has been 
> removed long ago. See the FAQ at
> 
>   https://buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target

Thats, unfortunate.  I can understand its an atypical use case for
buildroot and sadly, building gcc seems to be far more difficult than it
ought to be.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180128/f8929a45/attachment.asc>

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  4:45   ` Stuart Longland
@ 2018-01-28  5:16     ` Max Filippov
  2018-01-28  5:25       ` Stuart Longland
  0 siblings, 1 reply; 7+ messages in thread
From: Max Filippov @ 2018-01-28  5:16 UTC (permalink / raw)
  To: buildroot

Hi Stuart,

On Sat, Jan 27, 2018 at 8:45 PM, Stuart Longland
<stuartl@longlandclan.id.au> wrote:
> In short though, I actually need a root FS with a compiler so that I can
> build software within that environment.  It's a requirement of Gentoo's
> release engineering tool, catalyst.
>
> Basically, I've managed to cross *everything else* I need, except gcc.
> gcc needs gcc to bulid gcc.  Specifically, gcc needs g++? which is even
> worse.
>
>> There used to be support for target toolchain, but this support has been
>> removed long ago. See the FAQ at
>>
>>   https://buildroot.org/downloads/manual/manual.html#faq-no-compiler-on-target
>
> Thats, unfortunate.  I can understand its an atypical use case for
> buildroot and sadly, building gcc seems to be far more difficult than it
> ought to be.

You could build both cross- and cross-native toolchains with crosstool-NG
and then use cross-toolchain as an external toolchain for the buildroot. I did
that for xtensa target architecture.

-- 
Thanks.
-- Max

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  5:16     ` Max Filippov
@ 2018-01-28  5:25       ` Stuart Longland
  2018-01-28  5:38         ` Max Filippov
  0 siblings, 1 reply; 7+ messages in thread
From: Stuart Longland @ 2018-01-28  5:25 UTC (permalink / raw)
  To: buildroot

Hi Max,
On 28/01/18 15:16, Max Filippov wrote:
>> Thats, unfortunate.  I can understand its an atypical use case for
>> buildroot and sadly, building gcc seems to be far more difficult than it
>> ought to be.
> You could build both cross- and cross-native toolchains with crosstool-NG
> and then use cross-toolchain as an external toolchain for the buildroot. I did
> that for xtensa target architecture.

I did try crosstool-ng? it only gave me uClibc or glibc options, not musl.

I'm not sure if maybe there's an experimental branch that supports musl
or if I missed an option somewhere, but I couldn't get it to oblige.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180128/743c900d/attachment.asc>

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  5:25       ` Stuart Longland
@ 2018-01-28  5:38         ` Max Filippov
  2018-01-28  7:39           ` Stuart Longland
  0 siblings, 1 reply; 7+ messages in thread
From: Max Filippov @ 2018-01-28  5:38 UTC (permalink / raw)
  To: buildroot

On Sat, Jan 27, 2018 at 9:25 PM, Stuart Longland
<stuartl@longlandclan.id.au> wrote:
> I did try crosstool-ng? it only gave me uClibc or glibc options, not musl.
>
> I'm not sure if maybe there's an experimental branch that supports musl
> or if I missed an option somewhere, but I couldn't get it to oblige.

In current ct-ng LIBC_MUSL has the following dependencies:

Depends on: GEN_CHOICE_LIBC [=y] && !WINDOWS [=n] && !BARE_METAL [=n]
&& EXPERIMENTAL [=y]

-- 
Thanks.
-- Max

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

* [Buildroot] Compiling gcc for the target?
  2018-01-28  5:38         ` Max Filippov
@ 2018-01-28  7:39           ` Stuart Longland
  0 siblings, 0 replies; 7+ messages in thread
From: Stuart Longland @ 2018-01-28  7:39 UTC (permalink / raw)
  To: buildroot

Hi Max,
On 28/01/18 15:38, Max Filippov wrote:
>> I'm not sure if maybe there's an experimental branch that supports musl
>> or if I missed an option somewhere, but I couldn't get it to oblige.
> In current ct-ng LIBC_MUSL has the following dependencies:
> 
> Depends on: GEN_CHOICE_LIBC [=y] && !WINDOWS [=n] && !BARE_METAL [=n]
> && EXPERIMENTAL [=y]

EXPERIMENTAL=y was one option I missed, but evidently it's not the only
one as I get:
> [00:01] / Invalid configuration `': machine `' not recognized

That said, it looks like the right avenue to pursue so I think I'll
chase up the mailing list for crosstool-ng and proceed from there.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180128/603c4c09/attachment.asc>

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

end of thread, other threads:[~2018-01-28  7:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28  2:35 [Buildroot] Compiling gcc for the target? Stuart Longland
2018-01-28  3:30 ` Baruch Siach
2018-01-28  4:45   ` Stuart Longland
2018-01-28  5:16     ` Max Filippov
2018-01-28  5:25       ` Stuart Longland
2018-01-28  5:38         ` Max Filippov
2018-01-28  7:39           ` Stuart Longland

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.