All of lore.kernel.org
 help / color / mirror / Atom feed
* TCLIBC with newlib
@ 2020-08-07  0:22 Jonathan Richardson
  2020-08-07  4:58 ` [poky] " Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Richardson @ 2020-08-07  0:22 UTC (permalink / raw)
  To: poky

Hi,

I'm trying to create a toolchain using newlib as the libc. I set
TCLIBC="newlib". First error is:
ERROR: Nothing PROVIDES 'libgcc-dbg' (but
mc:crmu:/home/jon/work/yocto/stingray2/poky/build/../meta-brcm/meta-stingray2/recipes-zephyr/brcm-zephyr/brcm-zephyr.bb
DEPENDS on or otherwise requires it). Close matches:
  libgcc
  libgcc RPROVIDES libgcc-dbg
ERROR: Required build target 'brcm-zephyr' has no buildable providers.
Missing or unbuildable dependency chain was: ['brcm-zephyr', 'libgcc-dbg']

This is caused by LIBC_DEPENDENCIES in
meta/conf/distro/include/tclibc-newlib.inc:
LIBC_DEPENDENCIES = "\
    newlib-dbg \
    newlib-dev \
    libgloss \
    libgloss-dev \
    libgloss-dbg \
    libgcc-dev \
    libgcc-dbg \
    libstdc++-dev \
    libstdc++-staticdev \
TOOLCHAIN_TARGET_TASK ?= "${LIBC_DEPENDENCIES}"

TOOLCHAIN_TARGET_TASK = "newlib libgloss" seems to fix it. Why are the
dev/dbg packages required as
dependencies and why does it think the recipes for libgloss, libgcc,
etc don't provide them?

Then libtool-cross fails when autoconf checks if the compiler works
because it can't find _exit().
So I added this to my local.conf:
EXTRA_OECONF_append_class_target = " LIBS=-lgloss-linux"
EXTRA_OECONF_append_class_cross = " LIBS=-lgloss-linux"

But it still fails:
configure:3833: arm-poky-eabi-gcc  -march=armv6s-m -mcpu=cortex-m0plus
-no-pie -fno-PIE
--sysroot=/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0/recipe-sysroot
 -O2 -pipe -g -feliminate-unused-debug-types
-fmacro-prefix-map=/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0=/usr/src/debug/libtool-cross/2.4.6-r0

-fdebug-prefix-map=/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0=/usr/src/debug/libtool-cross/2.4.6-r0

-fdebug-prefix-map=/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0/recipe-sysroot=

-fdebug-prefix-map=/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0/recipe-sysroot-native=
  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  conftest.c
-Wl,-lgloss-linux >&5
/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0/recipe-sysroot-native/usr/bin/arm-poky-eabi/../../libexec/arm-poky-eabi/gcc/arm-poky-eabi/10.1.0/ld:
/home/jon/work/yocto/stingray2/poky/build/tmp-crmu/work/cortexm0-plus-poky-eabi/libtool-cross/2.4.6-r0/recipe-sysroot/usr/lib/libg.a(lib_a-exit.o):
in function `exit':
/usr/src/debug/newlib/3.3.0-r0/newlib-3.3.0/newlib/libc/stdlib/exit.c:64:
undefined reference to `_exit'

Has newlib ever been used to create a toolchain? I'm not sure what the
best way to work around all these
build tool dependencies is. Should we come up with a bunch of settings
and add them to tclibc.conf? I'm
wondering to what extent this has been tested.

Thanks,
Jon

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-08-13  1:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07  0:22 TCLIBC with newlib Jonathan Richardson
2020-08-07  4:58 ` [poky] " Khem Raj
2020-08-07 23:26   ` Jonathan Richardson
2020-08-11  5:52     ` alhe
2020-08-12 19:03       ` Jonathan Richardson
2020-08-12 20:47         ` Khem Raj
2020-08-13  0:57           ` Jonathan Richardson
2020-08-12 20:53         ` Richard Purdie
2020-08-12 21:00         ` Tim Orling
2020-08-13  0:46           ` Jonathan Richardson
2020-08-13  0:48             ` Tim Orling
2020-08-13  1:16               ` Jonathan Richardson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.