~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/6e/6e85d1f5266bf6798595c7d072cad4547b847bb9.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ifeq ($(with_libgcc),yes)
 
2
  $(lib_binaries)       += libgcc
 
3
endif
 
4
ifeq ($(with_cdev),yes)
 
5
  $(lib_binaries)  += libgcc-dev
 
6
endif
 
7
 
 
8
ifeq ($(with_lib64gcc),yes)
 
9
  $(lib_binaries)       += lib64gcc
 
10
endif
 
11
ifeq ($(with_lib64gccdev),yes)
 
12
  $(lib_binaries)  += lib64gcc-dev
 
13
endif
 
14
ifeq ($(with_lib32gcc),yes)
 
15
  $(lib_binaries)       += lib32gcc
 
16
endif
 
17
ifeq ($(with_lib32gccdev),yes)
 
18
  $(lib_binaries)  += lib32gcc-dev
 
19
endif
 
20
ifeq ($(with_libn32gcc),yes)
 
21
  $(lib_binaries)       += libn32gcc
 
22
endif
 
23
ifeq ($(with_libn32gccdev),yes)
 
24
  $(lib_binaries)  += libn32gcc-dev
 
25
endif
 
26
ifeq ($(with_libx32gcc),yes)
 
27
  $(lib_binaries)       += libx32gcc
 
28
endif
 
29
ifeq ($(with_libx32gccdev),yes)
 
30
  $(lib_binaries)  += libx32gcc-dev
 
31
endif
 
32
ifeq ($(with_libhfgcc),yes)
 
33
  $(lib_binaries)       += libhfgcc
 
34
endif
 
35
ifeq ($(with_libhfgccdev),yes)
 
36
  $(lib_binaries)  += libhfgcc-dev
 
37
endif
 
38
ifeq ($(with_libsfgcc),yes)
 
39
  $(lib_binaries)       += libsfgcc
 
40
endif
 
41
ifeq ($(with_libsfgccdev),yes)
 
42
  $(lib_binaries)  += libsfgcc-dev
 
43
endif
 
44
 
 
45
header_files = \
 
46
        $(gcc_lib_dir)/include/std*.h \
 
47
        $(shell for h in \
 
48
                    README features.h arm_neon.h loongson.h \
 
49
                    {cpuid,decfloat,float,iso646,limits,mm3dnow,mm_malloc}.h \
 
50
                    {ppu_intrinsics,paired,spu2vmx,vec_types,si2vmx}.h \
 
51
                    {,a,b,e,i,n,p,s,t,w,x}mmintrin.h mmintrin-common.h \
 
52
                    {abm,adx,avx,avx2,bmi,bmi2,f16c,fma,fma4,fxsr,ia32,}intrin.h \
 
53
                    {lwp,lzcnt,popcnt,prfchw,rdseed,rtm,tbm,x86,xop,xsave{,opt},xtest,}intrin.h \
 
54
                    {htm,htmxl}intrin.h \
 
55
                    {cross-stdarg,syslimits,unwind,unwind-arm-common,varargs}.h; \
 
56
                do \
 
57
                  test -e $(d)/$(gcc_lib_dir)/include/$$h \
 
58
                    && echo $(gcc_lib_dir)/include/$$h; \
 
59
                  test -e $(d)/$(gcc_lib_dir)/include-fixed/$$h \
 
60
                    && echo $(gcc_lib_dir)/include-fixed/$$h; \
 
61
                done) \
 
62
        $(shell for d in \
 
63
                  asm bits gnu linux $(TARGET_ALIAS) \
 
64
                  $(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS)); \
 
65
                do \
 
66
                  test -e $(d)/$(gcc_lib_dir)/include/$$d \
 
67
                    && echo $(gcc_lib_dir)/include/$$d; \
 
68
                  test -e $(d)/$(gcc_lib_dir)/include-fixed/$$d \
 
69
                    && echo $(gcc_lib_dir)/include-fixed/$$d; \
 
70
                done)
 
71
 
 
72
ifeq ($(with_libssp),yes)
 
73
    header_files += $(gcc_lib_dir)/include/ssp
 
74
endif
 
