Skip to contentSkip to conversation

crosstool-ng and uClibc toolchain

Buildroot Will Wagner 4 participants 5 messages Dec 2, 2011

lore
Share & tools
lore
#0 lore raw

Hi,

I have been looking at building a toolchain using 2011.11 building it with crosstools-ng and uClibc.

It currently seems a little bit broken/limited. I can supply a custom ct-ng config, which specifies 0.9.32 but I am unable to select NPTL threading or to specify a custom uClibc config file.

Also if I choose to use libthreads.new then the build fails as the config file passed to build libc headers has no threading option enabled. This problem is I think caused by the uClibc config file you have to use. It contains LINUXTHREADS_OLD=y but there is not a not set entry for LINUXTHREADS_NEW which means the sed command to set it can't work.

In fact the uClibc config you are forced to use has lots of settings I would consider wrong.

Am I correct thinking these things are broken or am I missing something?

Am currently working on a patch that does the following:
- Allow user to pick uClibc version when using ct-ng
- Allow user to select nptl when using 0.9.32
- Supply better default uClibc config files (Using same config files as for internal buildroot config)
- Allow user to specify a custom uClibc config file

Assuming I can get it working I'll post it.

Thanks
Will

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
#1 lore raw

Le Fri, 02 Dec 2011 14:44:11 +0000,
Will Wagner <[email protected]> a ?crit :

Quoted 4 lines

In fact the uClibc config you are forced to use has lots of settings I would consider wrong.

Am I correct thinking these things are broken or am I missing something?

I haven't fallen into these issues as I'm not using the ct-ng backend a lot (I do use ct-ng outside of Buildroot in general).

Quoted 6 lines

Am currently working on a patch that does the following:
- Allow user to pick uClibc version when using ct-ng
- Allow user to select nptl when using 0.9.32
- Supply better default uClibc config files (Using same config files as for internal buildroot config)
- Allow user to specify a custom uClibc config file

Those sounds like good ideas, especially the sharing the uClibc config files between the internal build process and the ct-ng build process.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw
In reply to Will Wagner

Will, All,

Quoted 6 lines · On Friday 02 December 2011 15:44:11 Will Wagner wrote:

I have been looking at building a toolchain using 2011.11 building it with crosstools-ng and uClibc.

It currently seems a little bit broken/limited. I can supply a custom ct-ng config, which specifies 0.9.32 but I am unable to select NPTL threading or to specify a custom uClibc config file.

Yes, indeed. The problem is that buildroot has no way of knowing what version of uClibc will be chosen in the crosstool-Ng configuration, so there is no way to know if NPTL is available or not.

Nothe, that's the current state, not what we want. ;-)

Quoted 5 lines

Also if I choose to use libthreads.new then the build fails as the config file passed to build libc headers has no threading option enabled. This problem is I think caused by the uClibc config file you have to use. It contains LINUXTHREADS_OLD=y but there is not a not set entry for LINUXTHREADS_NEW which means the sed command to set it can't work.

OK, I see the issue. Maybe something like:

if LT_NEW:
s/^(CT_LIBC_UCLIBC_LNXTHRD_)(NEW|OLD)=y/\1_NEW=y/; s/^(CT_LIBC_UCLIBC_LNXTHRD_OLD)=y/# \1 is not set/;
elif LT_OLD:
s/^(CT_LIBC_UCLIBC_LNXTHRD_)(NEW|OLD)=y/\1_OLD=y/; s/^(CT_LIBC_UCLIBC_LNXTHRD_NEW)=y/# \1 is not set/;
endif

(Not taking NPTL into account, that should be another patch).

Quoted 3 lines

In fact the uClibc config you are forced to use has lots of settings I would consider wrong.
Am I correct thinking these things are broken or am I missing something?

They are not what I would call 'wrong', because these default settings do provide a working toolchain, by _default_.

Surely, all that sed mangling is complex...

But I agree that the situation could be enhanced...

Quoted 8 lines

Am currently working on a patch that does the following:
- Allow user to pick uClibc version when using ct-ng
- Allow user to select nptl when using 0.9.32
- Supply better default uClibc config files (Using same config files as for internal buildroot config)
- Allow user to specify a custom uClibc config file

Assuming I can get it working I'll post it.

Please, keep me in CC, so I do not miss the message...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw
Quoted 9 lines · Yann E. MORIN

But I agree that the situation could be enhanced...

Quoted 7 lines

Am currently working on a patch that does the following:
- Allow user to pick uClibc version when using ct-ng
- Allow user to select nptl when using 0.9.32
- Supply better default uClibc config files (Using same config files as for internal buildroot config)
- Allow user to specify a custom uClibc config file

Quoted 4 lines
Quoted 1 line

Assuming I can get it working I'll post it.

Please, keep me in CC, so I do not miss the message...

In case you already missed it, five hours ago:
http://lists.busybox.net/pipermail/buildroot/2011-December/048033.html

Mike

#4 lore raw

Mike, All,

Quoted 10 lines · On Friday 02 December 2011 22:37:30 Michael S. Zick wrote:
Quoted 9 lines · Yann E. MORIN

But I agree that the situation could be enhanced...

Quoted 7 lines

Am currently working on a patch that does the following:
- Allow user to pick uClibc version when using ct-ng
- Allow user to select nptl when using 0.9.32
- Supply better default uClibc config files (Using same config files as for internal buildroot config)
- Allow user to specify a custom uClibc config file

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Assuming I can get it working I'll post it.

Please, keep me in CC, so I do not miss the message...

In case you already missed it, five hours ago:
http://lists.busybox.net/pipermail/buildroot/2011-December/048033.html

Yep, I saw it afterwards; I'm currently reviewing and commenting it. Thanks! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'