fix compile of denx rtai ppc with gcc 3.3.2
PATCH 1/1 fix compile of denx rtai ppc with gcc 3.3.2
I had a few problems compiling Denx RTAI for ppc with gcc 3.3.2. Attached patches seem to fix this - at least the examples run on my MPC5200. Changes still compile ok on 2.95.4.
For linuxppc_devel patched with patch-denx-linuxppc_2_4_devel-LABEL_2003_12_22_1500-ltt:
Change formatting of __asm__ in ltt_clear_bit to be similar to ltt_set_bit to fix compile error.
For rtai-24.1.12-denx.tar.bz2:
Fix clobber list to fix compile error on gcc 3.3.2.
Andrew
include/asm-ppc/rtai_srq.h +1 -2
@@ -33,8 +33,7 @@ ("trap \n\t" : "=&r" (__sc_3), "=&r" (__sc_4) : "0" (__sc_3), "1" (__sc_4), - "r" (__sc_0) - : "r0", "r3", "r4" ); +"r" (__sc_0)); ((unsigned long *)&retval)[0 ] = __sc_3; ((unsigned long *)&retval)[1 ] = __sc_4;return retval;
trace/tracer.h renamed from trace/tracer.h.orig +8 -8
@@ -176,14 +176,14 @@unsigned long mask =1 << (24 - (nr &0x18 ) + (nr &0x7 ));volatile unsigned long *p = ((volatile unsigned long *)addr) + (nr >>5 ); - __asm__ __volatile__("\n\ -1: lwarx %0,0,%3 - andc %1,%0,%2 - stwcx. %1,0,%3 - bne 1b" - :"=&r" (old),"=&r" (t)/*, "=m" (*p)*/ - :"r" (mask),"r" (p) -/*: "cc"*/ ); + __asm__ __volatile__( +"1:lwarx %0,0,%3 \n\t" +"andc %1,%0,%2 \n\t" +"stwcx. %1,0,%3 \n\t" +"bne 1b \n\t" + :"=&r" (old),"=&r" (t)/*, "=m" (*p)*/ + :"r" (mask),"r" (p) +/*: "cc"*/ );return (old & mask) !=0 ; }
Quoted 15 lines
-- Original Message --
From: "Andrew Dennison" <[email protected]>
To: <[email protected]>
Subject: [PATCH] fix compile of denx rtai ppc with gcc 3.3.2
Date: Mon, 22 Mar 2004 14:38:35 +1100I had a few problems compiling Denx RTAI for ppc with gcc 3.3.2. Attached patches seem to fix this - at least the examples run on my MPC5200. Changes still compile ok on 2.95.4.
For
linuxppc_develpatched with patch-denx-linuxppc_2_4_devel-LABEL_2003_12_22_1500-ltt:
Quoted 6 lines
Change formatting of
__asm__inltt_clear_bitto be similar toltt_set_bitto fix compile error.For rtai-24.1.12-denx.tar.bz2:
Fix clobber list to fix compile error on gcc 3.3.2.
Thanks for the patches. I'm going to verify and commit them into the RTAI 24.x and 3.x CVS repositories a.s.a.p.
This issue is off-topic on this list. Please send RTAI related mails to [email protected].
Wolfgang.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/