On May 30, 2011, at 8:43 AM, Rainer Orth wrote: > * The three users of MD_UNWIND_SUPPORT are modified to unconditionally > include a new md-unwind-support.h header which is created from the > info in config.host: if md_unwind_header exists, it is included in > md-unwind-support.h, otherwise the generated header is empty.
> diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h > --- a/gcc/config/rs6000/darwin.h > +++ b/gcc/config/rs6000/darwin.h > @@ -381,10 +381,6 @@ extern int darwin_emit_branch_islands; > #include <stdbool.h> > #endif > > -#if !defined(__LP64__) && !defined(DARWIN_LIBSYSTEM_HAS_UNWIND) > -#define MD_UNWIND_SUPPORT "config/rs6000/darwin-unwind.h" > -#endif > - So, I'm wondering, can we just roll this check into the header, so instead of: #if A #include file #endif file: bla we have: #include file file: #if A bla #endif The advantages, any wrapping code is handled the exact same way. Once this is done, then the transformation to port is identical to every other port. Also, this general rule would apply to the other corner cases as well, if I read them right. ? Oh, once this is done, I think: /* libSystem contains unwind information for signal frames. */ #define DARWIN_LIBSYSTEM_HAS_UNWIND is only used by libgcc. Does it have to move at the same time? If so, then it needs moving. If it doesn't have to move, you can leave it behind if you want, though my preference would be to move it. I think the darwin bits are Ok with this change.