Ping/Repost (Updated 20120127): RFA: Add Epiphany newlib & libgloss port

Joern Rennecke amylaar@spamcop.net
Tue Feb 7 23:59:00 GMT 2012


Quoting Jeff Johnston <jjohnstn@redhat.com>:

>>> Can you explain why you didn't move sbrk.c from libc/sys/epiphany into
>>> libgloss with the rest of the syscalls which is recommended?
...
[Me:]
>> sbrk is more tied to linker scripts. Still, I suppose it makes sense to
>> have it in libgloss, too. I'll have to check that that won't cause any
>> issues for the customer, though.
...
> I was referring to the files and changes found in the 2 attachments to
> the previous note.  If you move sbrk to libgloss, yes, I will commit
> them.

Moving that file caused a bit of trouble with errno / __errno.  In fact
my earlier moving of isatty had a similar problem, but with less spectacular
results on the testsuite.  I realized that other files in libgloss/epiphany
hacked around this by using #undef errno / declaring errno .  That requires
libgloss to know about the implementation of errno in newlib, and it is not
garanteed to work, either - with a simple isatty testcase, the
#undef / declare hack just leads to an undefined reference to errno.
I see that libnosys makes this sort-of work by providing a definition of
errno - but can fail, too, in some instances without common blocks where
libc is linked later after all.  No other port in CVS mainline uses this
hack in their libgloss.  The documentation has it in glue.c, but presumably
that is only meant to be a quick hack to test the other stuff.

I've changed LIB_SPEC in the epiphany GCC port so that libc is linked again
after libgloss, giving an opportunity to pick up errno / __errno, and
removed the errno hack from the other epiphany libgloss files.
I've updated newlib/libc/sys/Makefile.{am,in} and  
libgloss/epiphany/Makefile.in
to account for the move of sbrk.c, and re-made
newlib/libc/{sys,machine}/epiphany/{aclocal.m4,configure} to match the
December change in autoconf version in CVS for that area.

The updated epiphany port tarball is attached.

The patch set to existing files and the overall ChangeLog entry is  
still as posted in my previous message:

http://sourceware.org/ml/newlib/2012/msg00049.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epiphany-newlib-port-20120207.tar.xz
Type: application/x-xz
Size: 61244 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20120207/cbdd161b/attachment.xz>


More information about the Newlib mailing list