------- Comment #3 from v dot grikyan at sam-solutions dot net 2008-08-06
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.
Configured with: ../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
force use of builtin_setjmp for exceptions
Also in .../gcc-4.1.2/libstdc++-v3/libsupc++/eh_throw.cc we see the following
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"
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