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

« back to all changes in this revision

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