compiling 2.5 kernel for ppc64

Alan Modra amodra at bigpond.net.au
Thu Mar 27 21:37:55 EST 2003


On Thu, Mar 27, 2003 at 01:29:02AM -0700, Gary Byers wrote:
> This attempt failed; many files in the 2.5.66 source tree generated
> spurious-looking errors to the effect that "`asm' operand requires
> spurious reload".  (They seem spurious because - in the cases I
> checked - there didn't seem to be any asm constructs anywhere
> near/involved in the reported error.  I confess that I may not have
> looked hard enough.)

Look using gcc -E.  The following will fix your problem.

diff -urp linux-2.5.66/include/linux/compiler.h linux-2.5.66-ppc/include/linux/compiler.h
--- linux-2.5.66/include/linux/compiler.h	2003-03-20 16:47:28.000000000 +1030
+++ linux-2.5.66-ppc/include/linux/compiler.h	2003-03-27 21:03:35.000000000 +1030
@@ -52,6 +52,6 @@
    shouldn't recognize the original var, and make assumptions about it */
 #define RELOC_HIDE(ptr, off)					\
   ({ unsigned long __ptr;					\
-    __asm__ ("" : "=g"(__ptr) : "0"(ptr));		\
+    __asm__ ("" : "=r"(__ptr) : "0"(ptr));		\
     (typeof(ptr)) (__ptr + (off)); })
 #endif /* __LINUX_COMPILER_H */


--
Alan Modra
IBM OzLabs - Linux Technology Centre

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list