public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Greg M" <greg__m__@hotmail.com>
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	[thread overview]
Message-ID: <19991216000638.33495.qmail@hotmail.com> (raw)
Message-ID: <19991231222400.KBks6yXY6LsTj8-nblSzZmOzstpH5yqd269WETT76bo@z> (raw)

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

             reply	other threads:[~1999-12-31 22:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-15 16:07 Greg M [this message]
1999-12-31 22:24 ` Greg M

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19991216000638.33495.qmail@hotmail.com \
    --to=greg__m__@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).