Bug#614508: codeblock: sh4: FTBFS: error: #error "Unknown CPU architecture"
Source: codeblock
Version: 10.05-1
Severity: wishlist
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org
Hi,
codeblock FTBFS on SH4.
Because codeblock does not support Renesas SH4.
http://buildd.debian-ports.org/fetch.php?pkg=codeblocks&arch=sh4&ver=10.05-1&stamp=1298321953&file=log&as=raw
-----
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../src/include
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread
-I../../src/include -I../../src/sdk/wxscintilla/include
-I../../src/include/tinyxml -I../../src/include/scripting/include
-I../../src/include/scripting/sqplus
-I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math
-DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC
-fexceptions -c cbeditor.cpp -fPIC -DPIC -o .libs/cbeditor.o
In file included from ../../src/include/mozilla_chardet/prtypes.h:58,
from ../../src/include/mozilla_chardet/nscore.h:53,
from
../../src/include/mozilla_chardet/nsUniversalDetector.h:41,
from ../../src/include/encodingdetector.h:12,
from cbeditor.cpp:41:
../../src/include/mozilla_chardet/prcpucfg.h:604:2: error: #error
"Unknown CPU architecture"
In file included from ../../src/include/mozilla_chardet/nscore.h:53,
from
../../src/include/mozilla_chardet/nsUniversalDetector.h:41,
from ../../src/include/encodingdetector.h:12,
from cbeditor.cpp:41:
../../src/include/mozilla_chardet/prtypes.h:277:2: error: #error No
suitable type for PRInt8/PRUint8
../../src/include/mozilla_chardet/prtypes.h:302:2: error: #error No
suitable type for PRInt16/PRUint16
../../src/include/mozilla_chardet/prtypes.h:334:2: error: #error No
suitable type for PRInt32/PRUint32
../../src/include/mozilla_chardet/prtypes.h:397:2: error: #error
'sizeof(int)' not sufficient for platform use
In file included from ../../src/include/mozilla_chardet/nscore.h:53,
from
../../src/include/mozilla_chardet/nsUniversalDetector.h:41,
from ../../src/include/encodingdetector.h:12,
-----
I attached the patch which revised this problem.
Could you check and apply this?
Best regards,
Nobuhiro
diff -urN codeblocks-10.05/src/include/mozilla_chardet/prcpucfg.h codeblocks-10.05/src/include/mozilla_chardet/prcpucfg.h
--- codeblocks-10.05/src/include/mozilla_chardet/prcpucfg.h 2010-05-22 19:33:23.000000000 +0900
+++ codeblocks-10.05/src/include/mozilla_chardet/prcpucfg.h 2011-02-22 10:02:09.000000000 +0900
@@ -599,6 +599,56 @@
#define PR_BYTES_PER_WORD_LOG2 3
#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_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#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: