public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "misty at brew dot sh" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/58710] New: HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4
Date: Sun, 13 Oct 2013 04:55:00 -0000	[thread overview]
Message-ID: <bug-58710-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58710

            Bug ID: 58710
           Summary: HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: misty at brew dot sh

_Unwind_GetIPInfo isn't available on Mac OS X 10.4 and older. GCC checks for
this specific case in several places to ensure it isn't used inappropriately,
but there seem to be a few issues that cause it to be used anyway. See #56811
for an example of this.

When checking for whether to use the system unwind, configure scripts
specifically check for Darwin 8 and older (see, for example, libbacktrace's
configure at L11629-11648); when Darwin 8 is encountered it explicitly sets
have_unwind_getipinfo to 0 to ensure it won't be used. However, the same
configure script also later does an independent check to see if
_Unwind_GetIPInfo is available, and this is erroneously reporting that it's
available. As a result several libraries, like libbacktrace, try to use
_UnwindGetIPInfo and the build fails at the link stage.

When I took a look at the config.log, it seems it's compiling using `-c`, so
the linker is inhibited:

configure:11652: checking for _Unwind_GetIPInfo
configure:11667: /usr/local/bin/gcc-4.4 -c -g
-Werror-implicit-function-declaration  conftest.c >&5
configure:11667: $? = 0
configure:11674: result: yes

However, the specific problem on OS X 10.4 is that _Unwind_GetIPInfo isn't
exported - and so the test would only fail if the linker was invoked.

I've noticed that a few sections of GCC, such as raise-gcc.c, appear to expect
that they'll get an incorrect configure value and redefine it themselves:

#ifdef __APPLE__
/* On MacOS X, versions older than 10.5 don't export _Unwind_GetIPInfo.  */
#undef HAVE_GETIPINFO
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
#define HAVE_GETIPINFO 1
#endif
#endif

However, this isn't done consistently, which is why other places (like
_Unwind_GetIPInfo) still try to use it.


             reply	other threads:[~2013-10-13  4:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-13  4:55 misty at brew dot sh [this message]
2013-10-13  7:39 ` [Bug libgcc/58710] " misty at brew dot sh
2014-02-07 17:26 ` misty at brew dot sh
2014-02-07 21:11 ` ian at gcc dot gnu.org
2014-02-07 21:11 ` ian at gcc dot gnu.org

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=bug-58710-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).