This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Fix MIPS n64 build
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Date: Thu, 14 May 2009 22:37:02 +0000 (UTC)
- Subject: Fix MIPS n64 build
I have pushed this patch to fix building glibc for MIPS n64. Recall that
as I noted in <http://sourceware.org/ml/libc-ports/2008-12/msg00007.html>
this configuration does not use the sysdeps/unix/sysv/linux/wordsize-64
directory. Thus it would get the sysdeps/unix/sysv/linux versions of
preadv64.c and pwritev64.c, which include preadv.c and pwritev.c having
redefined PREADV or PWRITEV, then encounter the
#if __WORDSIZE == 64
# undef preadv64
strong_alias (preadv, preadv64)
#endif
when the function defined earlier had in fact been preadv64, not preadv,
so resulting in an "aliased to undefined symbol" error.
The way preadv.c and pwritev.c, compiled as such (not included from
preadv64.c or pwritev64.c) with __WORDSIZE == 64, generate a function
preadv or pwritev with an alias preadv64 or pwritev64, is fine for MIPS
n64. So all that's needed to fix the problem is avoid building the
separate preadv64.c and pwritev64.c files, which is done by copying the
same dummy versions of those files as are in the wordsize-64 directory.
When we have a 2.10 branch in ports it would make sense to put this there
(or to create the branch based on master after this patch went in).
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 5887530..a4759d9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-05-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: New files.
+
2009-04-18 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getcontext.S: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
new file mode 100644
index 0000000..fd9320c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
@@ -0,0 +1 @@
+/* Empty since the preadv syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
new file mode 100644
index 0000000..8b72a29
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
@@ -0,0 +1 @@
+/* Empty since the pwritev syscall is equivalent. */
--
Joseph S. Myers
joseph@codesourcery.com