[PATCH libgloss]Using spec files to support two version of newlib library in one tool-chain release

Bin Cheng bin.cheng@arm.com
Tue Aug 12 07:41:00 GMT 2014


Hi,
As you may noticed, we introduced bunch of configuration time options
tailoring code size for resource limited bare-metal systems.  These features
are used in tool chain release "GNU Tools for ARM Embedded Processors".  The
methodology can be simply described as below.
1) Build two version of newlib, one is the normal version, which is used as
default; the other one is built by enabling all code size tailoring
features.
2) For the tailored version of library, we manually rename
libc.a/libgloss.a(/libstdc++.a) into libc_s.a/libgloss_s.a(/libstdc++_s.a).
These renamed libraries are installed to the same target directory and
coexist with normal version ones.
3) specs files like nano.specs/rdimon.specs/nosys.specs are introduced in
order to automatically choose wanted version of library for linking.  In
other words, GCC can choose libc_s.a or libc.a according to specs files
provided by end-users.

This patch is to support this.  With this feature, developers only need to
specify "-specs=nano.specs" to link the small foot-print lib*_s.a libraries.
The patch adds new specs file "nano.specs" as well as modifies
rdimon.specs/nosys.specs as necessary.  Though nosys.specs is changed, the
default behavior won't be changed unless "-specs=nano.specs" is specified.

Build and link successfully, is it OK?

Thanks,
bin

2014-08-12  Bin Cheng <bin.cheng@arm.com>

	* arm/elf-nano.specs: New file.
	* arm/elf-rdimon.specs: Support nano.specs.
	* arm/Makefile.in: Support nano.specs.
	* libnosys/nosys.specs: Support nano.specs.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nano-spec-20140804.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20140812/3fd953c7/attachment.txt>


More information about the Newlib mailing list