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

« back to all changes in this revision

Viewing changes to .svn/pristine/5d/5d6cef35df430be50c7dcf4a7ba658cddda4bea8.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
# -*- makefile -*-
 
2
# rules to patch the unpacked files in the source directory
 
3
# ---------------------------------------------------------------------------
 
4
# various rules to unpack addons and (un)apply patches.
 
5
#       - patch / apply-patches
 
6
#       - unpatch / reverse-patches
 
7
 
 
8
.NOTPARALLEL:
 
9
 
 
10
patchdir        ?= debian/patches
 
11
series_file     ?= $(patchdir)/series
 
12
 
 
13
# which patches should be applied?
 
14
 
 
15
debian_patches = \
 
16
        svn-updates \
 
17
        $(if $(with_linaro_branch),gcc-linaro) \
 
18
        $(if $(with_linaro_branch),gcc-linaro-no-local) \
 
19
 
 
20
#       svn-updates$(if $(with_linaro_branch),-linaro) \
 
21
 
 
22
ifeq ($(with_java),yes)
 
23
#  debian_patches += \
 
24
#       svn-class-updates
 
25
endif
 
26
 
 
27
ifneq ($(GFDL_INVARIANT_FREE),yes)
 
28
  debian_patches += \
 
29
        rename-info-files \
 
30
        $(if $(with_linaro_branch),gcc-linaro-doc) \
 
31
 
 
32
#       svn-doc-updates \
 
33
#       $(if $(with_linaro_branch),,svn-doc-updates) \
 
34
 
 
35
else
 
36
  debian_patches += \
 
37
        $(if $(with_linaro_branch),gcc-dfsg-linaro-doc)
 
38
endif
 
39
debian_patches += \
 
40
        gcc-gfdl-build
 
41
 
 
42
#       boehm-gc-nocheck: seems to work on the buildds \
 
43
 
 
44
debian_patches += \
 
45
        gcc-textdomain \
 
46
        gcc-driver-extra-langs
 
47
 
 
48
ifneq (,$(filter $(distrelease),etch lenny squeeze wheezy dapper hardy intrepid jaunty karmic lucid))
 
49
  debian_patches += gcc-hash-style-both
 
50
else
 
51
  debian_patches += gcc-hash-style-gnu
 
52
endif
 
53
 
 
54
debian_patches += \
 
55
        libstdc++-pic \
 
56
        libstdc++-doclink \
 
57
        libstdc++-man-3cxx \
 
58
        libstdc++-test-installed \
 
59
        libjava-stacktrace \
 
60
        libjava-jnipath \
 
61
        libjava-sjlj \
 
62
        libjava-disable-plugin \
 
63
        alpha-no-ev4-directive \
 
64
        boehm-gc-getnprocs \
 
65
        note-gnu-stack \
 
66
        libgomp-omp_h-multilib \
 
67
        sparc-force-cpu \
 
68
        gccgo-version \
 
69
        pr47818 \
 
70
        pr49944 \
 
71
        gcc-base-version \
 
72
        libgo-testsuite \
 
73
        gcc-target-include-asm \
 
74
        libgo-revert-timeout-exp \
 
75
        $(if $(with_linaro_branch),,arm-sanitizer) \
 
76
        libgo-setcontext-config \
 
77
        pr57211 \
 
78
        kfreebsd-unwind \
 
79
        libgcc-no-limits-h \
 
80
        kfreebsd-boehm-gc \
 
81
        pr49847 \
 
82
        libffi-m68k \
 
83
        m68k-picflag \
 
84
        sys-auxv-header \
 
85
        go-use-gold \
 
86
        go-testsuite \
 
87
        pr57363 \
 
88
        $(if $(with_linaro_branch),pr59744) \
 
89
        $(if $(with_linaro_branch),aarch64-call-frame-info) \
 
90
        $(if $(with_linaro_branch),aarch64-abi-fix) \
 
91
        fix-ffi_call_VFP-with-no-VFP-argument \
 
92
        $(if $(with_linaro_branch),pr60034) \
 
93
        pr61106 \
 
94
        pr61126 \
 
95
        pr57653 \
 
96
        testsuite-hardening-ssp \
 
97
 
 
98
# FIXME: still necessary for cross building the native compiler?
 
99
#       gcc-auto-build \
 
100
 
 
101
gdb_depends := $(shell dpkg -s gdb | grep '^Depends:.*libpython3')
 
