This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: epiphany-newlib-port-20120207.tar.xz
Description: application/xz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]