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

Bug#537210: libbsd: FTBFS: build fail on Renesas SH(sh4)



Package: libbsd
Version: 0.1.4-1
Severity: wishlist
Tags: patch
X-Debbugs-CC: debian-superh@lists.debian.org
X-Debbugs-CC: brad@brad-smith.co.uk

Hi!

I am now trying to run Debian on Renesas SH CPU(sh4).

Current source code can not build package.
Because there is a coding error.

<snip>
cc -o src/nlist.o -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE
-D__REENTRANT -Wall -g -O2 -c src/nlist.c
In file included from src/nlist.c:53:
src/local-elf.h:150:11: error: missing binary operator before token "("
src/local-elf.h:155:2: error: #error Unknown SH endianness
src/nlist.c: In function '__elf_is_okay__':
src/nlist.c:234: error: 'ELF_TARG_DATA' undeclared (first use in this function)
src/nlist.c:234: error: (Each undeclared identifier is reported only once
src/nlist.c:234: error: for each function it appears in.)
make[1]: *** [src/nlist.o] Error 1
make[1]: Leaving directory `/home/iwamatsu/build-area/libbsd-0.1.4'
<snip>


I made a patch to support SH.
And  there was the same problem in the avr32 architecture, I revised it.
Would you please apply it?

Best regards,
 Nobuhiro

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- a/src/local-elf.h	2009-07-16 14:08:10.000000000 +0900
+++ b/src/local-elf.h	2009-05-21 08:54:36.000000000 +0900
@@ -66,7 +66,7 @@
 #endif
 #define ELF_TARG_MACH	EM_AVR32
 #define ELF_TARG_CLASS	ELFCLASS32
-#if defined(__LITTLE_ENDIAN__)
+#if define(__LITTLE_ENDIAN__)
 #define ELF_TARG_DATA	ELFDATA2LSB
 #elif defined(__BIG_ENDIAN__)
 #define ELF_TARG_DATA	ELFDATA2LMSB
@@ -147,7 +147,7 @@
 
 #define ELF_TARG_MACH	EM_SH
 #define ELF_TARG_CLASS	ELFCLASS32
-#if defined(__LITTLE_ENDIAN__)
+#if define(__LITTLE_ENDIAN__)
 #define ELF_TARG_DATA	ELFDATA2LSB
 #elif defined(__BIG_ENDIAN__)
 #define ELF_TARG_DATA	ELFDATA2LMSB

Reply to: