[PATCH] Missing inhibit_libc check on SH

Andrew Stubbs ams@codesourcery.com
Wed Feb 4 15:22:00 GMT 2009


This patch fixes a build failure when inhibit_libc is set.

Without the patch the build fails with this error:

> ../gcc/unwind-dw2-fde.c: In function 'fde_unencoded_compare':
> ../gcc/unwind-dw2-fde.c:326: warning: dereferencing type-punned pointer will break strict-aliasing rules
> ../gcc/unwind-dw2-fde.c:327: warning: dereferencing type-punned pointer will break strict-aliasing rules
> libgcc/../gcc/unwind-dw2.c:338:
> ../gcc/config/sh/linux-unwind.h:32:20: error: signal.h: No such file or directory
> ../gcc/config/sh/linux-unwind.h:33:26: error: sys/ucontext.h: No such file or directory
> libgcc/../gcc/unwind-dw2.c:338:
> ../gcc/config/sh/linux-unwind.h: In function 'sh_fallback_frame_state':
> ../gcc/config/sh/linux-unwind.h:182: error: field 'info' has incomplete type
> ../gcc/config/sh/linux-unwind.h:183: error: field 'uc' has incomplete type
> ../gcc/config/sh/linux-unwind.h:193: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:202: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:207: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:210: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:213: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:216: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:219: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:227: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:235: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:240: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:243: error: dereferencing pointer to incomplete type
> ../gcc/config/sh/linux-unwind.h:248: error: dereferencing pointer to incomplete type
> ../gcc/unwind-dw2-fde.c: In function 'add_fdes':
> ../gcc/unwind-dw2-fde.c:682: warning: dereferencing type-punned pointer will break strict-aliasing rules
> ../gcc/unwind-dw2-fde.c: In function 'linear_search_fdes':
> ../gcc/unwind-dw2-fde.c:800: warning: dereferencing type-punned pointer will break strict-aliasing rules
> ../gcc/unwind-dw2-fde.c: In function 'binary_search_unencoded_fdes':
> ../gcc/unwind-dw2-fde.c:848: warning: dereferencing type-punned pointer will break strict-aliasing rules

OK?

Andrew



More information about the Gcc-patches mailing list