/usr/src/gcc-5/debian/patches/kfreebsd-unwind.diff is in gcc-5-source 5.5.0-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # 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
@@ -607,7 +607,13 @@ 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"
+ tm_file="${tm_file} i386/elf-lib.h"
+ 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"
@@ -618,7 +624,13 @@ 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"
+ tm_file="${tm_file} i386/elf-lib.h"
+ 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"
Index: b/src/libgcc/config/i386/freebsd-unwind.h
===================================================================
--- a/src/libgcc/config/i386/freebsd-unwind.h
+++ b/src/libgcc/config/i386/freebsd-unwind.h
@@ -26,6 +26,8 @@ see the files COPYING3 and COPYING.RUNTI
/* 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 <sys/types.h>
#include <signal.h>
#include <sys/ucontext.h>
@@ -171,3 +173,5 @@ x86_freebsd_fallback_frame_state
return _URC_NO_REASON;
}
#endif /* ifdef __x86_64__ */
+
+#endif /* ifndef inhibit_libc */
|