102
ifneq (,$(findstring libpython3,$(gdb_depends)))
 
103
  debian_patches += libstdc++-python3
 
104
endif
 
105
 
 
106
#       $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
 
107
#       libstdc++-nothumb-check \
 
108
# TODO: update ...
 
109
#       gcc-cloog-dl \
 
110
#       libjava-rpath \
 
111
 
 
112
hardening_patches =
 
113
ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)
 
114
  hardening_patches += gcc-default-ssp
 
115
  hardening_patches += gcc-default-format-security
 
116
endif
 
117
ifeq ($(distribution),Ubuntu)
 
118
  ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
 
119
    hardening_patches += \
 
120
        gcc-default-fortify-source \
 
121
        gcc-default-relro \
 
122
        testsuite-hardening-format \
 
123
        testsuite-hardening-printf-types \
 
124
        testsuite-hardening-updates
 
125
  endif
 
126
endif
 
127
 
 
128
# FIXME 4.5: Drop and adjust symbols files
 
129
ifneq (,$(findstring 4.4, $(PKGSOURCE)))
 
130
  debian_patches += pr39491
 
131
endif
 
132
 
 
133
ifeq ($(with_ada),yes)
 
134
  debian_patches += \
 
135
        ada-driver-check \
 
136
        ada-gcc-name \
 
137
        ada-default-project-path \
 
138
        ada-symbolic-tracebacks \
 
139
        ada-library-project-files-soname \
 
140
        ada-ppc64
 
141
 
 
142
  ifeq ($(biarch64),yes)
 
143
    debian_patches += \
 
144
        ada-nobiarch-check
 
145
  endif
 
146
 
 
147
  ifeq ($(with_libgnat),yes)
 
148
    debian_patches += \
 
149
        ada-link-lib \
 
150
        ada-libgnatvsn \
 
151
        ada-libgnatprj \
 
152
        ada-acats
 
153
    ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes)
 
154
      debian_patches += \
 
155
        ada-sjlj
 
156
    endif
 
157
  endif
 
158
 
 
159
  ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
160
    debian_patches += \
 
161
        gcc_ada_gcc-interface_Makefile.in \
 
162
        ada-s-osinte-gnu.adb \
 
163
        ada-s-osinte-gnu.ads \
 
164
        ada-s-taprop-gnu.adb
 
165
  endif
 
166
 
 
167
  debian_patches += \
 
168
        ada-link-shlib
 
169
endif
 
170
 
 
171
ifeq ($(with_d),yes)
 
172
  debian_patches += \
 
173
        gdc-updates \
 
174
        gdc-4.8 \
 
175
        gdc-versym-cpu \
 
176
        gdc-versym-os \
 
177
        gdc-frontend-posix
 
178
#       gdc-multiarch
 
179
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
180
    debian_patches += gdc-4.8-doc
 
181
  else
 
182
    debian_patches += gdc-texinfo
 
183
  endif
 
184
  ifeq ($(with_libphobos),yes)
 
185
    debian_patches += gdc-libphobos-build
 
186
  else
 
187
    debian_patches += gdc-driver-nophobos
 
188
  endif
 
189
  ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386))
 
190
    debian_patches += disable-gdc-tests
 
191
  endif
 
192
else
 
193
  debian_patches += gcc-d-lang
 
194
endif
 
195
 
 
196
ifeq ($(DEB_TARGET_ARCH),alpha)
 
197
  debian_patches += alpha-ieee
 
198
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
199
    debian_patches += alpha-ieee-doc
 
200
  endif
 
201
endif
 
202
 
 
203
ifeq ($(DEB_TARGET_ARCH_CPU),amd64)
 
204
  debian_patches += libjava-testsuite
 
205
endif
 
206
 
 
207
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf))
 
208
  debian_patches += libjava-armel-unwind
 
209
endif
 
210
 
 
211
ifeq ($(DEB_TARGET_ARCH),armhf)
 
212
 debian_patches += gcj-arm-mode
 
213
else ifeq ($(DEB_TARGET_ARCH),armel)
 
214
  ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
 
215
    debian_patches += gcj-arm-mode
 
216
  endif
 
217
endif
 
218
 
 
219
ifeq ($(DEB_TARGET_ARCH),m68k)
 
220
  debian_patches += m68k-ada
 
221
  debian_patches += m68k-revert-pr45144
 
222
  debian_patches += pr52714
 
223
  debian_patches += pr58369
 
