Source: eglibc-source
Version: 2.11
Tags: patch, upstream, fixed-upstream

Libc is a real impediment to building a current m68k port and has been for 
years. Now that CodeSourcery and Freescale have revived the glibc port for 
Coldfire (and 680x0 for the most part), it is important that this code 
becomes available to m68k porters.

The necessary patches have reached the upstream glibc and eglibc repos. 

Supporting code is already available in the current releases of Binutils, 
GCC and Linux. (I'll open a separate bug for gcc-4.4 backport patches.)

Rather than wait for new source packages based on glibc-2.12 (expected 
post-sid) I think we should backport the patches to eglibc 2.11 so that 
(at least) the m68k toolchain can be revivied.
 
I've tried this approach with cross-compiled eglibc 2.10 and booted the 
result on a 68040. I've also compile-tested 2.11. I can confirm that this 
works. There are still known issues (no show stoppers, I think) meaning 
that some further patching is likely in due course. I've not run the 
testsuites.

These are the patches that need to be backported to begin with:

http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff_plain;h=40111cb9e17a911c8913f00d9b913a71ceb6e609
http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff_plain;h=42ae1878f326c413dd026373ebdb6bf6cd20e75d
http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=bbabf1f73f611b9101b42c3390a9ddd53e6dd7d4
http://sourceware.org/git/?p=glibc-ports.git;a=commitdiff_plain;h=d8e90a15fedd2660d02f5d8e4e7da17e01916d30

I've applied these patches to eglibc-source-2.11.1-2, except for Changelog 
hunks, which fail to apply.

I'm not confident about cherry picking from the later commits relating to 
m68k and libc-ports, but this is a reasonable start. (Aside: commit 
dbd0094b3f71213bc178cd1946496defbedb1d62 perhaps?)

Since the above patches add a __m68k_read_tp symbol versioned at 
GLIBC_2.12, an additional change is needed also:

--- a/Versions.def
+++ b/Versions.def
@@ -28,6 +28,7 @@ libc {
   GLIBC_2.9
   GLIBC_2.10
   GLIBC_2.11
+  GLIBC_2.12
 %ifdef USE_IN_LIBIO
   HURD_CTHREADS_0.3
 %endif

(taken from 
http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=0079dd2382eba185d22410a1d3088dc7146bc00a
)

The problem with the symbol versioning being that the glibc 2.12 release 
includes further symbols versioned at GLIBC_2.12, which creates a 
potential backwards compatibility issue.

But I believe that forwards compatibility is preserved, so I'm content 
with this solution, even though backwards compatibility will be limited 
for code using new symbols (_sys_errlist; sys_errlist; _sys_nerr; 
sys_nerr; ntp_gettimex; recvmmsg). I suppose further backporting of 
these symbols may become necessary, but I doubt it...

Regards,

Finn Thain



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to