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

« back to all changes in this revision

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