Hello,
I have the following issues cross-compiling DirectFB 1.5.3 for ARM:
(1) of _D__atomic_cmpxchg() parameter is named 'new' in lib/direct/atomic.h
which clashes with C++ keyword -- there is a similar patch for MIPS, see
13089ccf8bd4ec9465859653e386435fe8dbe9f5
(2) typecast in the D_SYNC_ADD_AND_FETCH is incorrect, similar patch for
MIPS see b0db6ef94e506a74817ad34e61abf398127f111b
(3) DSPF_ARGBF88871 seems to have been renamed to DSPF_RGBAF88871, fixes
with ef5e1398fe4037b63d6513e450f107fcfe91047f
attached patch fixes all issues for me, please apply to HEAD and 1.5.3 as
appropriate
thanks, regards, p.
--
Peter Meerwald
+43-664-2444418 (mobile)
diff -Naur DirectFB-1.5.3/lib/direct/atomic.h DirectFB-1.5.3_patched//lib/direct/atomic.h
--- DirectFB-1.5.3/lib/direct/atomic.h 2011-07-31 20:51:06.000000000 +0200
+++ DirectFB-1.5.3_patched//lib/direct/atomic.h 2011-11-02 13:35:00.938336002 +0100
@@ -185,7 +185,7 @@
#if defined(ARCH_ARM) && !defined(ARCH_IWMMXT)
-static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int new)
+static inline int _D__atomic_cmpxchg(volatile int *ptr, int old_value, int new_value)
{
unsigned long oldval, res;
@@ -196,7 +196,7 @@
"teq %1, %3\n"
"strexeq %0, %4, [%2]\n"
: "=&r" (res), "=&r" (oldval)
- : "r" (ptr), "Ir" (old), "r" (new)
+ : "r" (ptr), "Ir" (old_value), "r" (new_value)
: "cc");
} while (res);
@@ -237,8 +237,7 @@
}
#define D_SYNC_ADD_AND_FETCH( ptr, value ) \
- (_D__atomic_add_return( (int) (value), (void*) (ptr) ))
-
+ (_D__atomic_add_return( (int) (value), (int*) (ptr) ))
#endif
diff -Naur DirectFB-1.5.3/src/gfx/generic/generic_stretch_blit.c DirectFB-1.5.3_patched//src/gfx/generic/generic_stretch_blit.c
--- DirectFB-1.5.3/src/gfx/generic/generic_stretch_blit.c 2011-07-31 20:51:06.000000000 +0200
+++ DirectFB-1.5.3_patched//src/gfx/generic/generic_stretch_blit.c 2011-11-02 13:35:09.208336008 +0100
@@ -441,7 +441,7 @@
}
break;
- case DSPF_ARGBF88871:
+ case DSPF_RGBAF88871:
if (state->blittingflags & DSBLIT_SRC_PREMULTIPLY) {
for (i=0; i<gfxs->Blut->num_entries; i++) {
int alpha = entries[i].a + 1;
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev