Skip to contentSkip to conversation

2.3.47 imac build?

DISCUSSION Ani Joshi 1 participant 1 message Feb 26, 2000 1 message not in the archive

lore
Share & tools
lore

Ani Joshi

author
#1 lore raw
In reply to a message not in the archive

This little buglet is fixed with the attached patch i made a while back. although it is really not needed anymore since cort tells me its fixed (see 48pre probably, or bk). anyhow, abs() is defined in misc.S. but for those building 2.3.47 and don't want to see that annoying warning, this patch will be fine.

ani

Quoted 16 lines · Jeff Garzik
Quoted 8 lines · "Brandon S. Allbery KF8NH" wrote:

In message <[email protected]>, Jeff Garzik writes:

+-----
| 1) investigate why this warning does not occur on x86.  (is it a gcc
| builtin?)
+--->8

The gcc 2.95.1 info pages claim so.

Thanks, I was too slack to look it up :)

PPC arch compiles with -fno-builtin. Why is this? It seems sub-optimal and non-uniform, leading to little platform discrepancies like this...

Quoted 10 lines

Jeff

--

Jeff Garzik              |
Building 1024            | Viva la open source!
MandrakeSoft, Inc.       |
arch/ppc/kernel/ppc_ksyms.c +0 -1
diff -uNr linux.orig/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c
@@ -56,7 +56,6 @@
 
 asmlinkage long long __ashrdi3(long long, int);
 asmlinkage long long __lshrdi3(long long, int);
-asmlinkage int abs(int);
 
 EXPORT_SYMBOL(clear_page);
 EXPORT_SYMBOL(do_signal);
arch/ppc/lib/Makefile +1 -1
diff -uNr linux.orig/arch/ppc/lib/Makefile linux/arch/ppc/lib/Makefile
@@ -6,7 +6,7 @@
 	$(CC) -D__ASSEMBLY__ $(AFLAGS) -c $< -o $*.o
 
 O_TARGET = lib.o
-O_OBJS  = checksum.o string.o strcase.o
+O_OBJS  = checksum.o string.o strcase.o abs.o
 
 ifdef CONFIG_SMP
 O_OBJS += locks.o
arch/ppc/lib/abs.S +7 -0
diff -uNr linux.orig/arch/ppc/lib/abs.S linux/arch/ppc/lib/abs.S
@@ -0,0 +1,7 @@
+        .globl abs
+abs:
+        mr. 3,3
+        bclr 4,0
+        neg 3,3
+        blr
+
include/asm-ppc/system.h +2 -0
diff -uNr linux.orig/include/asm-ppc/system.h linux/include/asm-ppc/system.h
@@ -148,4 +148,6 @@
 	return (void *) xchg_u32(m, (unsigned long) val);
 }
 
+
+asmlinkage int abs(int);
 #endif