[Pkg-oss4-maintainers] Bug#557909: oss4: Please support sh4

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Wed Nov 25 08:46:09 UTC 2009


Package: oss4
Version: 4.2-build2000-1
Severity: important
User: debian-sh4 at superh.org
Usertags: sh4

Hi,

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

oss4 BTBFS on sh4.
http://buildd.debian-ports.org/fetch.php?pkg=oss4&arch=sh4&ver=4.2-build2000-1&stamp=1259107447&file=log&as=raw

1. When we build libossmix.so, use ld. I think that it is right to use gcc (cc). 
I made a patch to revise this. (sharedlib.patch) 
-----
<snip>
ld  -shared -fPIC -o ../../target/lib/libossmix.so ./libossmix_cache.o
./libossmix_local.o ./libossmix_main.o ./libossmix_tcp.o
....
-----

2. sh4 dont support "-mregparm=3". Please treat it in the same way as arm.
I made a patch to revise this. (sh4_support.patch)

Best regards,
  Nobuhiro 

Kernel: Linux 2.6.30-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
-------------- next part --------------
--- build-tree/oss-build/setup/srcconf.c	2009-11-25 15:25:08.000000000 +0900
+++ build-tree/oss-build/setup/srcconf.c	2009-11-25 15:26:22.000000000 +0900
@@ -1181,7 +1181,7 @@
 
       fprintf (f, "$(LIBDIR)/%s.so:\t$(OBJECTS)\n", name);
       fprintf (f,
-	       "\t$(LD) $(LDFLAGS) %s -o $(LIBDIR)/%s.so $(OBJECTS)\n",
+	       "\t$(CC) $(LDFLAGS) %s -o $(LIBDIR)/%s.so $(OBJECTS)\n",
 	       shlib_ldflags, name);
       fprintf (f, "\n\n");
     }
-------------- next part --------------
--- build-tree/oss-v4.2-build2000-src-gpl/setup/srcconf_linux.inc.orig	2009-11-25 07:08:01.000000000 +0000
+++ build-tree/oss-v4.2-build2000-src-gpl/setup/srcconf_linux.inc	2009-11-25 07:11:32.000000000 +0000
@@ -53,7 +53,9 @@
   fprintf (f,
 	     "CFLAGS += -O3 -fno-common  -mcmodel=kernel -mno-red-zone  -fno-asynchronous-unwind-tables -ffreestanding%s\n", fnsp);
 # else
-#   ifndef __arm__
+#   if defined(__arm__) || defined(__sh__) 
+  fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding%s\n", fnsp);
+#   else
   if (getenv ("NO_REGPARM") == NULL)
 	{
 	  fprintf (f,
@@ -63,8 +65,6 @@
 	{
 	  fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding -DNO_REGPARM%s\n", fnsp);
 	}
-#   else
-  fprintf (f, "CFLAGS += -O3 -fno-common -ffreestanding%s\n", fnsp);
 #   endif
 # endif
 }


More information about the Pkg-oss4-maintainers mailing list