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

Bug#567726: stlport5.2: Please support Renesas SH4(sh)



Source: stlport5.2
Version: 5.2.1-5
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

stlport5.2 FTBFS on SH4.
Because stlport5.2 does not support Renesas SH.
http://buildd.debian-ports.org/fetch.php?pkg=stlport5.2&arch=sh4&ver=5.2.1-5&stamp=1264806388&file=log&as=raw

-----
from ../../stlport/memory:29,
                 from ../../src/dll_main.cpp:41:
../../stlport/stl/_cstdlib.h:95: error: 'std::llabs' has not been declared
../../stlport/stl/_cstdlib.h:96: error: 'std::lldiv_t' has not been declared
../../stlport/stl/_cstdlib.h:97: error: 'std::lldiv' has not been declared
In file included from ../../stlport/stl/_alloc.h:35,
                 from ../../stlport/memory:29,
                 from ../../src/dll_main.cpp:41:
../../stlport/stl/_cstdlib.h: In function 'long long int abs(long long int)':
../../stlport/stl/_cstdlib.h:151: error: 'llabs' is not a member of 'std'
../../stlport/stl/_cstdlib.h: In function 'lldiv_t div(long long int, long long int)':
../../stlport/stl/_cstdlib.h:152: error: 'lldiv' is not a member of 'std'
In file included from ../../src/dll_main.cpp:73:
../../stlport/stl/_stdexcept_base.c: In constructor 'stlp_std::__Named_exception::__Named_exception(const stlp_std::string&)':
../../stlport/stl/_stdexcept_base.c:28: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../stlport/stl/_stdexcept_base.c: In copy constructor 'stlp_std::__Named_exception::__Named_exception(const stlp_std::__Named_exception&)':
../../stlport/stl/_stdexcept_base.c:51: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../stlport/stl/_stdexcept_base.c: In member function 'stlp_std::__Named_exception& stlp_std::__Named_exception::operator=(const stlp_std::__Named_exception&)':
../../stlport/stl/_stdexcept_base.c:67: warning: dereferencing type-punned pointer will break strict-aliasing rules
../../stlport/stl/_stdexcept_base.c:77: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [obj/gcc/so/dll_main.o] Error 1
make: *** [debian/stamp-makefile-build] Error 2
-----

A patch(debian/patches/arm-build-7820fe.diff) same as arm is necessary for sh. 
I added sh to this.
Could you apply this patch?

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
  GPG ID: 3170EBE9 / 40AD1FA6
From: Petr Ovtchenkov <ptr@void-ptr.info>
Date: Thu, 25 Jun 2009 08:06:11 +0000 (+0400)
Subject: Fix build for ARM GNU/Linux
X-Git-Url: http://stlport.git.sourceforge.net/git/gitweb.cgi?p=stlport;a=commitdiff_plain;h=7820fe8e502b062f82d8bb630ad07aa20f6d2d4c

Fix build for ARM GNU/Linux

llabs, lldiv_t, lldiv not defined in native gcc's std namespace;
use ones from C space (i.e. from global namespace) instead.

Build done for Sourcery G++ Lite 2009q1-176 for ARM GNU/Linux;
unit test build success, run not checked.
---

Index: stlport5.2-5.2.1/stlport/stl/_cstdlib.h
===================================================================
--- stlport5.2-5.2.1.orig/stlport/stl/_cstdlib.h	2008-12-10 10:56:51.000000000 +0100
+++ stlport5.2-5.2.1/stlport/stl/_cstdlib.h	2009-06-28 15:22:50.000000000 +0200
@@ -91,7 +91,7 @@
 using _STLP_VENDOR_CSTD::labs;
 using _STLP_VENDOR_CSTD::ldiv;
 #    if defined (_STLP_LONG_LONG) && !defined (_STLP_NO_VENDOR_STDLIB_L)
-#      if !defined(__sun)
+#      if !defined(__sun) && !defined(__arm__) && !defined(__sh__)
 using _STLP_VENDOR_CSTD::llabs;
 using _STLP_VENDOR_CSTD::lldiv_t;
 using _STLP_VENDOR_CSTD::lldiv;
@@ -147,7 +147,7 @@
 
 #if defined (_STLP_LONG_LONG)
 #  if !defined (_STLP_NO_VENDOR_STDLIB_L)
-#    if !defined (__sun)
+#    if !defined (__sun) && !defined(__arm__) && !defined(__mips__) && !defined(__mipsel__) && !defined(__sh__)
 inline _STLP_LONG_LONG  abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::llabs(__x); }
 inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::lldiv(__x, __y); }
 #    else

Reply to: