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

« back to all changes in this revision

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