rpms/kernel/devel linux-2.6-ppc-use-libgcc.patch,1.2,1.3

Kyle McMartin (kyle) fedora-extras-commits at redhat.com
Thu Feb 21 04:54:57 UTC 2008


Author: kyle

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5192

Modified Files:
	linux-2.6-ppc-use-libgcc.patch 
Log Message:
once more with feeling...

linux-2.6-ppc-use-libgcc.patch:

Index: linux-2.6-ppc-use-libgcc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-ppc-use-libgcc.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-ppc-use-libgcc.patch	21 Feb 2008 02:22:59 -0000	1.2
+++ linux-2.6-ppc-use-libgcc.patch	21 Feb 2008 04:54:35 -0000	1.3
@@ -1,13 +1,115 @@
-diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
-index 1c6ce35..3f1bbcb 100644
---- a/arch/powerpc/Makefile
-+++ b/arch/powerpc/Makefile
-@@ -150,6 +150,8 @@ core-$(CONFIG_XMON)		+= arch/powerpc/xmon/
+diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
+index 4bb023f..63e68d2 100644
+--- a/arch/powerpc/lib/Makefile
++++ b/arch/powerpc/lib/Makefile
+@@ -23,3 +23,5 @@ obj-$(CONFIG_SMP)	+= locks.o
+ endif
  
- drivers-$(CONFIG_OPROFILE)	+= arch/powerpc/oprofile/
+ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
++
++obj-y	+=	libgcc/
+diff --git a/arch/powerpc/lib/libgcc/Makefile b/arch/powerpc/lib/libgcc/Makefile
+new file mode 100644
+index 0000000..36d8e1e
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/Makefile
+@@ -0,0 +1,2 @@
++obj-y	+=	__divdi3.c
++obj-y	+=	__udivmoddi4.c
+diff --git a/arch/powerpc/lib/libgcc/__divdi3.c b/arch/powerpc/lib/libgcc/__divdi3.c
+new file mode 100644
+index 0000000..f23c6fe
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/__divdi3.c
+@@ -0,0 +1,23 @@
++#include "libgcc.h"
++
++s64 __divdi3(s64 num, s64 den)
++{
++	int minus = 0;
++	s64 v;
++
++	if (num < 0) {
++		num = -num;
++		minus = 1;
++	}
++	if (den < 0) {
++		den = -den;
++		minus ^= 1;
++	}
++
++	v = __udivmoddi4(num, den, NULL);
++	if (minus)
++		v = -v;
++
++	return v;
++}
++EXPORT_SYMBOL(__divdi3);
+diff --git a/arch/powerpc/lib/libgcc/__udivmoddi4.c b/arch/powerpc/lib/libgcc/__udivmoddi4.c
+new file mode 100644
+index 0000000..2df0caa
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/__udivmoddi4.c
+@@ -0,0 +1,31 @@
++#include "libgcc.h"
++
++u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p)
++{
++	u64 quot = 0, qbit = 1;
++
++	if (den == 0) {
++		BUG();
++	}
++
++	/* Left-justify denominator and count shift */
++	while ((s64) den >= 0) {
++		den <<= 1;
++		qbit <<= 1;
++	}
++
++	while (qbit) {
++		if (den <= num) {
++			num -= den;
++			quot += qbit;
++		}
++		den >>= 1;
++		qbit >>= 1;
++	}
++
++	if (rem_p)
++		*rem_p = num;
++
++	return quot;
++}
++EXPORT_SYMBOL(__udivmoddi4);
+diff --git a/arch/powerpc/lib/libgcc/libgcc.h b/arch/powerpc/lib/libgcc/libgcc.h
+new file mode 100644
+index 0000000..4dd6a2e
+--- /dev/null
++++ b/arch/powerpc/lib/libgcc/libgcc.h
+@@ -0,0 +1,12 @@
++#ifndef _LIBGCC_H_
++#define _LIBGCC_H_
++
++#include <linux/types.h>
++#include <linux/module.h>
++
++/* Cribbed from klibc/libgcc/ */
++
++s64 __divdi3(s64 num, s64 den);
++u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p);
++
++#endif /*_LIBGCC_H_*/
+diff --git a/lib/Makefile b/lib/Makefile
+index 23de261..b60f0ab 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -13,6 +13,8 @@ lib-$(CONFIG_SMP) += cpumask.o
+ 
+ lib-y	+= kobject.o kref.o klist.o
  
-+lib-y	+=	`$(CC) -print-libgcc-file-name`
++lib-y	+= libgcc/
 +
- # Default to zImage, override when needed
- all: zImage
+ obj-y += div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
+ 	 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o
  




More information about the fedora-extras-commits mailing list