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

Bug#573814: ecl: Please support Renesas SH(sh4)



Source: ecl
Version: 10.2.1-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

ecl FTBFS on SH4.
Because  xine-plugin does not support Renesas SH.
 http://buildd.debian-ports.org/fetch.php?pkg=ecl&arch=sh4&ver=10.2.1-1&stamp=1267337068&file=log&as=raw

-----
rm: invalid argument: `'
 sh4-linux-gnu-gcc -fPIC -DPACKAGE_NAME=\"gc\"
-DPACKAGE_TARNAME=\"gc\" -DPACKAGE_VERSION=\"7.1\"
"-DPACKAGE_STRING=\"gc 7.1\""
-DPACKAGE_BUGREPORT=\"Hans.Boehm@hp.com\" -DGC_VERSION_MAJOR=7
-DGC_VERSION_MINOR=1 -DPACKAGE=\"gc\" -DVERSION=\"7.1\"
-DGC_LINUX_THREADS=1 -D_REENTRANT=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1
-DGC_GCJ_SUPPORT=1 -DJAVA_FINALIZATION=1 -DATOMIC_UNCOLLECTABLE=1
-DLARGE_CONFIG=1
-I/build/buildd-ecl_10.2.1-1-sh4-2jA9tI/ecl-10.2.1/src/gc/include
-fexceptions -I libatomic_ops/src -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-g -O2 -fPIC -D_THREAD_SAFE -MT atomic_ops.lo -MD -MP -MF
.deps/atomic_ops.Tpo -c atomic_ops.c -o atomic_ops.o
atomic_ops.c:74: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'AO_locks'
atomic_ops.c:116: error: expected ';', ',' or ')' before '*' token
atomic_ops.c:124: error: expected ';', ',' or ')' before '*' token
atomic_ops.c:130: error: expected ';', ',' or ')' before '*' token
atomic_ops.c:139: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'init_lock'
atomic_ops.c: In function 'AO_compare_and_swap_emulation':
atomic_ops.c:144: error: 'AO_TS_t' undeclared (first use in this function)
atomic_ops.c:144: error: (Each undeclared identifier is reported only once
atomic_ops.c:144: error: for each function it appears in.)
atomic_ops.c:144: error: 'my_lock' undeclared (first use in this function)
atomic_ops.c:144: error: 'AO_locks' undeclared (first use in this function)
atomic_ops.c:150: error: 'init_lock' undeclared (first use in this function)
atomic_ops.c: In function 'AO_compare_double_and_swap_double_emulation':
atomic_ops.c:180: error: 'AO_TS_t' undeclared (first use in this function)
atomic_ops.c:180: error: 'my_lock' undeclared (first use in this function)
atomic_ops.c:180: error: 'AO_locks' undeclared (first use in this function)
atomic_ops.c:186: error: 'init_lock' undeclared (first use in this function)
atomic_ops.c: In function 'AO_store_full_emulation':
atomic_ops.c:215: error: 'AO_TS_t' undeclared (first use in this function)
atomic_ops.c:215: error: 'my_lock' undeclared (first use in this function)
atomic_ops.c:215: error: 'AO_locks' undeclared (first use in this function)
make[4]: *** [atomic_ops.lo] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [libeclgc.a] Error 2
make[1]: *** [all] Error 2
make: *** [build-arch-stamp] Error 2
-----

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
--- ecl-10.2.1.orig/src/gc/libatomic_ops-1.2/src/atomic_ops.h
+++ ecl-10.2.1/src/gc/libatomic_ops-1.2/src/atomic_ops.h
@@ -229,6 +229,10 @@
 # if defined(__cris__) || defined(CRIS)
 #   include "atomic_ops/sysdeps/gcc/cris.h"
 # endif
+# if defined(__sh__) || defined(SH4)
+#   include "atomic_ops/sysdeps/gcc/sh.h"
+#   define AO_CAN_EMUL_CAS
+# endif /* __sh__ */
 #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
 
 #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)
--- ecl-10.2.1.orig/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am
+++ ecl-10.2.1/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/Makefile.am
@@ -29,6 +29,7 @@
 	  gcc/powerpc.h gcc/sparc.h \
 	  gcc/hppa.h gcc/m68k.h gcc/s390.h \
 	  gcc/ia64.h gcc/x86_64.h gcc/cris.h \
+	  gcc/sh.h \
 	\
 	  icc/ia64.h \
 	\
--- ecl-10.2.1.orig/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sh.h
+++ ecl-10.2.1/src/gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sh.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved.
+ *
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose,  provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+
+#include "../all_atomic_load_store.h"
+#include "../ordered.h"
+
+/* sh has tas.b(byte) only */
+#include "../test_and_set_t_is_char.h"
+
+AO_INLINE AO_TS_VAL_t
+AO_test_and_set_full(volatile AO_TS_t *addr)
+{
+  int oldval;
+  __asm__ __volatile__(
+        "tas.b @%1; movt %0"
+        : "=r" (oldval)
+        : "r" (addr)
+        : "t", "memory");
+  return oldval? AO_TS_CLEAR : AO_TS_SET;
+}
+#define AO_HAVE_test_and_set_full

Reply to: