[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#562507: swfdec-mozilla: Please support sh4



Package: swfdec-mozilla
Version: 0.8.2-1
Severity: important
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org


Hi,

I am now trying to run Debian on Renesas SH(sh4) CPU.
http://buildd.debian-ports.org/status/architecture.php?suite=unstable&a=sh4

swfdec-mozilla FTBFS on SH4.
Because  swfdec-mozilla does not support Renesas SH.

-----
/bin/bash ../libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I.
-I..    -Wall -Wextra -Wno-missing-field-initializers
-Wno-unused-parameter -Wold-style-definition
-Wdeclaration-after-statement -Wmissing-declarations
-Wmissing-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Winline
-Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default
-I../mozilla-sucks -D_REENTRANT -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/swfdec-0.8
-I/usr/include/gtk-2.0 -I/usr/include/liboil-0.3 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/directfb
-I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0   -DPLUGIN_DIR=\""/usr/lib/swfdec-mozilla"\" -g
-O2 -g -Wall -O2 -c -o libswfdecmozilla_la-plugin.lo `test -f
'plugin.c' || echo './'`plugin.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra
-Wno-missing-field-initializers -Wno-unused-parameter
-Wold-style-definition -Wdeclaration-after-statement
-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
-Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align
-Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security
-Wswitch-enum -Wswitch-default -I../mozilla-sucks -D_REENTRANT
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/swfdec-0.8 -I/usr/include/gtk-2.0
-I/usr/include/liboil-0.3 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/directfb
-I/usr/include/libpng12 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -DPLUGIN_DIR=\"/usr/lib/swfdec-mozilla\" -g -O2
-g -Wall -O2 -c plugin.c  -fPIC -DPIC -o
.libs/libswfdecmozilla_la-plugin.o
In file included from ../mozilla-sucks/prtypes.h:58,
                from ../mozilla-sucks/npapi.h:51,
                from plugin.c:29:
../mozilla-sucks/prcpucfg.h:650:2: error: #error "Unknown CPU architecture"
In file included from ../mozilla-sucks/npapi.h:51,
                from plugin.c:29:
-----

I made patch to support SH. Could you apply this patch?

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
--- a/mozilla-sucks/prcpucfg.h	2007-08-03 19:59:37.000000000 +0000
+++ b/mozilla-sucks/prcpucfg.h	2009-12-24 06:42:12.000000000 +0000
@@ -645,6 +645,47 @@
 #define PR_BYTES_PER_WORD_LOG2   2
 #define PR_BYTES_PER_DWORD_LOG2  3
 
+#elif defined(__sh__)
+
+#ifdef __LITTLE_ENDIAN__
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#else
+#define IS_BIG_ENDIAN 1
+#undef  IS_LITTLE_ENDIAN
+#endif
+
+#define PR_BYTES_PER_BYTE	1
+#define PR_BYTES_PER_SHORT	2
+#define PR_BYTES_PER_INT	4
+#define PR_BYTES_PER_INT64	8
+#define PR_BYTES_PER_LONG	4
+#define PR_BYTES_PER_FLOAT	4
+#define PR_BYTES_PER_DOUBLE	8
+#define PR_BYTES_PER_WORD	4
+#define PR_BYTES_PER_DWORD	8
+
+#define PR_BITS_PER_BYTE	8
+#define PR_BITS_PER_SHORT	16
+#define PR_BITS_PER_INT		32
+#define PR_BITS_PER_INT64	64
+#define PR_BITS_PER_LONG	32
+#define PR_BITS_PER_FLOAT	32
+#define PR_BITS_PER_DOUBLE	64
+#define PR_BITS_PER_WORD	32
+
+#define PR_ALIGN_OF_SHORT	2
+#define PR_ALIGN_OF_INT		4
+#define PR_ALIGN_OF_LONG	4
+#define PR_ALIGN_OF_INT64	8
+#define PR_ALIGN_OF_FLOAT	4
+#define PR_ALIGN_OF_DOUBLE	8
+#define PR_ALIGN_OF_POINTER	4
+#define PR_ALIGN_OF_WORD	4
+
+#define PR_BYTES_PER_WORD_LOG2	2
+#define PR_BYTES_PER_DWORD_LOG2	3
+
 #else
 
 #error "Unknown CPU architecture"

Reply to: