patches/gcc/4.4.4/290-freebsd.patch
author Arnaud Lacombe <lacombar@gmail.com>
Thu Aug 05 17:59:51 2010 +0200 (2010-08-05)
changeset 2069 366bd2b22675
child 2148 ada9128c98b8
permissions -rw-r--r--
complibs/mpc: fix MPC 0.8.1 build with MPFR 3.0.0

This is the change introduced by revision 734 of MPC repository.

Author: Paul Zimmermann <Paul.Zimmermann@loria.fr>
Revision log: [acos.c] fixed problem with GMP_RNDA (should be MPFR_RNDA, and code was wrong)

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
     1 diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
     2 
     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
     6 @@ -86,9 +86,10 @@
     7  #define FBSD_STARTFILE_SPEC \
     8    "%{!shared: \
     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}}}} \
    15 +   crti.o%s \
    16 +   %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
    17  
    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 
    20 @@ -126,7 +127,8 @@
    21      %{pg:  -lc_p}							\
    22    }"
    23  #else
    24 -#if FBSD_MAJOR < 5
    25 +#include <sys/param.h>
    26 +#if __FreeBSD_version < 500016
    27  #define FBSD_LIB_SPEC "							\
    28    %{!shared:								\
    29      %{!pg:								\
    30 @@ -136,17 +138,34 @@
    31        %{!pthread:-lc_p}							\
    32        %{pthread:-lc_r_p}}						\
    33    }"
    34 -#else
    35 +#elif __FreeBSD_version < 700022
    36  #define FBSD_LIB_SPEC "							\
    37    %{!shared:								\
    38      %{!pg: %{pthread:-lpthread} -lc}					\
    39      %{pg:  %{pthread:-lpthread_p} -lc_p}				\
    40    }"
    41 +#else
    42 +#define FBSD_LIB_SPEC "							\
    43 +  %{!shared:								\
    44 +    %{!pg: %{pthread:-lpthread} -lc}					\
    45 +    %{pg:  %{pthread:-lpthread_p} -lc_p}}				\
    46 +  %{shared:								\
    47 +    %{pthread:-lpthread} -lc}						\
    48 +  "
    49  #endif
    50  #endif
    51  
    52 -#if FBSD_MAJOR < 6
    53 +#if FBSD_MAJOR < 5
    54  #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
    55  #else
    56  #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
    57  #endif
    58 +
    59 +#if defined(HAVE_LD_EH_FRAME_HDR)
    60 +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
    61 +#endif
    62 +
    63 +/* Use --as-needed -lgcc_s for eh support.  */
    64 +#ifdef HAVE_LD_AS_NEEDED
    65 +#define USE_LD_AS_NEEDED 1
    66 +#endif