From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Greg M" To: gcc-help@gcc.gnu.org Subject: Libstdc++.sl and exceptions handling on HP-UX 11 (gcc-2.95.2) Date: Wed, 15 Dec 1999 16:07:00 -0000 Message-id: <19991216000638.33495.qmail@hotmail.com> X-SW-Source: 1999-12/msg00238.html I compiled gcc-2.95.2 on HP-UX 11 using configure --with-gnu-as --enable-shared --enable-threads make install placed libstdc++.a.2.10.0 and libstdc++.sl into /usr/local/bin I am trying to compile a simple exception handling test: cat conftest.C class Ex { }; int main () { try { throw Ex(); return 1; } catch (Ex &ex) { return 0; } catch (...) { return 1; } } the binary produced by c++ -o conftest -g -fexceptions conftest.C -L/usr/local/lib -Wl,-B,deferred produces a core dump doing __eh_alloc(); I also noticed that __eh_alloc is defined in libgcc.a and (duplicated ?) in libstc++.sl (three times). The chatr shows that I linked with libstc++.sl : chatr conftest conftest: shared executable shared library dynamic path search: SHLIB_PATH disabled second embedded path disabled first Not Defined shared library list: dynamic /usr/local/lib/libstdc++.sl dynamic /usr/lib/libm.2 dynamic /usr/lib/libc.2 shared library binding: deferred global hash table disabled plabel caching disabled global hash array size:1103 global hash array nbuckets:3 shared vtable support disabled static branch prediction disabled executable from stack: D (default) kernel assisted branch prediction enabled lazy swap allocation disabled text segment locking disabled data segment locking disabled data page size: D (default) instruction page size: D (default) If I link with the static library like: c++ -o conftest -g -fexceptions conftest.C -Wl,-B,deferred chatr conftest conftest: shared executable shared library dynamic path search: SHLIB_PATH disabled second embedded path disabled first Not Defined shared library list: dynamic /usr/lib/libm.2 dynamic /usr/lib/libc.2 shared library binding: deferred global hash table disabled plabel caching disabled global hash array size:1103 global hash array nbuckets:3 shared vtable support disabled static branch prediction disabled executable from stack: D (default) kernel assisted branch prediction enabled lazy swap allocation disabled text segment locking disabled data segment locking disabled data page size: D (default) instruction page size: D (default) the binary works OK. I also noticed that the HP Software Archive binaries are built and distributed without libstdc++.sl I have not seen any references to the problems with libstdc++.sl and exceprion handling on HP. I would appreciate any advise on what am I doing wrong. Thanks, Greg M ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Greg M" To: gcc-help@gcc.gnu.org Subject: Libstdc++.sl and exceptions handling on HP-UX 11 (gcc-2.95.2) Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <19991216000638.33495.qmail@hotmail.com> X-SW-Source: 1999-12n/msg00238.html Message-ID: <19991231222400.KBks6yXY6LsTj8-nblSzZmOzstpH5yqd269WETT76bo@z> I compiled gcc-2.95.2 on HP-UX 11 using configure --with-gnu-as --enable-shared --enable-threads make install placed libstdc++.a.2.10.0 and libstdc++.sl into /usr/local/bin I am trying to compile a simple exception handling test: cat conftest.C class Ex { }; int main () { try { throw Ex(); return 1; } catch (Ex &ex) { return 0; } catch (...) { return 1; } } the binary produced by c++ -o conftest -g -fexceptions conftest.C -L/usr/local/lib -Wl,-B,deferred produces a core dump doing __eh_alloc(); I also noticed that __eh_alloc is defined in libgcc.a and (duplicated ?) in libstc++.sl (three times). The chatr shows that I linked with libstc++.sl : chatr conftest conftest: shared executable shared library dynamic path search: SHLIB_PATH disabled second embedded path disabled first Not Defined shared library list: dynamic /usr/local/lib/libstdc++.sl dynamic /usr/lib/libm.2 dynamic /usr/lib/libc.2 shared library binding: deferred global hash table disabled plabel caching disabled global hash array size:1103 global hash array nbuckets:3 shared vtable support disabled static branch prediction disabled executable from stack: D (default) kernel assisted branch prediction enabled lazy swap allocation disabled text segment locking disabled data segment locking disabled data page size: D (default) instruction page size: D (default) If I link with the static library like: c++ -o conftest -g -fexceptions conftest.C -Wl,-B,deferred chatr conftest conftest: shared executable shared library dynamic path search: SHLIB_PATH disabled second embedded path disabled first Not Defined shared library list: dynamic /usr/lib/libm.2 dynamic /usr/lib/libc.2 shared library binding: deferred global hash table disabled plabel caching disabled global hash array size:1103 global hash array nbuckets:3 shared vtable support disabled static branch prediction disabled executable from stack: D (default) kernel assisted branch prediction enabled lazy swap allocation disabled text segment locking disabled data segment locking disabled data page size: D (default) instruction page size: D (default) the binary works OK. I also noticed that the HP Software Archive binaries are built and distributed without libstdc++.sl I have not seen any references to the problems with libstdc++.sl and exceprion handling on HP. I would appreciate any advise on what am I doing wrong. Thanks, Greg M ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com