75
ifeq ($(with_gomp),yes)
 
76
    header_files += $(gcc_lib_dir)/include/omp.h
 
77
endif
 
78
ifeq ($(with_qmath),yes)
 
79
    header_files += $(gcc_lib_dir)/include/quadmath{,_weak}.h
 
80
endif
 
81
 
 
82
ifeq ($(DEB_TARGET_ARCH),ia64)
 
83
    header_files += $(gcc_lib_dir)/include/ia64intrin.h
 
84
endif
 
85
 
 
86
ifeq ($(DEB_TARGET_ARCH),m68k)
 
87
    header_files += $(gcc_lib_dir)/include/math-68881.h
 
88
endif
 
89
 
 
90
ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),powerpc ppc64 ppc64el powerpcspe))
 
91
    header_files += $(gcc_lib_dir)/include/{altivec.h,ppc-asm.h,spe.h}
 
92
endif
 
93
 
 
94
p_lgcc          = libgcc$(GCC_SONAME)$(cross_lib_arch)
 
95
p_lgccdbg       = libgcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
96
p_lgccdev       = libgcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
97
d_lgcc          = debian/$(p_lgcc)
 
98
d_lgccdbg       = debian/$(p_lgccdbg)
 
99
d_lgccdev       = debian/$(p_lgccdev)
 
100
 
 
101
p_l32gcc        = lib32gcc$(GCC_SONAME)$(cross_lib_arch)
 
102
p_l32gccdbg     = lib32gcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
103
p_l32gccdev     = lib32gcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
104
d_l32gcc        = debian/$(p_l32gcc)
 
105
d_l32gccdbg     = debian/$(p_l32gccdbg)
 
106
d_l32gccdev     = debian/$(p_l32gccdev)
 
107
 
 
108
p_l64gcc        = lib64gcc$(GCC_SONAME)$(cross_lib_arch)
 
109
p_l64gccdbg     = lib64gcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
110
p_l64gccdev     = lib64gcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
111
d_l64gcc        = debian/$(p_l64gcc)
 
112
d_l64gccdbg     = debian/$(p_l64gccdbg)
 
113
d_l64gccdev     = debian/$(p_l64gccdev)
 
114
 
 
115
p_ln32gcc       = libn32gcc$(GCC_SONAME)$(cross_lib_arch)
 
116
p_ln32gccdbg    = libn32gcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
117
p_ln32gccdev    = libn32gcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
118
d_ln32gcc       = debian/$(p_ln32gcc)
 
119
d_ln32gccdbg    = debian/$(p_ln32gccdbg)
 
120
d_ln32gccdev    = debian/$(p_ln32gccdev)
 
121
 
 
122
p_lx32gcc       = libx32gcc$(GCC_SONAME)$(cross_lib_arch)
 
123
p_lx32gccdbg    = libx32gcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
124
p_lx32gccdev    = libx32gcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
125
d_lx32gcc       = debian/$(p_lx32gcc)
 
126
d_lx32gccdbg    = debian/$(p_lx32gccdbg)
 
127
d_lx32gccdev    = debian/$(p_lx32gccdev)
 
128
 
 
129
p_lhfgcc        = libhfgcc$(GCC_SONAME)$(cross_lib_arch)
 
130
p_lhfgccdbg     = libhfgcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
131
p_lhfgccdev     = libhfgcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
132
d_lhfgcc        = debian/$(p_lhfgcc)
 
133
d_lhfgccdbg     = debian/$(p_lhfgccdbg)
 
134
d_lhfgccdev     = debian/$(p_lhfgccdev)
 
135
 
 
136
p_lsfgcc        = libsfgcc$(GCC_SONAME)$(cross_lib_arch)
 
137
p_lsfgccdbg     = libsfgcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 
138
p_lsfgccdev     = libsfgcc-$(BASE_VERSION)-dev$(cross_lib_arch)
 
139
d_lsfgcc        = debian/$(p_lsfgcc)
 
140
d_lsfgccdbg     = debian/$(p_lsfgccdbg)
 
141
d_lsfgccdev     = debian/$(p_lsfgccdev)
 
