0
votes

I'm in the process of setting up a cross-compilation toolchain for ARM using an i686 machine as the build platform.

I've been able to use the toolchain to compile a basic C program and run it on the target ARM device, but the file-size ends up being too large due to the fact that Newlib will only build static libraries.

Both the version of GCC I'm using and Newlib itself were configured using the --enable-shared option - but it seems to just ignore this when building.

I've read in the Newlib documentation that if both the host and target machine are i*86 machines then Newlib will build itself using libtool, which automatically builds shared and static libraries - but this isn't much help for ARM targets!

Does anyone know of a way to build Newlib as a shared library for ARM devices rather than just statically?

Given that Newlib is intended for use on embedded systems, it surprises me that it can only produce shared libraries when being used for native compilation on an Intel machine.

Thanks!

1
Which ARM platform do you use? Cortex-M aka armv6-m and armv7-m do not support shared libraries.Turbo J
cross compiling newlib works just fine for arm, well last time I tried, and linking it. if you are on an operating system do you need newlib? if not then statically link and or if you think you do invent your own shared library solution and implement it.old_timer
newlib shared libraries doesnt make sense, please provide more information.old_timer

1 Answers

0
votes

Shared libraries are not enabled for platforms other than i[3456]86-pc-linux-gnu. They cannot work on other platforms (in fact, they don't even work for the platform they were intended for!).