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

« back to all changes in this revision

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