142
 
 
143
# __do_gcc_devels(flavour,package,todir,fromdir)
 
144
define __do_gcc_devels
 
145
        dh_testdir
 
146
        dh_testroot
 
147
        mv $(install_stamp) $(install_stamp)-tmp
 
148
 
 
149
        test -n "$(2)"
 
150
        rm -rf debian/$(2)
 
151
        dh_installdirs -p$(2) $(docdir) #TODO
 
152
        dh_installdirs -p$(2) $(3)
 
153
 
 
154
        $(call __do_gcc_devels2,$(1),$(2),$(3),$(4))
 
155
 
 
156
        debian/dh_doclink -p$(2) $(p_base)
 
157
        debian/dh_rmemptydirs -p$(2)
 
158
 
 
159
        dh_strip -p$(2)
 
160
        dh_compress -p$(2)
 
161
        $(cross_shlibdeps) dh_shlibdeps -p$(2)
 
162
        $(call cross_mangle_substvars,$(2))
 
163
        dh_fixperms -p$(2)
 
164
        dh_installdeb -p$(2)
 
165
        $(cross_gencontrol) dh_gencontrol -p$(2) -- -v$(DEB_VERSION) $(common_substvars)
 
166
        $(call cross_mangle_control,$(2))
 
167
        dh_md5sums -p$(2)
 
168
        dh_builddeb -p$(2)
 
169
 
 
170
        trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
 
171
endef
 
172
 
 
173
# __do_gcc_devels2(flavour,package,todir,fromdir)
 
174
define __do_gcc_devels2
 
175
# stage1 builds static libgcc only
 
176
        $(if $(filter $(DEB_STAGE),stage1),,
 
177
                : # libgcc_s.so may be a linker script on some architectures
 
178
                set -e; \
 
179
                if [ -h $(4)/libgcc_s.so ]; then \
 
180
                  rm -f $(4)/libgcc_s.so; \
 
181
                  dh_link -p$(2) /$(libgcc_dir$(1))/libgcc_s.so.$(GCC_SONAME) \
 
182
                    $(3)/libgcc_s.so; \
 
183
                else \
 
184
                  mv $(4)/libgcc_s.so $(d)/$(3)/libgcc_s.so; \
 
185
                  dh_link -p$(2) /$(libgcc_dir$(1))/libgcc_s.so.$(GCC_SONAME) \
 
186
                    $(3)/libgcc_s.so.$(GCC_SONAME); \
 
187
                fi; \
 
188
                $(if $(1), dh_link -p$(2) /$(3)/libgcc_s.so \
 
189
                    $(gcc_lib_dir)/libgcc_s_$(1).so;)
 
190
        )
 
191
        DH_COMPAT=2 dh_movefiles -p$(2) \
 
192
                $(3)/{libgcc*,libgcov.a,*.o} \
 
193
                $(if $(1),,$(header_files)) # Only move headers for the “main” package
 
194
 
 
195
        : # libbacktrace not installed by default
 
196
        $(if $(filter yes, $(with_backtrace)),
 
197
        if [ -f $(buildlibdir)/$(1)/libbacktrace/.libs/libbacktrace.a ]; then \
 
198
          install -m644 $(buildlibdir)/$(1)/libbacktrace/.libs/libbacktrace.a \
 
199
              debian/$(2)/$(gcc_lib_dir)/$(1); \
 
200
        fi; \
 
201
        $(if $(1),,
 
202
        if [ -f $(buildlibdir)/libbacktrace/backtrace-supported.h ]; then \
 
203
          install -m644 $(buildlibdir)/libbacktrace/backtrace-supported.h \
 
204
            debian/$(2)/$(gcc_lib_dir)/include/; \
 
205
          install -m644 $(srcdir)/libbacktrace/backtrace.h \
 
206
            debian/$(2)/$(gcc_lib_dir)/include/; \
 
207
        fi
 
208
        ))
 
209
 
 
210
        : # If building a flavour, add a lintian override
 