224
  debian_patches += pr52306
 
225
endif
 
226
 
 
227
ifeq ($(DEB_TARGET_ARCH),powerpcspe)
 
228
  debian_patches += powerpc_remove_many
 
229
  debian_patches += powerpc_nofprs
 
230
endif
 
231
 
 
232
#debian_patches += link-libs
 
233
 
 
234
# all patches below this line are applied for gcc-snapshot builds as well
 
235
 
 
236
ifeq ($(single_package),yes)
 
237
  debian_patches =
 
238
endif
 
239
 
 
240
debian_patches += gcc-sysroot
 
241
debian_patches += goarch-aarch64
 
242
debian_patches += libgo-explicit-reservation
 
243
debian_patches += \
 
244
        ada-kfreebsd \
 
245
 
 
246
ifeq ($(with_softfloat),yes)
 
247
  debian_patches += arm-multilib-soft-float
 
248
else ifeq ($(multilib),yes)
 
249
  ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
 
250
    debian_patches += arm-multilib-softfp$(if $(filter yes,$(DEB_CROSS)),-cross)
 
251
  else
 
252
    debian_patches += arm-multilib-soft$(if $(filter yes,$(DEB_CROSS)),-cross)
 
253
  endif
 
254
endif
 
255
debian_patches += arm-multilib-defaults
 
256
 
 
257
ifeq ($(DEB_CROSS),yes)
 
258
  debian_patches += cross-fixes
 
259
  ifeq ($(with_deps_on_target_arch_pkgs),yes)
 
260
    debian_patches += cross-ma-install-location
 
261
  else
 
262
    debian_patches += cross-install-location
 
263
  endif
 
264
endif
 
265
 
 
266
ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
267
  debian_patches += hurd-changes
 
268
endif
 
269
 
 
270
debian_patches += gcc-ice-hack gcc-ice-apport
 
271
#FIXME
 
272
#debian_patches += gold-and-ld
 
273
 
 
274
debian_patches += libjava-fixed-symlinks
 
275
debian_patches += libstdc++-arm-wno-abi
 
276
 
 
277
ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel))
 
278
  # timeouts on the buildd's, Debian
 
279
  debian_patches += libstdc++-no-testsuite
 
280
else ifeq ($(distribution),Ubuntu)
 
281
  # timeouts on the buildd's, Ubuntu only
 
282
  ifneq (,$(filter $(DEB_TARGET_ARCH), armel ia64))
 
283
    debian_patches += libstdc++-no-testsuite
 
284
  endif
 
285
endif
 
286
debian_patches += ada-mips
 
287
debian_patches += libffi-ro-eh_frame_sect
 
288
 
 
289
debian_patches += gcc-multiarch
 
290
ifeq ($(with_multiarch_lib),yes)
 
291
  ifneq ($(single_package),yes)
 
292
    debian_patches += libjava-multiarch
 
293
  endif
 
294
endif
 
295
debian_patches += libjava-nobiarch-check
 
296
debian_patches += config-ml
 
297
ifneq ($(single_package),yes)
 
298
  ifeq ($(with_multiarch_cxxheaders),yes)
 
299
    debian_patches += g++-multiarch-incdir
 
300
  endif
 
301
endif
 
302
ifeq ($(DEB_CROSS),yes)
 
303
  debian_patches += cross-no-locale-include
 
304
endif
 
305
ifeq ($(biarch64),yes)
 
306
  ifeq ($(DEB_CROSS),yes)
 
307
    debian_patches += cross-biarch
 
308
  endif
 
309
endif
 
310
debian_patches += gcc-multilib-multiarch
 
311
 
 
312
ifneq (,$(filter $(derivative),Ubuntu))
 
313
  ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick))
 
314
    debian_patches += gcc-as-needed
 
315
  endif
 
316
else # Debian
 
317
    #debian_patches += gcc-as-needed
 
318
endif
 
319
debian_patches += mips-fix-loongson2f-nop
 
320
ifeq ($(derivative),Ubuntu)
 
321
  ifeq ($(DEB_TARGET_ARCH),ppc64)
 
322
    debian_patches += gcc-ppc64-O3
 
323
  endif
 
324
endif
 
325
debian_patches += libgomp-kfreebsd-testsuite
 
326
 
 
327
series_stamp = $(stampdir)/02-series-stamp
 
328
series: $(series_stamp)
 
329
$(series_stamp):
 
330
        echo $(strip $(addsuffix .diff,$(debian_patches))) \
 
