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

« back to all changes in this revision

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