211
        $(if $(1),
 
212
                #TODO: use a file instead of a hacky echo
 
213
                # bu do we want to use one override file (in the source package) per
 
214
                # flavour or not since they are essentially the same?
 
215
                mkdir -p debian/$(2)/usr/share/lintian/overrides
 
216
                echo "$(2) binary: binary-from-other-architecture" \
 
217
                        >> debian/$(2)/usr/share/lintian/overrides/$(2)
 
218
        )
 
219
        $(if $(filter yes, $(with_lib$(1)gmath)),
 
220
                $(call install_gcc_lib,libgcc-math,$(GCC_SONAME),$(1),$(2))
 
221
        )
 
222
        $(if $(filter yes, $(with_libssp)),
 
223
                $(call install_gcc_lib,libssp,$(SSP_SONAME),$(1),$(2))
 
224
        )
 
225
        $(if $(filter yes, $(with_ssp)),
 
226
                mv $(4)/libssp_nonshared.a debian/$(2)/$(3)/;
 
227
        )
 
228
        $(if $(filter yes, $(with_gomp)),
 
229
                $(call install_gcc_lib,libgomp,$(GOMP_SONAME),$(1),$(2))
 
230
        )
 
231
        $(if $(filter yes, $(with_itm)),
 
232
                $(call install_gcc_lib,libitm,$(ITM_SONAME),$(1),$(2))
 
233
        )
 
234
        $(if $(filter yes, $(with_atomic)),
 
235
                $(call install_gcc_lib,libatomic,$(ATOMIC_SONAME),$(1),$(2))
 
236
        )
 
237
        $(if $(filter yes, $(with_asan)),
 
238
                $(call install_gcc_lib,libasan,$(ASAN_SONAME),$(1),$(2))
 
239
                mv $(4)/libasan_preinit.o debian/$(2)/$(3)/;
 
240
        )
 
241
        $(if $(1),,$(if $(filter yes, $(with_tsan)),
 
242
                $(call install_gcc_lib,libtsan,$(TSAN_SONAME),$(1),$(2))
 
243
        ))
 
244
        $(if $(filter yes, $(with_qmath)),
 
245
                $(call install_gcc_lib,libquadmath,$(QMATH_SONAME),$(1),$(2))
 
246
        )
 
247
endef
 
248
 
 
249
# do_gcc_devels(flavour)
 
250
define do_gcc_devels
 
251
        $(call __do_gcc_devels,$(1),$(p_l$(1)gccdev),$(gcc_lib_dir$(1)),$(d)/$(usr_lib$(1)))
 
252
endef
 
253
 
 
254
 
 
255
define __do_libgcc
 
256
        dh_testdir
 
257
        dh_testroot
 
258
        mv $(install_stamp) $(install_stamp)-tmp
 
259
 
 
260
        rm -rf $(d_l) $(d_d)
 
261
 
 
262
        dh_installdirs -p$(p_l) \
 
263
                $(docdir)/$(p_l) \
 
264
                $(libgcc_dir$(2))
 
265
 
 
266
        $(if $(filter yes,$(with_shared_libgcc)),
 
267
                mv $(d)/$(usr_lib$(2))/libgcc_s.so.$(GCC_SONAME) \
 
268
                        $(d_l)/$(libgcc_dir$(2))/.
 
269
        )
 
270
 
 
271
        debian/dh_doclink -p$(p_l) $(if $(3),$(3),$(p_base))
 
272
        debian/dh_doclink -p$(p_d) $(if $(3),$(3),$(p_base))
 
273
        debian/dh_rmemptydirs -p$(p_l)
 
274
        debian/dh_rmemptydirs -p$(p_d)
 
275
        dh_strip -p$(p_l) --dbg-package=$(p_d)
 
276
 
 
277
        # see Debian #533843 for the __aeabi symbol handling; this construct is
 
278
        # just to include the symbols for dpkg versions older than 1.15.3 which
 
279
        # didn't allow bypassing the symbol blacklist
 
