Skip to contentSkip to conversation

Update of Buildroot toolchains on autobuild.b.o

Buildroot Thomas Petazzoni 3 participants 8 messages Jun 8, 2016 – Jun 19, 2016

lore
Share & tools
lore
#0 lore raw

Hello,

For information, I have updated the toolchains on autobuild.b.o. Here are the changes:

* All existing Buildroot pre-build toolchains have been rebuilt with Buildroot 2016.05.

* Addition of a ARM Cortex-M4 noMMU toolchain.

* Addition of a m68k 5208 noMMU toolchain.

* Addition of a m68k 68040 toolchain.

Due to the addition of those new toolchains, for fairly specific architecture, I'm expecting to see a pretty significant increase in build failures.

Let me know if there are other toolchain combinations that you would like to see tested on autobuild.b.o.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#1 lore raw

[posted and mailed]

Thomas Petazzoni <thomas.petazzoni- wi1+55ScJUtKEb57/[email protected]> wrote in news:20160608220152.5b54ea7d at free-electrons.com:

Quoted 2 lines

Let me know if there are other toolchain combinations that you would like to see tested on autobuild.b.o.

Hi Thomas,

a lot of multimedia packages (ffmpeg, mplayer & co.) contain support not only for mmx but also for sse*/avx*. Some of them fail in a mmx-only configuration so I would like to propose a toolchain based on this defconfig:

BR2_x86_pentium_mmx=y

We already have a p4 defconfig

http://autobuild.buildroot.net/toolchains/configs/br-i386-pentium4-
full.config

and defconfigs for x86_64 but none for older Intel cpu's.

Regards, Bernd

#2 lore raw
In reply to Thomas Petazzoni

[posted and mailed]

Thomas Petazzoni <thomas.petazzoni- wi1+55ScJUtKEb57/[email protected]> wrote in news:20160608220152.5b54ea7d at free-electrons.com:

Quoted 1 line

* Addition of a ARM Cortex-M4 noMMU toolchain.

Hi Thomas,

afaics something is weird with this toolchain.

According to its defconfig it supports threads, but not NPTL however:

$ wget http://autobuild.buildroot.net/toolchains/configs/br-arm-cortex-m4-
full.conf
$ make defconfig BR2_DEFCONFIG=br-arm-cortex-m4-full.config
$ grep -i has_threads .config
BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL is not set
BR2_TOOLCHAIN_HAS_THREADS=y

But according to the output of gcc is does not support threads although it was compiled with --enable-threads

$ make toolchain
$ output/host/opt/ext-toolchain/bin/arm-buildroot-uclinux-uclibcgnueabi-gcc 
-v

Configured with: ./configure --prefix=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --sysconfdir=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/etc --enable-static --target=arm-buildroot-uclinux-uclibcgnueabi --with- sysroot=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr/arm-buildroot- uclinux-uclibcgnueabi/sysroot --disable-__cxa_atexit --with-gnu-ld -- disable-libssp --disable-multilib --with-gmp=/opt/br-arm-cortex-m4-full- 2016.05-2-g5dabb45/usr --with-mpfr=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --with-pkgversion='Buildroot 2016.05-00002-g5dabb45' --with- bugurl=http://bugs.buildroot.net/ --disable-libsanitizer --disable-tls -- disable-libmudflap

--enable-threads

--with-mpc=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr --without-isl
--without-cloog --with-float=soft --disable-decimal-float --with-abi=aapcs- linux --with-cpu=cortex-m4 --with-float=soft --with-mode=thumb --enable- languages=c,c++ --with-build-time-tools=/opt/br-arm-cortex-m4-full-2016.05- 2-g5dabb45/usr/arm-buildroot-uclinux-uclibcgnueabi/bin --disable-shared -- disable-libgomp

Thread model: single

gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45)

I noticed this while trying to fix some boost build errors.

Regards, Bernd

#3 lore raw

Hello,

Quoted 1 line · Bernd Kuhls

According to its defconfig it supports threads, but not NPTL however:

The fact that it doesn't support NPTL is expected I believe (we're talking about ARMv7-M).

Quoted 37 lines
$ wget http://autobuild.buildroot.net/toolchains/configs/br-arm-cortex-m4-
full.conf
$ make defconfig BR2_DEFCONFIG=br-arm-cortex-m4-full.config
$ grep -i has_threads .config
BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL is not set
BR2_TOOLCHAIN_HAS_THREADS=y

But according to the output of gcc is does not support threads although it was compiled with --enable-threads

$ make toolchain
$ output/host/opt/ext-toolchain/bin/arm-buildroot-uclinux-uclibcgnueabi-gcc 
-v

