avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] avr-gcc: Add --with-avrlibc configure option for AVR-


From: David Brown
Subject: Re: [avr-gcc-list] avr-gcc: Add --with-avrlibc configure option for AVR-Libc cooperation?
Date: Sun, 26 Aug 2012 20:24:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16

On 26/08/12 17:33, Georg-Johann Lay wrote:
David Brown wrote:
Georg-Johann Lay wrote:

for historical reasons, AVR-Libc implements functions that
GCC expects to live in libgcc, namely float functions like
__fixsfsi.

Would it not be a better idea to move the functions from AVR-Libc
into libgcc? Or are there complicating issues, such as copyright
assignments, that make that a harder job?

mvh.,

David

Yes, that's the issue.

The original authors put their code in AVR-Libc, presumably because
it was easier to get the code in there than to get it into GCC.

To get it into GCC, you have to sign a copyright assignment and
provide proper patches that passed tests(uite), comply to coding
rules, come with ChangeLogs, documentations etc. It's then up
to the maintainer to push the code upstream, but he won't fix
bugs or typos or coding rules or whatever.

For AVR-Libc it's enough to outline a change, at least that was
my impression from the improved [u]ltoa functions from SVN 2298.

Besides that, even *if* the original authors released their code
under an additional license *and* filed FSF copyright assignments,
someone would have to actually carry the code migration.

 From the number of people that contribute to avr-gcc, this is
simply not realistic. A potential move has been discussed too
often before without any results -- except that it's extremely
unlikely anybody will integrate it into libgcc.

Adding a new configure option to gcc is much less work and
straight forward. All that has to be done is to review the excludes
list and make sure that not too much or to less is removed.
And run regression tests, of course.

The objection against such a change was that it introduces a
dependency between avr-gcc and AVR-Libc, but this dependency
was introduced long ago, namely when it was decided to re-implement
functions that live in libgcc once more in AVR-Libc and use
reserved names like __addsf3 together with an "override" hack and
implications on how GCC orders -lgcc, -lm, -lc, or how LTO works.


In addition to the proposed new t-avrlibc Makefile snippets,
there could be defines for, cf. [1]

* TARGET_C99_FUNCTIONS
* TARGET_HAS_SINCOS

Thoughts?


Johann

[1] http://gcc.gnu.org/onlinedocs/gccint/Library-Calls.html


OK, since we currently have this situation, then making this new configuration option work is going to be the best way to get full benefits of the externally implemented functions (in avrlibc).

But here is a thought - why call the configuration option "--with-avrlibc" ?

Surely there are more ports of gcc in exactly the same situation. There are many out-of-tree ports of gcc, and one of the reasons for that is that some of their contributions don't have copyright assignments. And there are many other potential situations where development of code outside of libgcc would be easier, as well as cases when there might be multiple implementations of code (such as "small but slow" or "fast but big" floating point code).

For all these cases, your patch to make it easier to allow an external library to replace functions from libgcc could be very helpful, if it were made slightly more generic (or at least, had a slightly more generic name).

mvh.,

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]