This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/78064] unwind-c.c never uses _Unwind_GetIPInfo
- From: "wilson at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Oct 2016 04:03:42 +0000
- Subject: [Bug libgcc/78064] unwind-c.c never uses _Unwind_GetIPInfo
- Auto-submitted: auto-generated
- References: <bug-78064-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78064
Jim Wilson <wilson at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wilson at gcc dot gnu.org
--- Comment #1 from Jim Wilson <wilson at gcc dot gnu.org> ---
I tracked the problem down to bug 27880 comment 31.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27880#c31
The patch is arguably correct, but it changes config.in from
#undef HAVE_GETIPINFO
to
#ifndef USED_FOR_TARGET
#undef HAVE_GETIPINFO #undef HAVE_GETIPINFO
#endif
config.in is used to generate auto-host.h, which is included by unwind-c.c.
But the new ifndef prevents HAVE_GETIPINFO from being defined in unwind-c.c, as
USED_FOR_TARGET is defined in tconfig.h before auto-host.h is included.
Now that we have an auto-target.h file in libgcc, we can fix the problem by
including that.
This was OK in gcc-4.3, and broken in gcc-4.4 and later. The libgcc
auto-target.h file appeared in gcc-4.8. So fixing gcc-4.4 to gcc-4.7 looks a
bit complicated, but anything gcc-4.8 and later looks easy to fix. We of
course only care about gcc 5 and later at this point.