Configured with: ./configure --prefix=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --sysconfdir=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/etc --enable-static --target=arm-buildroot-uclinux-uclibcgnueabi --with- sysroot=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr/arm-buildroot- uclinux-uclibcgnueabi/sysroot --disable-__cxa_atexit --with-gnu-ld -- disable-libssp --disable-multilib --with-gmp=/opt/br-arm-cortex-m4-full- 2016.05-2-g5dabb45/usr --with-mpfr=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --with-pkgversion='Buildroot 2016.05-00002-g5dabb45' --with- bugurl=http://bugs.buildroot.net/ --disable-libsanitizer --disable-tls -- disable-libmudflap

--enable-threads

--with-mpc=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr --without-isl
--without-cloog --with-float=soft --disable-decimal-float --with-abi=aapcs- linux --with-cpu=cortex-m4 --with-float=soft --with-mode=thumb --enable- languages=c,c++ --with-build-time-tools=/opt/br-arm-cortex-m4-full-2016.05- 2-g5dabb45/usr/arm-buildroot-uclinux-uclibcgnueabi/bin --disable-shared -- disable-libgomp

Quoted 5 lines

Thread model: single

gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45)

I noticed this while trying to fix some boost build errors.

Indeed weird. Waldemar, do you have an idea? uClibc_config.h contains:

#undef __HAS_NO_THREADS__
#define __LINUXTHREADS_OLD__ 1
#undef __LINUXTHREADS_NEW__
#define __UCLIBC_HAS_THREADS__ 1

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

Hi,
Thomas Petazzoni wrote,

Quoted 50 lines

Hello,

Quoted 1 line · Bernd Kuhls

According to its defconfig it supports threads, but not NPTL however:

The fact that it doesn't support NPTL is expected I believe (we're talking about ARMv7-M).

Quoted 41 lines
$ wget http://autobuild.buildroot.net/toolchains/configs/br-arm-cortex-m4-
full.conf
$ make defconfig BR2_DEFCONFIG=br-arm-cortex-m4-full.config
$ grep -i has_threads .config
BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL is not set
BR2_TOOLCHAIN_HAS_THREADS=y

But according to the output of gcc is does not support threads although it was compiled with --enable-threads

$ make toolchain
$ output/host/opt/ext-toolchain/bin/arm-buildroot-uclinux-uclibcgnueabi-gcc 
-v

Configured with: ./configure --prefix=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --sysconfdir=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/etc --enable-static --target=arm-buildroot-uclinux-uclibcgnueabi --with- sysroot=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr/arm-buildroot- uclinux-uclibcgnueabi/sysroot --disable-__cxa_atexit --with-gnu-ld -- disable-libssp --disable-multilib --with-gmp=/opt/br-arm-cortex-m4-full- 2016.05-2-g5dabb45/usr --with-mpfr=/opt/br-arm-cortex-m4-full-2016.05-2- g5dabb45/usr --with-pkgversion='Buildroot 2016.05-00002-g5dabb45' --with- bugurl=http://bugs.buildroot.net/ --disable-libsanitizer --disable-tls -- disable-libmudflap

--enable-threads

--with-mpc=/opt/br-arm-cortex-m4-full-2016.05-2-g5dabb45/usr --without-isl
--without-cloog --with-float=soft --disable-decimal-float --with-abi=aapcs- linux --with-cpu=cortex-m4 --with-float=soft --with-mode=thumb --enable- languages=c,c++ --with-build-time-tools=/opt/br-arm-cortex-m4-full-2016.05- 2-g5dabb45/usr/arm-buildroot-uclinux-uclibcgnueabi/bin --disable-shared -- disable-libgomp

Thread model: single

gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45)

Quoted 8 lines
Quoted 1 line

I noticed this while trying to fix some boost build errors.

Indeed weird. Waldemar, do you have an idea? uClibc_config.h contains:

#undef __HAS_NO_THREADS__
#define __LINUXTHREADS_OLD__ 1
#undef __LINUXTHREADS_NEW__
#define __UCLIBC_HAS_THREADS__ 1

