Again newlib with arm / thumb interwork
Wed Jan 2 14:29:00 GMT 2002
Bernhard Maeder/Alex Raimondi wrote:
> A few weeks ago i asked for help to build a newlib which supports
> thumb-interworking. That means it has to be compiled using flag
> Until now i didn't succeed in building such a lib.
> Just be sure if my understanding is right:
> - This "interworking lib" is a matter of newlib. It is built while making
> newlib and not while makeing gcc or other sutff of gnu tool chain?
Not entirely correct. There is also a target library that is built with gcc
This is used for standard C operations such as addition of two floats, integer
The code for these operations is dependent on the target options selected.
libraries are built which are used in conjunction with the newlib C libraries
with the same compile options (i.e. you need both to correctly link your
The key thing to note is that multilibs are controlled by gcc. The
list of multilibs and what options are used to generate them are in the hands of
compiler. As stated before, if you use the -print-multi-lib option with
the compiler you can see which multilibs exist. Newlib simply asks the
compiler, using the aforementioned option, which multilibs should be created.
The command tells newlib what the sub-directories should be named and which
options should be used. When the compiler is built with newlib in the same
source tree, it knows where in the install tree it can find the correct library
for given multilib options. Thus, if the user specifies one or more of the
multilib options to gcc and a link is performed, it will correctly link against
the appropriate library. It should be noted that this does not apply when ld
is used to link. Using ld, the user must manually specify the location
of the appropriate multilib libraries.
> - In fact there should be 4 versions of newlib. ARM-newlib (arm code, no
> interworking), Thumb-newlib (thumb code, no interworking),
> ARM-interworking-newlib (arm code, interworking) and
> thumb-interworking-newlib (thumb code, interworking).
Actually, there should be more combinations.
For example, the following was generated with the gnupro-99r1 arm-elf compiler
If your gcc compiler is not generating a multilib list which at least includes
mthumb-interwork, then you should either try to get gcc from the net and rebuild
or else contact the gcc help list at firstname.lastname@example.org for help.
-- Jeff J.
More information about the Newlib