Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 192403 | Differences between
and this patch

Collapse All | Expand All

(-)a/gcc/config/freebsd-spec.h (-26 / +48 lines)
Lines 64-97 Link Here
64
/* Define the default FreeBSD-specific per-CPU hook code.  */
64
/* Define the default FreeBSD-specific per-CPU hook code.  */
65
#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0)
65
#define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0)
66
66
67
/* Provide a CPP_SPEC appropriate for FreeBSD.  We just deal with the GCC 
67
/* Provide a CPP_SPEC appropriate for FreeBSD.  We just deal with the GCC
68
   option `-posix', and PIC issues.  */
68
   option `-posix', and PIC issues.  Try to detect support for the
69
   `long long' type.  Unfortunately the GCC spec parser will not allow us
70
   to properly detect the "iso9899:1990" and "iso9899:199409" forms of
71
   -std=c89.  Because of the ':' in the -std argument. :-(  I have left
72
   them in the spec as a place holder in hopes someone knows a way to make
73
   the detection of them work.  */
69
74
70
#define FBSD_CPP_SPEC "							\
75
#define FBSD_CPP_SPEC "							\
71
  %(cpp_cpu)								\
76
  %(cpp_cpu)								\
72
  %(cpp_arch)								\
77
  %(cpp_arch)								\
78
  %{!ansi:%{!std=c89:%{!std=iso9899.1990:%{!std=iso9899.199409:-D_LONGLONG}}}} \
73
  %{posix:-D_POSIX_SOURCE}"
79
  %{posix:-D_POSIX_SOURCE}"
74
80
75
/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add
81
/* Provide a STARTFILE_SPEC appropriate for FreeBSD.  Here we add the magical
76
   the magical crtbegin.o file (see crtstuff.c) which provides part 
82
   crtbegin.o file (see crtstuff.c) which provides part of the support for
77
	of the support for getting C++ file-scope static object constructed 
83
   getting C++ file-scope static object constructed before entering `main'.  */
78
	before entering `main'.  */
84
79
   
85
#define FBSD_STARTFILE_SPEC "\
80
#define FBSD_STARTFILE_SPEC \
86
  %{!shared: \
81
  "%{!shared: \
87
    %{pg:gcrt1.o%s} \
82
     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
88
    %{!pg: \
83
		       %{!p:%{profile:gcrt1.o%s} \
89
      %{p:gcrt1.o%s} \
84
			 %{!profile:crt1.o%s}}}} \
90
      %{!p: \
85
   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
91
	%{profile:gcrt1.o%s} \
86
92
	%{!profile:crt1.o%s}}}} \
87
/* Provide a ENDFILE_SPEC appropriate for FreeBSD.  Here we tack on
93
  crti.o%s \
88
   the magical crtend.o file (see crtstuff.c) which provides part of 
94
  %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
89
	the support for getting C++ file-scope static object constructed 
95
90
	before entering `main', followed by a normal "finalizer" file, 
96
/* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386.  Here we tack on
91
	`crtn.o'.  */
97
   our own magical crtend.o file (see crtstuff.c) which provides part of
92
98
   the support for getting C++ file-scope static object constructed before
93
#define FBSD_ENDFILE_SPEC \
99
   entering `main', followed by the normal "finalizer" file, `crtn.o'.  */
94
  "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
100
101
#define FBSD_ENDFILE_SPEC "\
102
  %{!shared:crtend.o%s} \
103
  %{shared:crtendS.o%s} \
104
  crtn.o%s "
95
105
96
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as
106
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as
97
   required by the user-land thread model.  Before __FreeBSD_version
107
   required by the user-land thread model.  Before __FreeBSD_version
Lines 120-126 Link Here
120
    %{pg:  -lc_p}							\
130
    %{pg:  -lc_p}							\
121
  }"
131
  }"
122
#else
132
#else
123
#if FBSD_MAJOR < 5
133
#include <sys/param.h>
134
#if __FreeBSD_version < 500016
124
#define FBSD_LIB_SPEC "							\
135
#define FBSD_LIB_SPEC "							\
125
  %{!shared:								\
136
  %{!shared:								\
126
    %{!pg:								\
137
    %{!pg:								\
Lines 134-146 Link Here
134
#define FBSD_LIB_SPEC "							\
145
#define FBSD_LIB_SPEC "							\
135
  %{!shared:								\
146
  %{!shared:								\
136
    %{!pg: %{pthread:-lpthread} -lc}					\
147
    %{!pg: %{pthread:-lpthread} -lc}					\
137
    %{pg:  %{pthread:-lpthread_p} -lc_p}				\
148
    %{pg:  %{pthread:-lpthread_p} -lc_p}}				\
138
  }"
149
  %{shared:								\
150
    %{pthread:-lpthread} -lc}						\
151
  "
139
#endif
152
#endif
140
#endif
153
#endif
141
154
142
#if FBSD_MAJOR < 6
155
#if FBSD_MAJOR < 5
143
#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
156
#define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
144
#else
157
#else
145
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
158
#define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
146
#endif
159
#endif
160
161
#if defined(HAVE_LD_EH_FRAME_HDR)
162
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
163
#endif
164
165
/* Use --as-needed -lgcc_s for eh support.  */
166
#ifdef HAVE_LD_AS_NEEDED
167
#define USE_LD_AS_NEEDED 1
168
#endif
(-)a/gcc/config/freebsd.h (-3 / +8 lines)
Lines 76-87 Link Here
76
76
77
/* Code generation parameters.  */
77
/* Code generation parameters.  */
78
78
79
/* Writing `int' for a bitfield forces int alignment for the structure.  */
80
/* XXX: ok for Alpha??  */
81
#undef  PCC_BITFIELD_TYPE_MATTERS
82
#define PCC_BITFIELD_TYPE_MATTERS 1
83
79
/* Use periods rather than dollar signs in special g++ assembler names.
84
/* Use periods rather than dollar signs in special g++ assembler names.
80
   This ensures the configuration knows our system correctly so we can link
85
   This ensures the configuration knows our system correctly so we can link
81
   with libraries compiled with the native cc.  */
86
   with libraries compiled with the native cc.  */
82
#undef NO_DOLLAR_IN_LABEL
87
#undef NO_DOLLAR_IN_LABEL
83
88
84
/* Used by libgcc2.c.  We support file locking with fcntl / F_SETLKW.
89
/* Define this so we can compile MS code for use with WINE.  */
85
   This enables the test coverage code to use file locking when exiting a
90
#define HANDLE_PRAGMA_PACK_PUSH_POP
86
   program, which avoids race conditions if the program has forked.  */
91
87
#define TARGET_POSIX_IO
92
#define TARGET_POSIX_IO

Return to bug 192403