When looking at the output of some precompiled toolchain for ARM
noMMU used by Emcraft:
./bin/arm-uclinuxeabi-gcc -v
Using built-in specs.
Target: arm-uclinuxeabi
Configured with:
/scratch/julian/2010q1-release-uclinux-lite/src/gcc-4.4-2010q1/configure
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=arm-uclinuxeabi --enable-threads --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch
--enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --with-specs='%{O2:%{!fno-remove-local-statics:
-fremove-local-statics}}
%{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics:
%-fremove-local-statics}}}' --enable-languages=c,c++
%--disable-shared --disable-lto --with-pkgversion='Sourcery G++ Lite
%2010q1-189'
%--with-bugurl=https://support.codesourcery.com/GNUToolchain/
%--disable-nls --prefix=/opt/codesourcery
%--with-sysroot=/opt/codesourcery/arm-uclinuxeabi/libc %--with-build-sysroot=/scratch/julian/2010q1-release-uclinux-lite/install/arm-uclinuxeabi/libc %--with-gmp=/scratch/julian/2010q1-release-uclinux-lite/obj/host-libs-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu/usr %--with-mpfr=/scratch/julian/2010q1-release-uclinux-lite/obj/host-libs-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu/usr %--with-ppl=/scratch/julian/2010q1-release-uclinux-lite/obj/host-libs-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu/usr %--with-host-libstdcxx='-static-libgcc
%-Wl,-Bstatic,-lstdc++,-Bdynamic -lm' %--with-cloog=/scratch/julian/2010q1-release-uclinux-lite/obj/host-libs-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu/usr %--disable-libgomp --enable-poison-system-directories %--with-build-time-tools=/scratch/julian/2010q1-release-uclinux-lite/install/arm-uclinuxeabi/bin %--with-build-time-tools=/scratch/julian/2010q1-release-uclinux-lite/install/arm-uclinuxeabi/bin Thread model: single
gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189)

I would say it is normal for any *-uclinux-* toolchain using linuxthreads instead of NPTL.

best regards
Waldemar

#5 lore raw

[Buildroot] Thread support in Cortex m4 toolchains, was: Re: Update of Buildroot toolchains on autobuild.b.o

Am Mon, 13 Jun 2016 23:48:25 +0200 schrieb Waldemar Brodkorb:

Quoted 5 lines

Thread model: single
gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189)

I would say it is normal for any *-uclinux-* toolchain using linuxthreads instead of NPTL.

Hi Waldemar,

how to distinguish a toolchain using linuxthreads from a toolchain lacking thread support?

The toolchain from
http://autobuild.buildroot.net/toolchains/configs/br-arm-full-
nothread.config
shows a similar output to the m4 toolchain

$ output/host/opt/ext-toolchain/bin/arm-buildroot-linux-uclibcgnueabihf-
gcc -v
Using built-in specs.
COLLECT_GCC=/home/bernd/buildroot/br2/output/host/opt/ext-toolchain/bin/
arm-buildroot-linux-uclibcgnueabihf-gcc.br_real
COLLECT_LTO_WRAPPER=/home/bernd/buildroot/br2/output/host/opt/ext-
toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/4.9.3/
lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabihf
Configured with: ./configure --prefix=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr --sysconfdir=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/etc --enable-static --target=arm-buildroot-
linux-uclibcgnueabihf --with-sysroot=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr/arm-buildroot-linux-uclibcgnueabihf/
sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-
multilib --with-gmp=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --
with-mpfr=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --with-
pkgversion='Buildroot 2016.05-00002-g5dabb45' --with-bugurl=http://
bugs.buildroot.net/ --disable-libsanitizer --disable-tls --disable-
libmudflap --disable-threads --disable-libitm --disable-libatomic --with-
mpc=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --without-isl --
without-cloog --disable-decimal-float --with-abi=aapcs-linux --with-
cpu=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-mode=arm --
enable-languages=c,c++ --with-build-time-tools=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr/arm-buildroot-linux-uclibcgnueabihf/bin --
enable-shared --disable-libgomp
Thread model: single
gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45) 

This toolchain, as expected, lacks the definition of _GLIBCXX_HAS_GTHREADS in output/host/opt/ext-toolchain/arm-buildroot-linux-uclibcgnueabihf/include/ c++/4.9.3/arm-buildroot-linux-uclibcgnueabihf/bits/c++config.h

The same is valid for the Cortex m4 toolchain however despite the fact that it claims to have thread support in Kconfig. This leads to build errors in the boost package:
http://autobuild.buildroot.net/
results/422/4220e275dcc90e64545ad2d5ed3e0b51044f6426/

./boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
# error "Threading support unavaliable: it has been explicitly disabled
with BOOST_DISABLE_THREADS"

Boost checks for _GLIBCXX_HAS_GTHREADS to determine thread support:
https://github.com/boostorg/config/blob/develop/include/boost/config/
stdlib/libstdcpp3.hpp#L37

Afaics we have two choices: Fix the thread support in gcc or remove the setting that the m4 toolchain supports threads.

Regards, Bernd

#6 lore raw

[Buildroot] Thread support in Cortex m4 toolchains, was: Re: Update of Buildroot toolchains on autobuild.b.o

Hi Bernd,
Bernd Kuhls wrote,

Quoted 64 lines

