building libc_nano and libg_nano

Robert Newberry <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hi.

I'm trying to build a cross-development system, targeting arm-none-eabi from Mac OS X.

I've got almost everything built from source -- lots of GNU dependencies (like gmp, etc), binutils, and GCC.

And I've built newlib.  A few times.

Then I tried to use my cross-dev system to build something using my new toolchain.  And it works -- until it tries to link, and it complains that it can't find "libc_nano.a".  The makefile has a "LDFLAGS	+= 	-specs=nano.specs" line in it.

I've done a bunch of reading on this front today -- found lots of information.

This was particularly enlightening:

	https://stackoverflow.com/questions/50154137/how-to-rebuild-newlib-and-newlib-nano-of-gnu-arm-embedded-toolchain <https://stackoverflow.com/questions/50154137/how-to-rebuild-newlib-and-newlib-nano-of-gnu-arm-embedded-toolchain>

As was this discussion:

	https://sourceware.org/ml/newlib/2014/msg00278.html <https://sourceware.org/ml/newlib/2014/msg00278.html>

But in the end, I can't seem to figure out how to get the newlib system to build and install "libc_nano.a" and "libg_nano.a" -- at least not in a way that's obvious to me.

I built one version of newlib like this:

	> configure --target=arm-none-eabi --prefix=/Volumes/Code/Test1 --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls
	> make
	> make install

And then I configured for the "nano" version like this:

	> configure --target=arm-none-eabi --prefix=/Volumes/Code/Test2 --target=arm-none-eabi --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls
	> make
	> make install

But when I do this, neither one of them produces a "libg_nano.a" or a "libc_nano.a".

I looked at the launchpad logs (per the stackoverflow suggestion) and can see a spot, just after "make install", in that does thew following:

	cp -f /<<PKGBUILDDIR>>/build-native/target-libs/arm-none-eabi/lib/./libc.a /<<PKGBUILDDIR>>/install-native/arm-none-eabi/lib/./libc_nano.a

but I don't find anything like this in the "newlib" sources.

Is this magic available somewhere?  If I try to replicate it by hand, I'm afraid I'll goof it up...

Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.