This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

building libc_nano and libg_nano


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]