| Submitter | Gerald Pfeifer |
|---|---|
| Date | Sept. 12, 2010, 12:27 a.m. |
| Message ID | <alpine.LNX.2.00.1009110309030.17560@acrux.dbai.tuwien.ac.at> |
| Download | mbox | patch |
| Permalink | /patch/64532/ |
| State | New |
| Headers | show |
Comments
On 09/11/2010 05:27 PM, Gerald Pfeifer wrote: > PR target/45650 > * config/ia64/unwind-ia64.h: Do not mark _Unwind_FindTableEntry > hidden on FreeBSD. Does FreeBSD have the rest of the unwinder in libc too? I'm a bit dubious of using parts of a libc unwinder but not the rest of it. r~
On Wed, 15 Sep 2010, Richard Henderson wrote: >> PR target/45650 >> * config/ia64/unwind-ia64.h: Do not mark _Unwind_FindTableEntry >> hidden on FreeBSD. > Does FreeBSD have the rest of the unwinder in libc too? I'm a bit > dubious of using parts of a libc unwinder but not the rest of it. Fair enough. I have to admit that libgcc and config/ia64 are worthwhile opponents for me -- how would I best go about it to completely rely on libc? Copying t-ia64 to t-freebsd, setting LIB2ADDEH to the empty string there, and ia64*-*-freebsd*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" - tmake_file="ia64/t-ia64" + tmake_file="ia64/t-freebsd" in libgcc/config.host didn't do the trick: "gmake[3]: *** No rule to make target `crtfastmath.o', needed by `libgcc-extra-parts'." What am I missing? If any of you can offer a quick draft patch, I'd be happy to test and refine. Gerald
On 09/22/2010 05:13 PM, Gerald Pfeifer wrote: > Copying t-ia64 to t-freebsd, setting LIB2ADDEH to the empty string there, > and > > ia64*-*-freebsd*) > extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" > - tmake_file="ia64/t-ia64" > + tmake_file="ia64/t-freebsd" Better, I think, to move LIB2ADDEH to ia64/t-unwind and add that to the other ia64 targets. > in libgcc/config.host didn't do the trick: "gmake[3]: *** No rule to make > target `crtfastmath.o', needed by `libgcc-extra-parts'." What am I missing? Er, nothing that I can see. That file is controled by extra_parts in config.gcc and not a t-file at all. r~
Patch
Index: config/ia64/unwind-ia64.h =================================================================== --- config/ia64/unwind-ia64.h (revision 164202) +++ config/ia64/unwind-ia64.h (working copy) @@ -40,4 +40,7 @@ extern struct unw_table_entry * _Unwind_FindTableEntry (void *pc, unsigned long *segment_base, unsigned long *gp, struct unw_table_entry *ent) - __attribute__ ((__visibility__ ("hidden"))); +#ifndef __FreeBSD__ + __attribute__ ((__visibility__ ("hidden"))) +#endif + ;
So, it turns out that bug #40959 actually is only one of two regressions that breaks bootstrap on FreeBSD/ia64. This is about the second case. Since 2004-11-09 H.J. Lu <hongjiu.lu@intel.com> PR target/18380 * config/ia64/unwind-ia64.h (_Unwind_FindTableEntry): Mark it hidden. * unwind-dw2.c (_Unwind_FindTableEntry): Removed. _Unwind_FindTableEntry has been marked hidden which is okay for those cases where GCC defines the function but breaks FreeBSD which has this in libc. The patch below fixes this, but I'm not sure an #ifndef like this is acceptable? If not, how can we fix this? Gerald 2010-09-12 Gerald Pfeifer <gerald@pfeifer.com> PR target/45650 * config/ia64/unwind-ia64.h: Do not mark _Unwind_FindTableEntry hidden on FreeBSD.