[Buildroot] building uclibc based toolchain with buildroot

Arnout Vandecappelle arnout at mind.be
Mon Feb 21 20:02:30 UTC 2022



On 21/02/2022 11:48, Rezaei Vahid wrote:
> hi
> I want to compile a C++17 library for my board.
> the toolchain that comes with my board SDK does not support C++17.
> I want to build a uclibc based toolchain with buildroot.
> I am following this tutorial
> https://www.uclibc.org/toolchains.html <https://www.uclibc.org/toolchains.html>
> the old toolchain configuration.
> arch           arm
> mcpu          cortex-a7
> mfloat-abi   softfp
> mfpu           neon_vfpv4
> no_aggrasive_loop_optimizations
> 
> kernel  3.18.20
> uclibc  0.9.33.2
> 
> gcc 4.9.2 ----(which I want to upgrade to a version that supports C++17 )
> 
> which  I have Uclibc rootfs (uclibc 0.9.33.2), I have to build toolchain with 
> uclibc 0.9.33 how can I specify the version of uclibc of the toolchain?

  It is not possible with Buildroot to specify an old version of uClibc, the 
latest uClibc-NG release is always used.

  Since uClibc has no ABI stability guarantee, there's no way to compile a 
program against one version of uClibc and run it with a different uClibc. It may 
work, but it may also fail to work in weird and hard-to-debug ways.

  So your options are:

- Build a complete rootfs with Buildroot.
- Create an SDK that includes your library and build it for static linking only.
- Put your library in a "container" image that includes uClibc and other 
libraries you want to link agains. It doesn't need to be an actual container, 
you just need to bind-mount /proc and /sys and chroot into it.


  Regards,
  Arnout



More information about the buildroot mailing list