Message ID | 20100831000613.GA28890@intel.com |
---|---|
State | New |
Headers | show |
On Mon, Aug 30, 2010 at 5:06 PM, H.J. Lu <hongjiu.lu@intel.com> wrote: > Hi, > > x86_fallback_frame_state only works with glibc newer than glibc 2.0. > > !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) > > is true when __GLIBC__ isn't defined. This patch checks __GLIBC__. OK > for trunk? I am checking it in as an obvious fix. H.J. --- > Thanks. > > > H.J. > --- > 2010-08-30 H.J. Lu <hongjiu.lu@intel.com> > > * config/i386/linux-unwind.h (x86_fallback_frame_state): Properly > check glibc. > > diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h > index 36ee370..415f7a3 100644 > --- a/gcc/config/i386/linux-unwind.h > +++ b/gcc/config/i386/linux-unwind.h > @@ -106,7 +106,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, > signal-turned-exceptions for them. There's also no configure-run for > the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the > target libc version macro should be enough. */ > -#if !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) > +#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) > > #include <signal.h> > #include <sys/ucontext.h> >
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h index 36ee370..415f7a3 100644 --- a/gcc/config/i386/linux-unwind.h +++ b/gcc/config/i386/linux-unwind.h @@ -106,7 +106,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context, signal-turned-exceptions for them. There's also no configure-run for the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the target libc version macro should be enough. */ -#if !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) +#if defined __GLIBC__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) #include <signal.h> #include <sys/ucontext.h>