# DP: DWARF2 EH unwinding support for AMD x86-64 and x86 KFreeBSD. Index: b/src/libgcc/config.host =================================================================== --- a/src/libgcc/config.host +++ b/src/libgcc/config.host @@ -590,7 +590,12 @@ i[34567]86-*-linux*) tm_file="${tm_file} i386/elf-lib.h" md_unwind_header=i386/linux-unwind.h ;; -i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) +i[34567]86-*-kfreebsd*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" + tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules" + md_unwind_header=i386/freebsd-unwind.h + ;; +i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules" tm_file="${tm_file} i386/elf-lib.h" @@ -601,7 +606,12 @@ x86_64-*-linux*) tm_file="${tm_file} i386/elf-lib.h" md_unwind_header=i386/linux-unwind.h ;; -x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) +x86_64-*-kfreebsd*-gnu) + extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" + tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules" + md_unwind_header=i386/freebsd-unwind.h + ;; +x86_64-*-knetbsd*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm i386/t-crtstuff t-dfprules" tm_file="${tm_file} i386/elf-lib.h" --- a/src/libgcc/config/i386/freebsd-unwind.h +++ a/src/libgcc/config/i386/freebsd-unwind.h @@ -26,6 +26,8 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc + #include #include #include @@ -171,3 +171,5 @@ return _URC_NO_REASON; } #endif /* ifdef __x86_64__ */ + +#endif /* ifndef inhibit_libc */