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

« back to all changes in this revision

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