280
        $(if $(filter yes,$(with_shared_libgcc)),
 
281
                $(cross_makeshlibs) dh_makeshlibs -p$(p_l) -p$(p_d) \
 
282
                        -- -v$(DEB_LIBGCC_VERSION)
 
283
                $(call cross_mangle_shlibs,$(p_l))
 
284
                $(if $(filter arm-linux-gnueabi%,$(DEB_TARGET_GNU_TYPE)),
 
285
                        if head -1 $(d_l)/DEBIAN/symbols 2>/dev/null | grep -q '^lib'; then \
 
286
                          grep -q '^ __aeabi' $(d_l)/DEBIAN/symbols \
 
287
                            || cat debian/libgcc1.symbols.aeabi \
 
288
                                >> $(d_l)/DEBIAN/symbols; \
 
289
                        fi
 
290
                )
 
291
        )
 
292
 
 
293
        $(if $(DEB_STAGE),,
 
294
            $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
 
295
                $(call shlibdirs_to_search,,$(2))
 
296
        )
 
297
        $(call cross_mangle_substvars,$(p_l))
 
298
 
 
299
        $(if $(2),,     # only for native
 
300
                mkdir -p $(d_l)/usr/share/lintian/overrides
 
301
                echo '$(p_l): package-name-doesnt-match-sonames' \
 
302
                        > $(d_l)/usr/share/lintian/overrides/$(p_l)
 
303
        )
 
304
 
 
305
        dh_compress -p$(p_l) -p$(p_d)
 
306
        dh_fixperms -p$(p_l) -p$(p_d)
 
307
        $(cross_gencontrol) dh_gencontrol -p$(p_l) -p$(p_d) \
 
308
                -- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
 
309
        $(call cross_mangle_control,$(p_l))
 
310
 
 
311
        dh_installdeb -p$(p_l) -p$(p_d)
 
312
        dh_md5sums -p$(p_l) -p$(p_d)
 
313
        dh_builddeb -p$(p_l) -p$(p_d)
 
314
 
 
315
        trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
 
316
endef
 
317
 
 
318
do_libgcc = $(call __do_libgcc,lib$(1)gcc$(GCC_SONAME),$(1),$(2))
 
319
# ----------------------------------------------------------------------
 
320
 
 
321
$(binary_stamp)-libgcc: $(install_dependencies)
 
322
ifeq ($(with_standalone_gcj),yes)
 
323
        $(call do_libgcc,,$(p_jbase))
 
324
else
 
325
        $(call do_libgcc,,)
 
326
endif
 
327
 
 
328
$(binary_stamp)-lib64gcc: $(install_dependencies)
 
329
        $(call do_libgcc,64,)
 
330
 
 
331
$(binary_stamp)-lib32gcc: $(install_dependencies)
 
332
        $(call do_libgcc,32,)
 
333
 
 
334
$(binary_stamp)-libn32gcc: $(install_dependencies)
 
335
        $(call do_libgcc,n32,)
 
336
 
 
337
$(binary_stamp)-libx32gcc: $(install_dependencies)
 
338
        $(call do_libgcc,x32,)
 
339
 
 
340
$(binary_stamp)-libhfgcc: $(install_dependencies)
 
341
        $(call do_libgcc,hf)
 
342
 
 
343
$(binary_stamp)-libsfgcc: $(install_dependencies)
 
344
        $(call do_libgcc,sf)
 
345
 
 
346
$(binary_stamp)-libgcc-dev: $(install_dependencies)
 
347
        $(call do_gcc_devels,)
 
348
 
 
349
$(binary_stamp)-lib64gcc-dev: $(install_dependencies)
 
350
        $(call do_gcc_devels,64)
 
351
 
 
352
$(binary_stamp)-lib32gcc-dev: $(install_dependencies)
 
353
        $(call do_gcc_devels,32)
 
354
 
 
355
$(binary_stamp)-libn32gcc-dev: $(install_dependencies)
 
356
        $(call do_gcc_devels,n32)
 
357
 
 
358
$(binary_stamp)-libx32gcc-dev: $(install_dependencies)
 
359
        $(call do_gcc_devels,x32)
 
360
 
 
361
$(binary_stamp)-libhfgcc-dev: $(install_dependencies)
 
362
        $(call do_gcc_devels,hf)
 
363
 
 
364
$(binary_stamp)-libsfgcc-dev: $(install_dependencies)
 
365
        $(call do_gcc_devels,sf)
 
366