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

« back to all changes in this revision

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