[Buildroot-users] UndefinedBehaviorSanitizer
David Picard
david.picard at clermont.in2p3.fr
Wed Apr 9 07:58:32 UTC 2025
Hello,
I just made a full rebuild but as a matter of fact, the toolchain is not
copied to staging:
$ find host staging target -iname "*libubsan*"
host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/lib/libubsan.so.1.0.0
host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/lib/libubsan.a
host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/lib/libubsan.so.1
host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/lib/libubsan.so
host/opt/ext-toolchain/arm-buildroot-linux-gnueabihf/lib/libubsan.la
I provided a post-build script to install some custom files. Although
these files have nothing to do with the toolchain, could the script mess
something up? How about copying host/opt/ to staging/ with a post-build
script?
I'm using BR 2025.02.
David
Le 02/04/2025 à 12:07, Thomas Petazzoni a écrit :
> Hello David,
>
> On Wed, 2 Apr 2025 10:04:43 +0200
> David Picard<david.picard at clermont.in2p3.fr> wrote:
>
>> I think that the copy_toolchain_lib_root() function from
>> toolchain/helpers.mk, which is called from
>> toolchain/toolchain-external/pkg-toolchain-external.mk, copies from
>> STAGING_DIR to TARGET_DIR.
>>
>> In my case, libubsan is under host, not staging. That must be why
>> BR2_TOOLCHAIN_EXTRA_LIBS has no effect.
> The workflow is like this:
>
> 1. The toolchain is extracted as-is in host/opt/ext-toolchain/,
> including its sysroot
>
> 2. The entire toolchain sysroot from host/opt/ext-toolchain/ is copied
> into Buildroot's staging directory
>
> 3. Selectively, a subset of the libraries are copied from Buildroot's
> staging directory to Buildroot target's directory, and
> BR2_TOOLCHAIN_EXTRA_LIBS allows to specify extra libraries to copy to
> the target directory as part of this step
>
> Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot-users/attachments/20250409/648678b6/attachment.htm>
More information about the buildroot-users
mailing list