1 diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
3 diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h
4 --- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200
5 +++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:21.000000000 +0200
7 #define FBSD_STARTFILE_SPEC \
9 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
10 - %{!p:%{profile:gcrt1.o%s} \
11 - %{!profile:crt1.o%s}}}} \
12 - crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
13 + %{!p:%{profile:gcrt1.o%s} \
14 + %{!profile:crt1.o%s}}}} \
16 + %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
18 /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
19 the magical crtend.o file (see crtstuff.c) which provides part of
25 +#include <sys/param.h>
26 +#if __FreeBSD_version < 500016
27 #define FBSD_LIB_SPEC " \
35 +#elif __FreeBSD_version < 700022
36 #define FBSD_LIB_SPEC " \
38 %{!pg: %{pthread:-lpthread} -lc} \
39 %{pg: %{pthread:-lpthread_p} -lc_p} \
42 +#define FBSD_LIB_SPEC " \
44 + %{!pg: %{pthread:-lpthread} -lc} \
45 + %{pg: %{pthread:-lpthread_p} -lc_p}} \
47 + %{pthread:-lpthread} -lc} \
54 #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
56 #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
59 +#if defined(HAVE_LD_EH_FRAME_HDR)
60 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
63 +/* Use --as-needed -lgcc_s for eh support. */
64 +#ifdef HAVE_LD_AS_NEEDED
65 +#define USE_LD_AS_NEEDED 1