]> git.pld-linux.org Git - packages/gcc.git/blame - gcc-pld-linux.patch
- release 6
[packages/gcc.git] / gcc-pld-linux.patch
CommitLineData
7fbc4083
JR
1diff -urN gcc-2.95.1.orig/gcc/Makefile.in gcc-2.95.1/gcc/Makefile.in
2--- gcc-2.95.1.orig/gcc/Makefile.in Fri Aug 13 09:46:55 1999
3+++ gcc-2.95.1/gcc/Makefile.in Thu Aug 19 13:25:21 1999
0fd6bde2
JR
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,15 @@
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) xcpp$(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) xcpp$(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) \
28+ $(EXTRA_PARTS) lang.rest.encap
29 # This is what is made with the host's compiler
30 # whether making a cross compiler or not.
31 native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
32@@ -860,7 +864,7 @@
33
34 # On the target machine, finish building a cross compiler.
35 # This does the things that can't be done on the host machine.
36-rest.cross: $(LIBGCC) specs
37+rest.cross: $(LIBGCC) $(LIBGCC_MAP) specs
38
39 # Verify that it works to compile and link libgcc1-test.
40 # If it does, then there are sufficient replacements for libgcc1.a.
41@@ -2353,7 +2357,7 @@
42 # Using unprotoize.c is not quite right in the first place,
43 # but what better way is there?
44 -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
45- -rm -f libgcc1.null
46+ -rm -f libgcc1.null libgcc.map
47 -rm -f *.dvi
48 -rm -f */*.dvi
49 -if [ -f md.pre-cpp ]; then \
50@@ -2526,6 +2530,12 @@
51 $(INSTALL_DATA) specs $(libsubdir)/specs; \
52 chmod a-x $(libsubdir)/specs; \
53 fi
54+# Install libgcc.map if it exists.
55+ -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
56+ rm -f $(libsubdir)/libgcc.map; \
57+ $(INSTALL_DATA) libgcc.map $(libsubdir)/libgcc.map; \
58+ chmod a-x $(libsubdir)/libgcc.map; \
59+ fi
60 # Install protoize if it was compiled.
61 -if [ -f protoize$(exeext) ]; \
62 then \
63@@ -3041,6 +3051,10 @@
64 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
65 -rm -f stage1/libgcc.a
66 -cp libgcc.a stage1
67+ -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
68+ rm -f stage1/libgcc.map; \
69+ cp libgcc.map stage1; \
70+ fi
71 -if $(RANLIB_TEST_FOR_TARGET) ; then \
72 $(RANLIB_FOR_TARGET) stage1/libgcc.a; \
73 else true; fi
74@@ -3065,6 +3079,10 @@
75 -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
76 -rm -f stage2/libgcc.a
77 -cp libgcc.a stage2
78+ -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
79+ rm -f stage2/libgcc.map; \
80+ cp libgcc.map stage2; \
81+ fi
82 -if $(RANLIB_TEST_FOR_TARGET) ; then \
83 $(RANLIB_FOR_TARGET) stage2/libgcc.a; \
84 else true; fi
85@@ -3089,6 +3107,10 @@
86 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
87 -rm -f stage3/libgcc.a
88 -cp libgcc.a stage3
89+ -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
90+ rm -f stage3/libgcc.map; \
91+ cp libgcc.map stage3; \
92+ fi
93 -if $(RANLIB_TEST_FOR_TARGET) ; then \
94 $(RANLIB_FOR_TARGET) stage3/libgcc.a; \
95 else true; fi
96@@ -3113,6 +3135,10 @@
97 -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
98 -rm -f stage4/libgcc.a
99 -cp libgcc.a stage4
100+ -if [ -n "$(LIBGCC_MAP)" -a -f libgcc.map ] ; then \
101+ rm -f stage4/libgcc.map; \
102+ cp libgcc.map stage4; \
103+ fi
104 -if $(RANLIB_TEST_FOR_TARGET) ; then \
105 $(RANLIB_FOR_TARGET) stage4/libgcc.a; \
106 else true; fi
107@@ -3196,3 +3222,9 @@
108 echo "#endif" >> t-float.h-cross
109 mv t-float.h-cross float.h-cross
110
111+# Rule to generate the libgcc symbol versioning map.
112+libgcc.map:
113+ echo "GCC.INTERNAL {" > $@
114+ echo " local:" >> $@
115+ $(EXTRACT_LIBGCC) >> $@
116+ echo "};" >> $@
7fbc4083
JR
117diff -urN gcc-2.95.1.orig/gcc/config/i386/i386.md gcc-2.95.1/gcc/config/i386/i386.md
118--- gcc-2.95.1.orig/gcc/config/i386/i386.md Sun Apr 25 13:43:46 1999
119+++ gcc-2.95.1/gcc/config/i386/i386.md Thu Aug 19 13:25:21 1999
120@@ -1345,7 +1345,8 @@
121 else if ((reload_in_progress | reload_completed) == 0
122 && GET_CODE (operands[0]) != MEM
123 && GET_CODE (operands[1]) == CONST_DOUBLE
124- && !standard_80387_constant_p (operands[1]))
125+ && ((flag_pic && flag_omit_frame_pointer)
126+ || ! standard_80387_constant_p (operands[1])))
127 {
128 operands[1] = validize_mem (force_const_mem (SFmode, operands[1]));
129 }
130@@ -1473,7 +1474,8 @@
131 else if ((reload_in_progress | reload_completed) == 0
132 && GET_CODE (operands[0]) != MEM
133 && GET_CODE (operands[1]) == CONST_DOUBLE
134- && !standard_80387_constant_p (operands[1]))
135+ && ((flag_pic && flag_omit_frame_pointer)
136+ || ! standard_80387_constant_p (operands[1])))
137 {
138 operands[1] = validize_mem (force_const_mem (DFmode, operands[1]));
139 }
140@@ -1601,7 +1603,8 @@
141 else if ((reload_in_progress | reload_completed) == 0
142 && GET_CODE (operands[0]) != MEM
143 && GET_CODE (operands[1]) == CONST_DOUBLE
144- && !standard_80387_constant_p (operands[1]))
145+ && ((flag_pic && flag_omit_frame_pointer)
146+ || ! standard_80387_constant_p (operands[1])))
147 {
148 operands[1] = validize_mem (force_const_mem (XFmode, operands[1]));
149 }
150diff -urN gcc-2.95.1.orig/gcc/config/linux.h gcc-2.95.1/gcc/config/linux.h
151--- gcc-2.95.1.orig/gcc/config/linux.h Wed Dec 16 21:59:55 1998
152+++ gcc-2.95.1/gcc/config/linux.h Thu Aug 19 13:25:21 1999
153@@ -103,7 +103,7 @@
154 %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
155 #else
156 #define LIB_SPEC \
157- "%{shared: -lc} \
158+ "%{shared: -lc --version-script libgcc.map%s} \
159 %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
160 %{profile:-lc_p} %{!profile: -lc}}"
161 #endif
162diff -urN gcc-2.95.1.orig/gcc/config/t-linux gcc-2.95.1/gcc/config/t-linux
163--- gcc-2.95.1.orig/gcc/config/t-linux Wed Dec 16 22:00:09 1998
164+++ gcc-2.95.1/gcc/config/t-linux Thu Aug 19 13:25:21 1999
165@@ -14,3 +14,17 @@
166 LIBGCC1 =
167 CROSS_LIBGCC1 =
168 LIBGCC1_TEST =
169+
170+# Make glocal functions in libgcc.a local to the shared library with
171+# symbol versioning.
172+LIBGCC_MAP=libgcc.map
173+# This list has to be maintained manually. It should cover the libgcc
174+# functions, which can be safely made local to a shared library, on
175+# all Linux platforms.
176+LIBGCC_MAP_LIST=__ashldi3 __ashrdi3 __builtin_saveregs __clear_cache \
177+ __cmpdi2 __divdi3 __dummy __eprintf __ffsdi2 __fixdfdi __fixsfdi \
178+ __fixunsdfdi __fixunsdfsi __fixunssfdi __fixunssfsi __fixunsxfdi \
179+ __fixunsxfsi __fixxfdi __floatdidf __floatdisf __floatdixf \
180+ __gcc_bcmp __lshrdi3 __moddi3 __muldi3 __negdi2 __pure_virtual \
181+ __ucmpdi2 __udiv_w_sdiv __udivdi3 __udivmoddi4 __umoddi3
182+EXTRACT_LIBGCC=for s in $(LIBGCC_MAP_LIST); do echo " $$s;"; done
183diff -urN gcc-2.95.1.orig/gcc/f/Make-lang.in gcc-2.95.1/gcc/f/Make-lang.in
184--- gcc-2.95.1.orig/gcc/f/Make-lang.in Mon Jun 7 08:44:57 1999
185+++ gcc-2.95.1/gcc/f/Make-lang.in Thu Aug 19 13:25:21 1999
186@@ -212,7 +212,7 @@
187
188 f77.all.build: g77$(exeext)
189 f77.all.cross: g77-cross$(exeext)
190-f77.start.encap: g77$(exeext)
191+f77.start.encap: g77$(exeext) $(srcdir)/f/intdoc.texi
192 f77.rest.encap:
193
194 f77.info: f/g77.info
195diff -urN gcc-2.95.1.orig/libf2c/Makefile.in gcc-2.95.1/libf2c/Makefile.in
196--- gcc-2.95.1.orig/libf2c/Makefile.in Sat Aug 7 07:36:10 1999
197+++ gcc-2.95.1/libf2c/Makefile.in Thu Aug 19 13:27:12 1999
198@@ -61,18 +61,18 @@
0fd6bde2
JR
199 # Quote this way so that it can be used to set shell variables too.
200 # Currently no use for PICFLAG, RUNTESTFLAGS -- check usage.
201 FLAGS_TO_PASS= \
202- CC='$(CC)' \
203- CFLAGS='$(CFLAGS)' \
204- CPPFLAGS='$(CPPFLAGS)' \
205- AR='$(AR)' \
206- RANLIB='$(RANLIB)' \
207- PICFLAG='$(PICFLAG)' \
7fbc4083
JR
208- RUNTESTFLAGS='$(RUNTESTFLAGS)' \
209- prefix='$(prefix)' \
210- exec_prefix='$(exec_prefix)' \
211- libdir='$(libdir)' \
212- libsubdir='$(libsubdir)' \
213- tooldir='$(tooldir)'
0fd6bde2
JR
214+ "CC=$(CC)" \
215+ "CFLAGS=$(CFLAGS)" \
216+ "CPPFLAGS=$(CPPFLAGS)" \
217+ "AR=$(AR)" \
218+ "RANLIB=$(RANLIB)" \
219+ "PICFLAG=$(PICFLAG)" \
7fbc4083
JR
220+ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
221+ "prefix=$(prefix)" \
222+ "exec_prefix=$(exec_prefix)" \
223+ "libdir=$(libdir)" \
224+ "libsubdir=$(libsubdir)" \
225+ "tooldir=$(tooldir)"
0fd6bde2
JR
226
227 LIBG2C = libg2c.a
228
This page took 0.101849 seconds and 4 git commands to generate.