Source: varnish Version: 2.0.6-1 Severity: wishlist Tags: patch User: debian-...@superh.org Usertags: sh4 X-Debbugs-CC: debian-sup...@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 varnish FTBFS on SH4. Because varnish does not support Renesas SH. ----- jemalloc_linux.c: In function 'size2bin_init': jemalloc_linux.c:4743: warning: assignment from incompatible pointer type jemalloc_linux.c: In function 'size2bin_init_hard': jemalloc_linux.c:4773: error: 'QUANTUM_2POW' undeclared (first use in this function) jemalloc_linux.c:4773: error: invalid operands to binary << (have 'unsigned int' and 'const unsigned int *') jemalloc_linux.c:4781: error: invalid operands to binary << (have 'unsigned int' and 'const unsigned int *') jemalloc_linux.c:4781: error: invalid operands to binary << (have 'unsigned int' and 'const unsigned int *') jemalloc_linux.c:4782: error: invalid operands to binary >> (have 'size_t' and 'const unsigned int *') jemalloc_linux.c:4782: warning: assignment makes integer from pointer without a cast jemalloc_linux.c: In function 'malloc_init_hard': jemalloc_linux.c:5083: error: 'QUANTUM_2POW' undeclared (first use in this function) jemalloc_linux.c:5083: warning: comparison between pointer and integer jemalloc_linux.c:5186: error: invalid operands to binary >> (have 'size_t' and 'const unsigned int *') jemalloc_linux.c:5186: warning: assignment makes integer from pointer without a cast make[4]: *** [libjemalloc_mt_la-jemalloc_linux.lo] Error 1 ----- I made patch to support SH. Could you apply this patch? Best regards, Nobuhiro
--- a/lib/libjemalloc/jemalloc_linux.c 2009-12-16 11:24:15.000000000 +0000 +++ b/lib/libjemalloc/jemalloc_linux.c 2010-01-13 01:34:25.000000000 +0000 @@ -277,6 +277,12 @@ # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 #endif +#ifdef __sh__ +# define PAGESIZE_2POW 12 +# define QUANTUM_2POW 3 +# define SIZEOF_PTR_2POW 2 +# define NO_TLS +#endif #define QUANTUM ((size_t)(1U << QUANTUM_2POW)) #define QUANTUM_MASK (QUANTUM - 1) --- a/lib/libjemalloc/malloc.c 2010-01-13 01:35:43.000000000 +0000 +++ b/lib/libjemalloc/malloc.c 2010-01-13 01:35:32.000000000 +0000 @@ -265,6 +265,12 @@ # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 2 #endif +#ifdef __sh__ +# define PAGESIZE_2POW 12 +# define QUANTUM_2POW 3 +# define SIZEOF_PTR_2POW 2 +# define NO_TLS +#endif #define QUANTUM ((size_t)(1U << QUANTUM_2POW)) #define QUANTUM_MASK (QUANTUM - 1)