1.1 --- a/patches/gcc/4.4.4/290-freebsd.patch Sun May 16 19:41:53 2010 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,66 +0,0 @@
1.4 -diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
1.5 -
1.6 -diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h
1.7 ---- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200
1.8 -+++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:21.000000000 +0200
1.9 -@@ -86,9 +86,10 @@
1.10 - #define FBSD_STARTFILE_SPEC \
1.11 - "%{!shared: \
1.12 - %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
1.13 -- %{!p:%{profile:gcrt1.o%s} \
1.14 -- %{!profile:crt1.o%s}}}} \
1.15 -- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
1.16 -+ %{!p:%{profile:gcrt1.o%s} \
1.17 -+ %{!profile:crt1.o%s}}}} \
1.18 -+ crti.o%s \
1.19 -+ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
1.20 -
1.21 - /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
1.22 - the magical crtend.o file (see crtstuff.c) which provides part of
1.23 -@@ -126,7 +127,8 @@
1.24 - %{pg: -lc_p} \
1.25 - }"
1.26 - #else
1.27 --#if FBSD_MAJOR < 5
1.28 -+#include <sys/param.h>
1.29 -+#if __FreeBSD_version < 500016
1.30 - #define FBSD_LIB_SPEC " \
1.31 - %{!shared: \
1.32 - %{!pg: \
1.33 -@@ -136,17 +138,34 @@
1.34 - %{!pthread:-lc_p} \
1.35 - %{pthread:-lc_r_p}} \
1.36 - }"
1.37 --#else
1.38 -+#elif __FreeBSD_version < 700022
1.39 - #define FBSD_LIB_SPEC " \
1.40 - %{!shared: \
1.41 - %{!pg: %{pthread:-lpthread} -lc} \
1.42 - %{pg: %{pthread:-lpthread_p} -lc_p} \
1.43 - }"
1.44 -+#else
1.45 -+#define FBSD_LIB_SPEC " \
1.46 -+ %{!shared: \
1.47 -+ %{!pg: %{pthread:-lpthread} -lc} \
1.48 -+ %{pg: %{pthread:-lpthread_p} -lc_p}} \
1.49 -+ %{shared: \
1.50 -+ %{pthread:-lpthread} -lc} \
1.51 -+ "
1.52 - #endif
1.53 - #endif
1.54 -
1.55 --#if FBSD_MAJOR < 6
1.56 -+#if FBSD_MAJOR < 5
1.57 - #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
1.58 - #else
1.59 - #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
1.60 - #endif
1.61 -+
1.62 -+#if defined(HAVE_LD_EH_FRAME_HDR)
1.63 -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
1.64 -+#endif
1.65 -+
1.66 -+/* Use --as-needed -lgcc_s for eh support. */
1.67 -+#ifdef HAVE_LD_AS_NEEDED
1.68 -+#define USE_LD_AS_NEEDED 1
1.69 -+#endif