------- Comment #3 from v dot grikyan at sam-solutions dot net 2008-08-06 09:11 ------- As we understand (looking at gcc sources), sjlj-mechanism can be set only during building of gcc. We did not build gcc on our HP-UX system ourselves but looking at output "gcc -v" it seems it was configured without any parameters
bash-3.2$ gcc -v Using built-in specs. Target: hppa2.0w-hp-hpux11.11 Configured with: ../gcc/configure : (reconfigured) ../gcc/configure : (reconfigured) ../gcc/configure Thread model: posix gcc version 4.1.2 So gcc build system had to determine configuration automatically. We found in .../libstdc++-v3/configure --enable-sjlj-exceptions force use of builtin_setjmp for exceptions [default=auto] Also in .../gcc-4.1.2/libstdc++-v3/libsupc++/eh_throw.cc we see the following code #ifdef _GLIBCXX_SJLJ_EXCEPTIONS _Unwind_SjLj_RaiseException (&header->unwindHeader); #else _Unwind_RaiseException (&header->unwindHeader); #endif and going through debug of our test application we see the call of the function _Unwind_RaiseException but not _Unwind_SjLj_RaiseException So we suppose that dwarf2-mechanism is used. Also we found in the document "Installing GCC" (http://209.85.135.104/search?q=cache:crNR9x-pALIJ:wwwcdf.pd.infn.it/localdoc/gccinstall.ps.gz+gcc+sjlj+dwarf2+exceptions+option&hl=ru&ct=clnk&cd=28) the following phrase "As of GCC 4.1, DWARF2 exception handling is available on HP-UX. It is now the default.This exposed a bug in the handling of data relocations in the GAS assembler. The handlingof 64-bit data relocations was seriously broken, affecting debugging and exception supporton all 'hppa64-*-*' targets. Under some circumstances, 32-bit data relocations could alsobe handled incorrectly. This problem is fixed in GAS version 2.16.91 20051125" In our case 'as --version' prints the following result bash-3.2$ as --version GNU assembler (GNU Binutils) 2.18 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `hppa2.0w-hp-hpux11.11'. So it seems GAS version is correct but anyway the test application does not work... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37029