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

« back to all changes in this revision

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