On Mon, Jul 17, 2023 at 6:38 AM Martin Townsend <[email protected]> wrote:
>
> Hi,
>
> I am trying to remove all GPLv3 packages from my image. The clang
> toolchain is used where possible and currently there are no
> dependencies on libstdc++ and as far as I can see none on libgcc but
> this library is installed in the rootfs. I've created a script to
> parse all elf binaries to see which one dynamically links against
> libgcc but none do. I think it's being installed due to libgcc being
> in the BASEDEPENDS but I can't see what is adding libgcc to this
> variable. I'm using the dunfell version of yocto and base.bbclass has
>
> def base_dep_prepend(d):
> if d.getVar('INHIBIT_DEFAULT_DEPS', False):
> return ""
> return "${BASE_DEFAULT_DEPS}"
>
> BASE_DEFAULT_DEPS = "virtual/${TARGET_PREFIX}gcc
> virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
>
> BASEDEPENDS = ""
> BASEDEPENDS_class-target = "${@base_dep_prepend(d)}"
> BASEDEPENDS_class-nativesdk = "${@base_dep_prepend(d)}"
>
> but when I check the BASEDEPENDS for various recipes I get
>
> BASEDEPENDS=" clang-cross-aarch64 virtual/libc libgcc
> virtual/aarch64-poky-linux-compilerlibs gettext-native"
> BASEDEPENDS_class-nativesdk=" clang-cross-aarch64 virtual/libc libgcc
> virtual/aarch64-poky-linux-compilerlibs "
> BASEDEPENDS_class-target=" clang-cross-aarch64 virtual/libc libgcc
> virtual/aarch64-poky-linux-compilerlibs "
>
> Is it possible to remove libgcc from the BASEDEPENDS somehow?
> Although we are using Dunfell I'm happy to move to another release if
> it's easier to achieve this.
Things are better with master and perhaps kirkstone too ( but did not try )
in yoe we use
RUNTIME = "llvm"
TC_CXX_RUNTIME = "llvm"
TOOLCHAIN = "clang"
CLANGSDK = "1"
and libgcc is not used. e.g. see below. however it still uses crt
files which maybe from gcc/glibc you might have to check
that I am talking about crtstuff
% bitbake-getvar BASEDEPENDS
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile:
/mnt/b/yoe/master/cache/prserv.sqlite3, Address: 127.0.0.1:37359, PID:
713437
#
# $BASEDEPENDS [3 operations]
# set /mnt/b/yoe/master/sources/poky/meta/classes-global/base.bbclass:53
# ""
# override[class-target]:set
/mnt/b/yoe/master/sources/poky/meta/classes-global/base.bbclass:54
# "${@get_base_dep(d)}"
# override[class-nativesdk]:set
/mnt/b/yoe/master/sources/poky/meta/classes-global/base.bbclass:55
# "${@get_base_dep(d)}"
# pre-expansion value:
# "${@get_base_dep(d)}"
BASEDEPENDS=" clang-cross-riscv64 virtual/libc compiler-rt libcxx"
>
> Best Regards,
> Martin.
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60594): https://lists.yoctoproject.org/g/yocto/message/60594
Mute This Topic: https://lists.yoctoproject.org/mt/100194492/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-