331
          | sed -r 's/  +/ /g' | tr " " "\n" > $(series_file)
 
332
ifneq (,$(strip $(hardening_patches)))
 
333
  ifneq ($(trunk_build),yes)
 
334
        echo $(strip $(addsuffix .diff,$(hardening_patches))) \
 
335
          | sed -r 's/  +/ /g' | tr " " "\n" >> $(series_file)
 
336
  endif
 
337
endif
 
338
        sed -r 's/(.)$$/\1 -p1/' -i $(series_file)
 
339
        touch $@
 
340
 
 
341
autotools_files = $(addprefix ./,$(foreach file,$(shell lsdiff --no-filename \
 
342
        $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \
 
343
        | sed -r 's:[^/]+/src/:src/:' | sort | uniq),$(shell echo $(file) \
 
344
        | egrep 'configure\.(ac|in)|Makefile\.(am|in)|acinclude.m4')))
 
345
 
 
346
autoconf_version = 2.64
 
347
ifeq ($(trunk_build),yes)
 
348
  # The actual version depends on the build-dependencies set by
 
349
  # variable AUTO_BUILD_DEP in rules.conf.  Here, we assume the
 
350
  # correct version is installed.
 
351
  #autoconf_version =
 
352
endif
 
353
 
 
354
# FIXME: the auto* stuff is done every time for every subdir, which
 
355
# leads to build errors. Idea: record the auto* calls in the patch
 
356
# files (AUTO <dir> <auto-command with options>) and run them separately,
 
357
# maybe only once per directory).
 
358
$(patch_stamp): $(unpack_stamp) $(series_stamp)
 
359
        QUILT_PATCHES=$(patchdir) \
 
360
          quilt --quiltrc /dev/null push -a || test $$? = 2
 
361
 
 
362
ifneq (,$(filter svn-updates, $(debian_patches)))
 
363
        awk '/^EOF/ {exit} p==1 {print} /EOF$$/ {p=1}' \
 
364
          $(patchdir)/svn-updates.diff > src/LAST_UPDATED
 
365
endif
 
366
 
 
367
        if ! test -f stamps/autotools_files ; then touch stamps/autotools_files ; fi
 
368
 
 
369
        cd $(srcdir)/fixincludes && ./genfixes
 
370
 
 
371
        for f in $(autotools_files) ; \
 
372
          do case $$f in \
 
373
            */classpath/m4/acinclude.m4) \
 
374
                : ;; \
 
375
            */configure.*|*/acinclude.m4) \
 
376
                if grep ^"$$(md5sum $$f)"$$ stamps/autotools_files >/dev/null ; \
 
377
                  then echo "Skipping already regenerated file $$f." ; \
 
378
                else \
 
379
                  echo "Running autoconf$(autoconf_version) in $$(dirname $$f)..." ; \
 
380
                  dir="$(CURDIR)"; cd $(CURDIR)/$$(dirname $$f) \
 
381
                    && AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version) \
 
382
                    && cd $$dir \
 
383
                    && echo "$$(md5sum $$f)" >> stamps/autotools_files ; \
 
384
                fi ;; \
 
385
            */Makefile.*) ;; \
 
386
            *) echo "Unknown file: $$f"; false; \
 
387
          esac; \
 
388
        done
 
389
 
 
390
        for i in $(debian_patches) $(hardening_patches); do \
 
391
          echo -e "\n$$i:" >> pxxx; \
 
392
          sed -n 's/^# *DP: */  /p' $(patchdir)/$$i.diff >> pxxx; \
 
393
        done
 
394
#       -$(srcdir)/move-if-change pxxx $@
 
395
        mv pxxx $@
 
396
 
 
397
unpatch:
 
398
        QUILT_PATCHES=$(patchdir) \
 
399
          quilt --quiltrc /dev/null pop -a -R || test $$? = 2
 
400
        rm -rf .pc
 
401
        for f in $(autotools_files); do \
 
402
          rm -f $$(echo $$f | sed -r 's/\.(ac|am|in)$$//'); \
 
403
        done
 
404
 
 
405
update-patches: $(series_stamp)
 
406
        export QUILT_PATCHES=$(patchdir); \
 
407
        export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"; \
 
408
        export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"; \
 
409
        while quilt push; do quilt refresh; done
 
410
 
 
411
patch: $(patch_stamp)
 
412
.PHONY: patch series quilt autotools