Closed zephyrbot closed 8 years ago
by Juro Bystricky:
I could reproduce the problem. Rebuilding of newlib with -mno-sdata "fixes" the problem, but causes
/home/juro/sdk-zephyr-arc-newlib/sysroots/arc-poky-elf/usr/arc-poky-elf/lib/em/libc.a(lib_a-sbrk.o): In function _sbrk_r': /data/zephyr-sdk-0.7.4-git/poky/build-zephyr-arc/tmp/work/arc-poky-elf/newlib/2.2.0-r0/git/arc-poky-elf/em/newlib/libc/sys/arc/../../../../../.././newlib/libc/sys/arc/sbrk.c:15: undefined reference to
__start_heap'
/data/zephyr-sdk-0.7.4-git/poky/build-zephyr-arc/tmp/work/arc-poky-elf/newlib/2.2.0-r0/git/arc-poky-elf/em/newlib/libc/sys/arc/../../../../../.././newlib/libc/sys/arc/sbrk.c:25: undefined reference to `__end_heap'
by Iván Briano:
A word of advice. Don't post links to internal things in public forums, even if the content is not confidential, it's not polite with the people that can't access them.
by Iván Briano:
With that SDK, building for ARC works as expected. Thanks.
by Juro Bystricky:
Thanks. I keep forgetting Zephyr is public now, my apologies.
by Juro Bystricky:
The new newlib will be included in SDK 0.7.5
by changru fan:
Fixed in zephyr-sdk-0.7.5. Verified against zephyr-kernel-1.1.0-160311-f9d1d56 + zephyr-sdk 0.7.5, this issue was fixed.
Reported by Iván Briano:
Building for ARC and using Newlib results in a build failure.
To reproduce, go to samples/helloworld/nanokernel
cat >> prj.conf <<EOF CONFIG_NEWLIB_LIBC=y CONFIG_STDOUT_CONSOLE=y EOF
make BOARD=quark_se_sss_devboard ARCH=arc
At the linking step, it will fail with:
/home/sachiel/zephyr-sdk/public/sysroots/i686-pokysdk-linux/usr/bin/arc-poky-elf/arc-poky-elf-ld: Error: Linker symbol __SDATA_BEGIN__ not found /home/sachiel/zephyr-sdk/public/sysroots/i686-pokysdk-linux/usr/bin/arc-poky-elf/arc-poky-elf-ld: final link failed: Bad value
Presumably because newlib is built without the -mno-sdata flag that Zephyr's ARC build requires.
(Imported from Jira SDK-17)