public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58710] New: HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4
@ 2013-10-13  4:55 misty at brew dot sh
  2013-10-13  7:39 ` [Bug libgcc/58710] " misty at brew dot sh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: misty at brew dot sh @ 2013-10-13  4:55 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-07 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-13  4:55 [Bug libstdc++/58710] New: HAVE_GETIPINFO is incorrectly set on Mac OS X 10.4 misty at brew dot sh
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

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).