1 diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h
2 --- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200
3 +++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:21.000000000 +0200
5 #define FBSD_STARTFILE_SPEC \
7 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
8 - %{!p:%{profile:gcrt1.o%s} \
9 - %{!profile:crt1.o%s}}}} \
10 - crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
11 + %{!p:%{profile:gcrt1.o%s} \
12 + %{!profile:crt1.o%s}}}} \
14 + %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
16 /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
17 the magical crtend.o file (see crtstuff.c) which provides part of
23 +#include <sys/param.h>
24 +#if __FreeBSD_version < 500016
25 #define FBSD_LIB_SPEC " \
33 +#elif __FreeBSD_version < 700022
34 #define FBSD_LIB_SPEC " \
36 %{!pg: %{pthread:-lpthread} -lc} \
37 %{pg: %{pthread:-lpthread_p} -lc_p} \
40 +#define FBSD_LIB_SPEC " \
42 + %{!pg: %{pthread:-lpthread} -lc} \
43 + %{pg: %{pthread:-lpthread_p} -lc_p}} \
45 + %{pthread:-lpthread} -lc} \
52 #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
54 #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
57 +#if defined(HAVE_LD_EH_FRAME_HDR)
58 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
61 +/* Use --as-needed -lgcc_s for eh support. */
62 +#ifdef HAVE_LD_AS_NEEDED
63 +#define USE_LD_AS_NEEDED 1