Am Mon, 13 Jun 2016 23:48:25 +0200 schrieb Waldemar Brodkorb:

Quoted 5 lines

Thread model: single
gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189)

I would say it is normal for any *-uclinux-* toolchain using linuxthreads instead of NPTL.

Hi Waldemar,

how to distinguish a toolchain using linuxthreads from a toolchain lacking thread support?

The toolchain from
http://autobuild.buildroot.net/toolchains/configs/br-arm-full-
nothread.config
shows a similar output to the m4 toolchain

$ output/host/opt/ext-toolchain/bin/arm-buildroot-linux-uclibcgnueabihf-
gcc -v
Using built-in specs.
COLLECT_GCC=/home/bernd/buildroot/br2/output/host/opt/ext-toolchain/bin/
arm-buildroot-linux-uclibcgnueabihf-gcc.br_real
COLLECT_LTO_WRAPPER=/home/bernd/buildroot/br2/output/host/opt/ext-
toolchain/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabihf/4.9.3/
lto-wrapper
Target: arm-buildroot-linux-uclibcgnueabihf
Configured with: ./configure --prefix=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr --sysconfdir=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/etc --enable-static --target=arm-buildroot-
linux-uclibcgnueabihf --with-sysroot=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr/arm-buildroot-linux-uclibcgnueabihf/
sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-
multilib --with-gmp=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --
with-mpfr=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --with-
pkgversion='Buildroot 2016.05-00002-g5dabb45' --with-bugurl=http://
bugs.buildroot.net/ --disable-libsanitizer --disable-tls --disable-
libmudflap --disable-threads --disable-libitm --disable-libatomic --with-
mpc=/opt/br-arm11-full-nothread-2016.05-2-g5dabb45/usr --without-isl --
without-cloog --disable-decimal-float --with-abi=aapcs-linux --with-
cpu=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-mode=arm --
enable-languages=c,c++ --with-build-time-tools=/opt/br-arm11-full-
nothread-2016.05-2-g5dabb45/usr/arm-buildroot-linux-uclibcgnueabihf/bin --
enable-shared --disable-libgomp
Thread model: single
gcc version 4.9.3 (Buildroot 2016.05-00002-g5dabb45) 

This toolchain, as expected, lacks the definition of _GLIBCXX_HAS_GTHREADS in output/host/opt/ext-toolchain/arm-buildroot-linux-uclibcgnueabihf/include/ c++/4.9.3/arm-buildroot-linux-uclibcgnueabihf/bits/c++config.h

The same is valid for the Cortex m4 toolchain however despite the fact that it claims to have thread support in Kconfig. This leads to build errors in the boost package:
http://autobuild.buildroot.net/
results/422/4220e275dcc90e64545ad2d5ed3e0b51044f6426/

./boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
# error "Threading support unavaliable: it has been explicitly disabled
with BOOST_DISABLE_THREADS"

Quoted 6 lines

Boost checks for _GLIBCXX_HAS_GTHREADS to determine thread support:
https://github.com/boostorg/config/blob/develop/include/boost/config/
stdlib/libstdcpp3.hpp#L37

Afaics we have two choices: Fix the thread support in gcc or remove the setting that the m4 toolchain supports threads.

I would prefer first choice.
Can you try something like the attached patch for your gcc build?

I managed to compile ARM noMMU boost with that.
I have done no runtime testing and there is an open issue regarding noMMU ARM and threads support discussed on the uClinux mailinglist.

best regards
Waldemar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclinux-threads.patch
Type: text/x-diff
Size: 471 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160616/169a59d1/attachment.bin>

Tested-by
#7 lore raw

[Buildroot] Thread support in Cortex m4 toolchains, was: Re: Update of Buildroot toolchains on autobuild.b.o

Am Thu, 16 Jun 2016 23:17:24 +0200 schrieb Waldemar Brodkorb:

Quoted 8 lines

Hi Bernd,
Bernd Kuhls wrote,

Quoted 2 lines

Afaics we have two choices: Fix the thread support in gcc or remove the setting that the m4 toolchain supports threads.

I would prefer first choice.
Can you try something like the attached patch for your gcc build?

Hi,

thanks for the patch, I tested it with gcc-4.9.3 using this defconfig:

BR2_arm=y
BR2_cortex_m4=y
BR2_KERNEL_MIRROR="https://www.kernel.org/pub"
BR2_GNU_MIRROR="http://ftp.gnu.org/pub/gnu"
BR2_JLEVEL=16
# BR2_COMPILER_PARANOID_UNSAFE_PATH is not set
BR2_KERNEL_HEADERS_4_5=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set

and could compile boost as well.

(compile-tested boost)

Regards, Bernd