# DP: Fix the linker error when creating an xcc for ia64 --- gcc/config/ia64/fde-glibc.c | 3 +++ gcc/config/ia64/unwind-ia64.c | 3 ++- gcc/unwind-compat.c | 2 ++ gcc/unwind-generic.h | 2 ++ 6 files changed, 14 insertions(+), 1 deletions(-) Index: b/src/libgcc/config/ia64/fde-glibc.c =================================================================== --- a/src/libgcc/config/ia64/fde-glibc.c +++ b/src/libgcc/config/ia64/fde-glibc.c @@ -28,6 +28,7 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif +#ifndef inhibit_libc #include "config.h" #include #include @@ -159,3 +160,5 @@ return data.ret; } + +#endif Index: b/src/libgcc/config/ia64/unwind-ia64.c =================================================================== --- a/src/libgcc/config/ia64/unwind-ia64.c +++ b/src/libgcc/config/ia64/unwind-ia64.c @@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#ifndef inhibit_libc #include "tconfig.h" #include "tsystem.h" #include "coretypes.h" @@ -2467,3 +2468,4 @@ #endif #endif +#endif Index: b/src/libgcc/unwind-compat.c =================================================================== --- a/src/libgcc/unwind-compat.c +++ b/src/libgcc/unwind-compat.c @@ -24,6 +24,7 @@ . */ #if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS) +#ifndef inhibit_libc #include "tconfig.h" #include "tsystem.h" #include "unwind.h" @@ -208,3 +209,4 @@ } symver (_Unwind_SetIP, GCC_3.0); #endif +#endif Index: b/src/libgcc/unwind-generic.h =================================================================== --- a/src/libgcc/unwind-generic.h +++ b/src/libgcc/unwind-generic.h @@ -221,6 +221,7 @@ compatible with the standard ABI for IA-64, we inline these. */ #ifdef __ia64__ +#ifndef inhibit_libc #include static inline _Unwind_Ptr @@ -239,6 +240,7 @@ /* @@@ Retrieve the Backing Store Pointer of the given context. */ extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *); +#endif #else extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);