Hi Ben I have finished the patch for you with three of the four patches for th libc on PowerPC. This patch fixes: - the sqrtl is a undefined symbol bug http://sources.redhat.com/ml/libc-hacker/2002-05/msg00012.html - the semctl fix for PowerPC http://sources.redhat.com/ml/libc-alpha/2002-05/msg00065.html - ld.so for PowerPC 32 bit fix http://sources.redhat.com/ml/libc-alpha/2002-05/msg00052.html There was a 4th patch, I pointed you, the libgccpatch for PowerPC, http://sources.redhat.com/ml/libc-alpha/2002-05/msg00067.html, is not inlcude to the attached patch, because, I had no change to build our libc properly with it. But this fix is important, if you build the libc woth gcc-3.1, but this is not the case at the moment .. :) So I decided to leave it out! ;) The patch I attached is read to put it into debian/patches and debian/patches/0list. Regards Jan -- .''`. Jan-Hendrik Palic | : :' : ** Debian GNU/ Linux ** | ** OpenOffice.org ** ,.. ,.. `. `' http://www.debian.org | http://www.openoffice.org ,: ..` ` `- jan.palic@linux-debian.de | ' ` `
#! /bin/sh -e
# DP: Add /proc/cpuinfo handling on Linux/PowerPC
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- glibc-2.2.5.orig/sysdeps/powerpc/dl-machine.c Sat Sep 8 23:21:34 2001
+++ glibc-2.2.5/sysdeps/powerpc/dl-machine.c Thu Jul 4 01:20:09 2002
@@ -311,7 +311,9 @@
PPC_DCBST (plt + i);
PPC_DCBST (plt + size_modified - 1);
PPC_SYNC;
- PPC_ICBI (plt);
+ for (i = 0; i < size_modified; i +=4)
+ PPC_ICBI (plt + i);
+
PPC_ICBI (plt + size_modified - 1);
PPC_ISYNC;
}
@@ -534,5 +536,5 @@
return;
}
- MODIFIED_CODE_NOQUEUE (reloc_addr);
+ MODIFIED_CODE (reloc_addr);
}
--- glibc-2.2.5.orig/sysdeps/powerpc/fpu/w_sqrt.c Tue Jul 10 02:56:46 2001
+++ glibc-2.2.5/sysdeps/powerpc/fpu/w_sqrt.c Thu Jul 4 01:21:28 2002
@@ -139,3 +139,9 @@
/* Strictly, this is wrong, but the only places where _ieee754_sqrt is
used will not pass in a negative result. */
strong_alias(__sqrt,__ieee754_sqrt)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__sqrt, __sqrtl)
+weak_alias (__sqrt, sqrtl)
+#endif
+
--- glibc-2.2.5.orig/sysdeps/unix/sysv/linux/semctl.c Tue Jul 10 02:57:08 2001
+++ glibc-2.2.5/sysdeps/unix/sysv/linux/semctl.c Thu Jul 4 01:28:14 2002
@@ -69,9 +69,24 @@
va_start (ap, cmd);
- /* Get the argument. */
- arg = va_arg (ap, union semun);
-
+ /* Get the argument only if required. */
+ arg.buf = NULL;
+ switch (cmd)
+ {
+ case SETVAL: /* arg.val */
+ case GETALL: /* arg.array */
+ case SETALL:
+ case IPC_STAT: /* arg.buf */
+ case IPC_SET:
+ case SEM_STAT:
+ case IPC_INFO: /* arg.__buf */
+ case SEM_INFO:
+ va_start (ap, cmd);
+ arg = va_arg (ap, union semun);
+ va_end (ap);
+ break;
+ }
+
va_end (ap);
return INLINE_SYSCALL (ipc, 5, IPCOP_semctl, semid, semnum, cmd,
@@ -88,9 +103,24 @@
va_start (ap, cmd);
- /* Get the argument. */
- arg = va_arg (ap, union semun);
-
+ /* Get the argument only if required. */
+ arg.buf = NULL;
+ switch (cmd)
+ {
+ case SETVAL: /* arg.val */
+ case GETALL: /* arg.array */
+ case SETALL:
+ case IPC_STAT: /* arg.buf */
+ case IPC_SET:
+ case SEM_STAT:
+ case IPC_INFO: /* arg.__buf */
+ case SEM_INFO:
+ va_start (ap, cmd);
+ arg = va_arg (ap, union semun);
+ va_end (ap);
+ break;
+ }
+
va_end (ap);
#if __ASSUME_IPC64 > 0
Attachment:
pgp49yzc3UV1W.pgp
Description: PGP signature