]> git.pld-linux.org Git - packages/gcc2.git/blob - gcc2-pld-linux.patch
- move compressed patch to distfiles
[packages/gcc2.git] / gcc2-pld-linux.patch
1 diff -urN gcc-2.95.3.test1.org/gcc/Makefile.in gcc-2.95.3.test1/gcc/Makefile.in
2 --- gcc-2.95.3.test1.org/gcc/Makefile.in        Wed Jan  3 20:34:29 2001
3 +++ gcc-2.95.3.test1/gcc/Makefile.in    Wed Jan  3 20:37:33 2001
4 @@ -368,6 +368,9 @@
5  # libgcc1-test target (must also be overridable for a target)
6  LIBGCC1_TEST = libgcc1-test
7  
8 +# The libgcc symbol versioning map.
9 +LIBGCC_MAP=
10 +
11  # List of extra executables that should be compiled for this target machine
12  # that are used for compiling from source code to object code.
13  # The rules for compiling them should be in the t-* file for the machine.
14 @@ -838,14 +841,14 @@
15  # Note that we can compile enquire using the cross-compiler just built,
16  # although we can't run it on this machine.
17  all.cross: native gcc-cross specs stmp-headers $(STMP_FIXPROTO) $(LIBGCC) \
18 -       $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
19 +       $(LIBGCC_MAP) $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
20  # This is what to compile if making gcc with a cross-compiler.
21  all.build: native xgcc$(exeext) cpp$(exeext) $(EXTRA_PARTS) lang.all.build
22  # This is what must be made before installing GCC and converting libraries.
23  start.encap: native xgcc$(exeext) cpp$(exeext) specs $(LIBGCC1) \
24         xlimits.h lang.start.encap
25  # These can't be made until after GCC can run.
26 -rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
27 +rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(LIBGCC_MAP) $(EXTRA_PARTS) lang.rest.encap
28  # This is what is made with the host's compiler
29  # whether making a cross compiler or not.
30  native: config.status auto-host.h intl.all $(LANGUAGES) \
31 @@ -860,7 +863,7 @@
32  
33  # On the target machine, finish building a cross compiler.
34  # This does the things that can't be done on the host machine.
35 -rest.cross: $(LIBGCC) specs
36 +rest.cross: $(LIBGCC) $(LIBGCC_MAP) specs
37  
38  # Verify that it works to compile and link libgcc1-test.
39  # If it does, then there are sufficient replacements for libgcc1.a.
40 @@ -2353,7 +2356,7 @@
41  # Using unprotoize.c is not quite right in the first place, 
42  # but what better way is there?
43         -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
44 -       -rm -f libgcc1.null
45 +       -rm -f libgcc1.null libgcc.map
46         -rm -f *.dvi
47         -rm -f */*.dvi
48         -if [ -f md.pre-cpp ]; then \
49 @@ -2526,6 +2529,12 @@
50           $(INSTALL_DATA) specs $(libsubdir)/specs; \
51           chmod a-x $(libsubdir)/specs; \
52         fi
53 +# Install libgcc.map if it exists.
54 +       -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
55 +         rm -f $(libsubdir)/libgcc.map; \
56 +         $(INSTALL_DATA) libgcc.map $(libsubdir)/libgcc.map; \
57 +         chmod a-x $(libsubdir)/libgcc.map; \
58 +       fi
59  # Install protoize if it was compiled.
60         -if [ -f protoize$(exeext) ]; \
61         then \
62 @@ -3032,7 +3041,10 @@
63          do \
64            if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
65          done
66 -       -mv $(STAGESTUFF) stage1
67 +       -for i in $(STAGESTUFF) ; \
68 +        do \
69 +          mv $$i stage1 ; \
70 +        done
71         -mv intl/*$(objext) stage1/intl
72  # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
73  # dir will work properly.
74 @@ -3041,6 +3053,10 @@
75         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
76         -rm -f stage1/libgcc.a
77         -cp libgcc.a stage1
78 +       -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
79 +         rm -f stage1/libgcc.map; \
80 +         cp libgcc.map stage1; \
81 +       fi
82         -if $(RANLIB_TEST_FOR_TARGET) ; then \
83           $(RANLIB_FOR_TARGET) stage1/libgcc.a; \
84         else true; fi
85 @@ -3056,7 +3072,10 @@
86          do \
87            if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
88          done
89 -       -mv $(STAGESTUFF) stage2
90 +       -for i in $(STAGESTUFF) ; \
91 +        do \
92 +          mv $$i stage2 ; \
93 +        done
94         -mv intl/*$(objext) stage2/intl
95  # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
96  # dir will work properly.
97 @@ -3065,6 +3084,10 @@
98         -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
99         -rm -f stage2/libgcc.a
100         -cp libgcc.a stage2
101 +       -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
102 +         rm -f stage2/libgcc.map; \
103 +         cp libgcc.map stage2; \
104 +       fi
105         -if $(RANLIB_TEST_FOR_TARGET) ; then \
106           $(RANLIB_FOR_TARGET) stage2/libgcc.a; \
107         else true; fi
108 @@ -3080,7 +3103,10 @@
109          do \
110            if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
111          done
112 -       -mv $(STAGESTUFF) stage3
113 +       -for i in $(STAGESTUFF) ; \
114 +        do \
115 +          mv $$i stage3 ; \
116 +        done
117         -mv intl/*$(objext) stage3/intl
118  # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
119  # dir will work properly.
120 @@ -3089,6 +3115,10 @@
121         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
122         -rm -f stage3/libgcc.a
123         -cp libgcc.a stage3
124 +       -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
125 +         rm -f stage3/libgcc.map; \
126 +         cp libgcc.map stage3; \
127 +       fi
128         -if $(RANLIB_TEST_FOR_TARGET) ; then \
129           $(RANLIB_FOR_TARGET) stage3/libgcc.a; \
130         else true; fi
131 @@ -3104,7 +3134,10 @@
132          do \
133            if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
134          done
135 -       -mv $(STAGESTUFF) stage4
136 +       -for i in $(STAGESTUFF) ; \
137 +        do \
138 +          mv $$i stage4 ; \
139 +        done
140         -mv intl/*$(objext) stage4/intl
141  # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
142  # dir will work properly.
143 @@ -3113,6 +3146,10 @@
144         -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
145         -rm -f stage4/libgcc.a
146         -cp libgcc.a stage4
147 +       -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
148 +         rm -f stage4/libgcc.map; \
149 +         cp libgcc.map stage4; \
150 +       fi
151         -if $(RANLIB_TEST_FOR_TARGET) ; then \
152           $(RANLIB_FOR_TARGET) stage4/libgcc.a; \
153         else true; fi
154 @@ -3196,3 +3233,9 @@
155         echo "#endif" >> t-float.h-cross
156         mv t-float.h-cross float.h-cross
157  
158 +# Rule to generate the libgcc symbol versioning map.
159 +libgcc.map:
160 +       echo "GCC.INTERNAL {" > $@
161 +       echo "  local:" >> $@
162 +       $(EXTRACT_LIBGCC) >> $@
163 +       echo "};" >> $@
164 diff -urN gcc-2.95.3.test1.org/gcc/config/i386/i386.md gcc-2.95.3.test1/gcc/config/i386/i386.md
165 --- gcc-2.95.3.test1.org/gcc/config/i386/i386.md        Wed Jan  3 20:34:36 2001
166 +++ gcc-2.95.3.test1/gcc/config/i386/i386.md    Wed Jan  3 20:35:21 2001
167 @@ -1345,7 +1345,8 @@
168    else if ((reload_in_progress | reload_completed) == 0
169            && GET_CODE (operands[0]) != MEM
170            && GET_CODE (operands[1]) == CONST_DOUBLE
171 -          && !standard_80387_constant_p (operands[1]))
172 +           && ((flag_pic && flag_omit_frame_pointer)
173 +               || ! standard_80387_constant_p (operands[1])))
174      {
175        operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
176      }
177 @@ -1473,7 +1474,8 @@
178    else if ((reload_in_progress | reload_completed) == 0
179            && GET_CODE (operands[0]) != MEM
180            && GET_CODE (operands[1]) == CONST_DOUBLE
181 -          && !standard_80387_constant_p (operands[1]))
182 +           && ((flag_pic && flag_omit_frame_pointer)
183 +              || ! standard_80387_constant_p (operands[1])))
184      {
185        operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
186      }
187 @@ -1601,7 +1603,8 @@
188    else if ((reload_in_progress | reload_completed) == 0
189            && GET_CODE (operands[0]) != MEM
190            && GET_CODE (operands[1]) == CONST_DOUBLE
191 -          && !standard_80387_constant_p (operands[1]))
192 +           && ((flag_pic && flag_omit_frame_pointer)
193 +               || ! standard_80387_constant_p (operands[1])))
194      {
195        operands[1] = validize_mem (force_const_mem (XFmode, operands[1]));
196      }
197 diff -urN gcc-2.95.3.test1.org/gcc/config/linux.h gcc-2.95.3.test1/gcc/config/linux.h
198 --- gcc-2.95.3.test1.org/gcc/config/linux.h     Wed Jan  3 20:34:33 2001
199 +++ gcc-2.95.3.test1/gcc/config/linux.h Wed Jan  3 20:35:22 2001
200 @@ -103,7 +103,7 @@
201       %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
202  #else
203  #define LIB_SPEC \
204 -  "%{shared: -lc} \
205 +  "%{shared: -lc --version-script libgcc.map%s} \
206     %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
207         %{profile:-lc_p} %{!profile: -lc}}"
208  #endif
209 diff -urN gcc-2.95.3.test1.org/gcc/config/t-linux gcc-2.95.3.test1/gcc/config/t-linux
210 --- gcc-2.95.3.test1.org/gcc/config/t-linux     Wed Jan  3 20:34:33 2001
211 +++ gcc-2.95.3.test1/gcc/config/t-linux Wed Jan  3 20:35:22 2001
212 @@ -14,3 +14,17 @@
213  LIBGCC1 = 
214  CROSS_LIBGCC1 =
215  LIBGCC1_TEST =
216 +
217 +# Make glocal functions in libgcc.a local to the shared library with
218 +# symbol versioning.
219 +LIBGCC_MAP=libgcc.map
220 +# This list has to be maintained manually. It should cover the libgcc
221 +# functions, which can be safely made local to a shared library, on
222 +# all Linux platforms.
223 +LIBGCC_MAP_LIST=__ashldi3 __ashrdi3 __builtin_saveregs __clear_cache \
224 +  __cmpdi2 __divdi3 __dummy __eprintf __ffsdi2 __fixdfdi __fixsfdi \
225 +  __fixunsdfdi __fixunsdfsi __fixunssfdi __fixunssfsi __fixunsxfdi \
226 +  __fixunsxfsi __fixxfdi __floatdidf __floatdisf __floatdixf \
227 +  __gcc_bcmp __lshrdi3 __moddi3 __muldi3 __negdi2 __pure_virtual \
228 +  __ucmpdi2 __udiv_w_sdiv __udivdi3 __udivmoddi4 __umoddi3
229 +EXTRACT_LIBGCC=for s in $(LIBGCC_MAP_LIST); do echo "    $$s;"; done
230 diff -urN gcc-2.95.3.test1.org/gcc/f/Make-lang.in gcc-2.95.3.test1/gcc/f/Make-lang.in
231 --- gcc-2.95.3.test1.org/gcc/f/Make-lang.in     Wed Jan  3 20:34:42 2001
232 +++ gcc-2.95.3.test1/gcc/f/Make-lang.in Wed Jan  3 20:35:22 2001
233 @@ -212,7 +212,7 @@
234  
235  f77.all.build: g77$(exeext)
236  f77.all.cross: g77-cross$(exeext)
237 -f77.start.encap: g77$(exeext)
238 +f77.start.encap: g77$(exeext)  $(srcdir)/f/intdoc.texi
239  f77.rest.encap:
240  
241  f77.info: f/g77.info
242 diff -urN gcc-2.95.3.test1.org/libf2c/Makefile.in gcc-2.95.3.test1/libf2c/Makefile.in
243 --- gcc-2.95.3.test1.org/libf2c/Makefile.in     Wed Jan  3 20:34:47 2001
244 +++ gcc-2.95.3.test1/libf2c/Makefile.in Wed Jan  3 20:35:22 2001
245 @@ -61,18 +61,18 @@
246  # Quote this way so that it can be used to set shell variables too.
247  # Currently no use for PICFLAG, RUNTESTFLAGS -- check usage.
248  FLAGS_TO_PASS= \
249 -       CC='$(CC)' \
250 -       CFLAGS='$(CFLAGS)' \
251 -       CPPFLAGS='$(CPPFLAGS)' \
252 -       AR='$(AR)' \
253 -       RANLIB='$(RANLIB)' \
254 -       PICFLAG='$(PICFLAG)' \
255 -       RUNTESTFLAGS='$(RUNTESTFLAGS)' \
256 -       prefix='$(prefix)' \
257 -       exec_prefix='$(exec_prefix)' \
258 -       libdir='$(libdir)' \
259 -       libsubdir='$(libsubdir)' \
260 -       tooldir='$(tooldir)'
261 +       "CC=$(CC)" \
262 +       "CFLAGS=$(CFLAGS)" \
263 +       "CPPFLAGS=$(CPPFLAGS)" \
264 +       "AR=$(AR)" \
265 +       "RANLIB=$(RANLIB)" \
266 +       "PICFLAG=$(PICFLAG)" \
267 +       "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
268 +       "prefix=$(prefix)" \
269 +       "exec_prefix=$(exec_prefix)" \
270 +       "libdir=$(libdir)" \
271 +       "libsubdir=$(libsubdir)" \
272 +       "tooldir=$(tooldir)"
273  
274  LIBG2C = libg2c.a
275  
This page took 0.162236 seconds and 3 git commands to generate.