Re: libstdc++ not handling exception for sh4 architecture

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.devel.toolchain,gmane.linux.debian.ports.superh
Message-ID <[email protected]>
Hello!

On 07/25/2015 09:02 AM, Rahul Dhobi wrote:
> I'm using *gcc4.9 sh4 toolchain* from
> http://download.si-linux.co.jp/debian-sh/jessie-sh4/toolchain-amd64/gcc-4.9/

This is not part of Debian, so we can't really support it! In any case,
please make sure you use a current snapshot of either gcc-4.9 or gcc-5
as many bugs in the SH backend were fixed recently.

> , During testing I have found that libstdc++ is not handling exception
> and program receives  *SIGABRT* signal.
> 
> sample program is below.
> (...)

Works as expected here:

root@tirpitz:~> nano test.cpp
root@tirpitz:~> g++ test.cpp -o testcpp
root@tirpitz:~> ./testcpp
divided by zero..
root@tirpitz:~> uname -a
Linux tirpitz 3.16.7-ckt7 #5 PREEMPT Sat Apr 25 15:33:59 CEST 2015 sh4a
GNU/Linux
root@tirpitz:~>

This was tested with gcc-5_5.2.1-15 from Debian unstable:

root@tirpitz:~> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/sh4-linux-gnu/5/lto-wrapper
Target: sh4-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 5.2.1-15'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,c++,java,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libitm --disable-libsanitizer --disable-libquadmath
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-sh4/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-sh4
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-sh4
--with-arch-directory=sh --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-cpu=sh4
--with-multilib-list=m4,m4-nofpu --enable-checking=release
--build=sh4-linux-gnu --host=sh4-linux-gnu --target=sh4-linux-gnu
Thread model: posix
gcc version 5.2.1 20150808 (Debian 5.2.1-15)
root@tirpitz:~>

Adrian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.