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

Bug#532263: gcc-4.4: Support for Renesas SuperH (SH4)

Package: gcc-4.4
Version: 4.4.0-5
Severity: wishlist
X-Debbugs-CC: debian-superh@lists.debian.org
User: debian-sh4@superh.org
Usertag: sh4


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

On SH, not all libgcc functions are provided in shared library, but some
are provided in a static library.
To do this linking process automatically, libgcc_s.so for SH is a linker
script like below.
$ cat libgcc_s.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library.   */
GROUP(libgcc_s.so.1 libgcc.a)

Current debian/rules replaces libgcc_s.so. This processing is not
appropriate in SH. It is necessary to perform it as follows.

ifeq ($(DEB_HOST_ARCH), sh4)
	mv $(d)/$(PF)/$(libdir)/libgcc_s.so $(d)/$(gcc_lib_dir)/libgcc_s.so
	ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME)
	rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
	ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
I made a patch to support SH.
Would you please apply it?

Best regards,

-- 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

Versions of packages gcc-4.4 depends on:
ii  binutils                      2.19.1-1   The GNU assembler, linker and bina
ii  cpp-4.4                       4.4.0-5    The GNU C preprocessor
ii  gcc-4.4-base                  4.4.0-5    The GNU Compiler Collection (base
ii  libc6                         2.9-6      GNU C Library: Shared libraries
ii  libgcc1                       1:4.4.0-5  GCC support library
ii  libgomp1                      4.4.0-5    GCC OpenMP (GOMP) support library

Versions of packages gcc-4.4 recommends:
ii  libc6-dev                     2.9-6      GNU C Library: Development Librari

Versions of packages gcc-4.4 suggests:
pn  gcc-4.4-doc                   <none>     (no description available)
pn  gcc-4.4-locales               <none>     (no description available)
pn  gcc-4.4-multilib              <none>     (no description available)
pn  libgcc1-dbg                   <none>     (no description available)
pn  libgomp1-dbg                  <none>     (no description available)
pn  libmudflap0-4.4-dev           <none>     (no description available)
pn  libmudflap0-dbg               <none>     (no description available)

-- no debconf information

Nobuhiro Iwamatsu
diff --git a/debian/rules.d/binary-gcc-cross.mk b/debian/rules.d/binary-gcc-cross.mk
index 9081656..20e9139 100644
--- a/debian/rules.d/binary-gcc-cross.mk
+++ b/debian/rules.d/binary-gcc-cross.mk
@@ -67,8 +67,14 @@ $(binary_stamp)-gcc: $(install_dependencies)
 	rm -rf $(d_gcc)
 	dh_installdirs -p$(p_gcc) $(dirs_gcc)
+ifeq ($(DEB_TARGET_ARCH), sh4)
+	mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libgcc_s.so $(d)/$(gcc_lib_dir)/libgcc_s.so
+	ln -sf /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so.$(GCC_SONAME)
 	rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
 	ln -sf /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
 ifeq ($(biarch64),yes)
 	rm -f $(d)/$(PF)/$(lib64)/libgcc_s.so
 	dh_link -p$(p_gcc) \
diff --git a/debian/rules.d/binary-gcc.mk b/debian/rules.d/binary-gcc.mk
index 9ca20df..1015c58 100644
--- a/debian/rules.d/binary-gcc.mk
+++ b/debian/rules.d/binary-gcc.mk
@@ -97,8 +97,13 @@ $(binary_stamp)-gcc: $(install_dependencies)
 	rm -rf $(d_gcc)
 	dh_installdirs -p$(p_gcc) $(dirs_gcc)
+ifeq ($(DEB_HOST_ARCH), sh4)
+	mv $(d)/$(PF)/$(libdir)/libgcc_s.so $(d)/$(gcc_lib_dir)/libgcc_s.so
+	ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so.$(GCC_SONAME)
 	rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
 	ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
 ifeq ($(with_libgmath),yes)
 	rm -f $(d)/$(PF)/$(libdir)/libgcc-math.{la,so}

Reply to: