This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Libgloss tree and diference between "architecture" and "platform".
Paul Chavent wrote:
Jeff Johnston a écrit :
[...]
In this case I am talking about build configuration. To add your bsp,
you only have to modify Makefile.in and add your files to the
directory. It is very straightforward to modify Makefile.in by
copying and modifying an existing bsp that is already built there.
You can prefix all your added files to keep them distinguished from
the rest of the files if that is your wish. If you add a
subdirectory, you have to do extra work so configuration of libgloss
will know to build your library in the subdirectory. This means you
will have to edit the file libgloss/arm/configure.in in addition to
libgloss/arm/Makefile.in.
-- Jeff J.
And an other problem, sorry.
For example
If i compile for the host "arm-myboard-elf"
i would like that the makefile copy my myboard-crt0.s to crt0.S (so it
is the default one used by gcc).
else
the make file can copy my myboard-crt0.s to myboard-crt0.S (that i can
use with a specs file for example...)
I would like to use the same variables (${host} for example) that those
which are in newlib/configure.host . Is it possible, and how it should
be done ?
It would be possible, but it would require some knowledge of configuration on
your part. Essentially, you would set variables based on the configuration and
use those variables in the Makefile to determine which object file was used to
install crt0.o in the install directory. Similarly with the library that was
going to be used by default by the compiler. If you look at the top-level
libgloss configure.in, you will see it sets configdirs based on the target.
Another avenue to accomplish the same goal is simply to have a .ld script that
specifies both the library and crt0 to use and have gcc generate the appropriate
-Txxx.ld command when compiling for your platform. If that takes a while, your
end-users simply specify -Txxx.ld on the compile/link.
-- Jeff J.
Thank you.