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

Bug#560322: protobuf: Please port to sh4



Package: protobuf
Version: 2.2.0a-0.1
Severity: important
User: debian-sh4@superh.org
Usertags: sh4
Tags: patch
X-Debbugs-CC: debian-superh@lists.debian.org

Hi,

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

protobuf FTBFS on sh4.
http://buildd.debian-ports.org/fetch.php?pkg=protobuf&arch=sh4&ver=2.2.0a-0.1&stamp=1259532738&file=log&as=raw

-----
.....
[       OK ] TextFormatTest.AllowPartial (10 ms)
[ RUN      ] TextFormatTest.ParseExotic
google/protobuf/text_format_unittest.cc:586: Failure
Value of: IsNaN(message.repeated_double(11))
  Actual: false
Expected: true
google/protobuf/text_format_unittest.cc:587: Failure
Value of: IsNaN(message.repeated_double(12))
  Actual: false
Expected: true
[  FAILED  ] TextFormatTest.ParseExotic (6 ms)
.....
-----

protobuf failed in test of NaN.     
We need a -mieee option to perform floating point calcration in SH.

I made a patch to revise to be able to build.
Would you apply it?

Best regards,
  Nobuhiro

-- 
Nobuhiro Iwamatsu
  GPG ID: 40AD1FA6

Attachment: protobuf_2.2.0a-0.1_sh4.build.gz
Description: Binary data

--- debian/rules.orig	2009-12-10 22:07:27.000000000 +0900
+++ debian/rules	2009-12-10 22:07:58.000000000 +0900
@@ -28,6 +28,13 @@
     CFLAGS += -O2
 endif
 
+# Renesas SH(sh4) need -mieee option.
+# If this option is not effective, NaN test failed.
+ifeq (sh4,$(shell dpkg-architecture -qDEB_HOST_ARCH))
+  CFLAGS += -mieee
+  CXXFLAGS += -mieee
+endif
+
 #ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 #    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 #    MAKEFLAGS += -j$(NUMJOBS)

Reply to: