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

« back to all changes in this revision

Viewing changes to .svn/pristine/6f/6ffaedc40c9409c17266bab39a06497182b8da0b.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),aarch64-libatomic) \
 
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
        pr24619 \
 
67
        gccgo-version \
 
68
        pr47818 \
 
69
        pr49944 \
 
70
        gcc-base-version \
 
71
        libgo-testsuite \
 
72
        gcc-target-include-asm \
 
73
        libgo-revert-timeout-exp \
 
74
        $(if $(with_linaro_branch),,arm-sanitizer) \
 
75
        aarch64-libjava \
 
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
        gotest-elfv2 \
 
86
 
 
87
gdb_depends := $(shell dpkg -s gdb | grep '^Depends:.*libpython3')
 
88
ifneq (,$(findstring libpython3,$(gdb_depends)))
 
89
  debian_patches += libstdc++-python3
 
90
endif
 
91
 
 
92
#       $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
 
93
#       libstdc++-nothumb-check \
 
94
# TODO: update ...
 
95
#       gcc-cloog-dl \
 
96
#       libjava-rpath \
 
97
 
 
98
hardening_patches =
 
99
ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)
 
100
  hardening_patches += gcc-default-ssp
 
101
endif
 
102
ifeq ($(distribution),Ubuntu)
 
103
  ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
 
104
    hardening_patches += \
 
105
        gcc-default-format-security \
 
106
        gcc-default-fortify-source \
 
107
        gcc-default-relro \
 
108
        testsuite-hardening-format \
 
109
        testsuite-hardening-printf-types \
 
110
        testsuite-hardening-updates
 
111
  endif
 
112
endif
 
113
 
 
114
# FIXME 4.5: Drop and adjust symbols files
 
115
ifneq (,$(findstring 4.4, $(PKGSOURCE)))
 
116
  debian_patches += pr39491
 
117
endif
 
118
 
 
119
ifeq ($(with_ada),yes)
 
120
  debian_patches += \
 
121
        ada-driver-check \
 
122
        ada-gcc-name \
 
123
        ada-default-project-path \
 
124
        ada-symbolic-tracebacks \
 
125
        ada-library-project-files-soname
 
126
 
 
127
  ifeq ($(biarch64),yes)
 
128
    debian_patches += \
 
129
        ada-nobiarch-check
 
130
  endif
 
131
 
 
132
  ifeq ($(with_libgnat),yes)
 
133
    debian_patches += \
 
134
        ada-link-lib \
 
135
        ada-libgnatvsn \
 
136
        ada-libgnatprj \
 
137
        ada-acats
 
138
    ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes)
 
139
      debian_patches += \
 
140
        ada-sjlj
 
141
    endif
 
142
  endif
 
143
 
 
144
  ifneq (,$(findstring $(DEB_TARGET_ARCH_OS),kfreebsd hurd))
 
145
    debian_patches += ada-kfreebsd-gnu \
 
146
        ada-bug564232
 
147
  endif
 
148
 
 
149
  ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
150
    debian_patches += \
 
151
        gcc_ada_gcc-interface_Makefile.in \
 
152
        ada-s-osinte-gnu.adb \
 
153
        ada-s-osinte-gnu.ads \
 
154
        ada-s-taprop-gnu.adb
 
155
  endif
 
156
 
 
157
  debian_patches += \
 
158
        ada-link-shlib
 
159
endif
 
160
 
 
161
ifeq ($(with_d),yes)
 
162
  debian_patches += \
 
163
        gdc-updates \
 
164
        gdc-4.8 \
 
165
        gdc-versym-cpu \
 
166
        gdc-versym-os \
 
167
        gdc-frontend-posix
 
168
#       gdc-multiarch
 
169
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
170
    debian_patches += gdc-4.8-doc
 
171
  else
 
172
    debian_patches += gdc-texinfo
 
173
  endif
 
174
  ifeq ($(with_libphobos),yes)
 
175
    debian_patches += gdc-libphobos-build
 
176
  else
 
177
    debian_patches += gdc-driver-nophobos
 
178
  endif
 
179
  ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386))
 
180
    debian_patches += disable-gdc-tests
 
181
  endif
 
182
else
 
183
  debian_patches += gcc-d-lang
 
184
endif
 
185
 
 
186
ifeq ($(DEB_TARGET_ARCH),alpha)
 
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 libffi-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 += \
 
276
        ada-kfreebsd \
 
277
 
 
278
ifeq ($(with_softfloat),yes)
 
279
  debian_patches += arm-multilib-soft-float
 
280
else ifeq ($(multilib),yes)
 
281
  ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
 
282
    debian_patches += arm-multilib-softfp$(if $(filter yes,$(DEB_CROSS)),-cross)
 
283
  else
 
284
    debian_patches += arm-multilib-soft$(if $(filter yes,$(DEB_CROSS)),-cross)
 
285
  endif
 
286
endif
 
287
debian_patches += arm-multilib-defaults
 
288
 
 
289
ifeq ($(DEB_CROSS),yes)
 
290
  debian_patches += cross-fixes
 
291
  ifeq ($(with_deps_on_target_arch_pkgs),yes)
 
292
    debian_patches += cross-ma-install-location
 
293
  else
 
294
    debian_patches += cross-install-location
 
295
  endif
 
296
endif
 
297
 
 
298
ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
299
  debian_patches += hurd-changes
 
300
endif
 
301
 
 
302
debian_patches += gcc-ice-hack gcc-ice-apport
 
303
#FIXME
 
304
#debian_patches += gold-and-ld
 
305
 
 
306
debian_patches += libjava-fixed-symlinks
 
307
debian_patches += libstdc++-arm-wno-abi
 
308
 
 
309
ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel))
 
310
  # timeouts on the buildd's, Debian
 
311
  debian_patches += libstdc++-no-testsuite
 
312
else ifeq ($(distribution),Ubuntu)
 
313
  # timeouts on the buildd's, Ubuntu only
 
314
  ifneq (,$(filter $(DEB_TARGET_ARCH), armel ia64))
 
315
    debian_patches += libstdc++-no-testsuite
 
316
  endif
 
317
endif
 
318
debian_patches += ada-mips
 
319
debian_patches += libffi-ro-eh_frame_sect
 
320
 
 
321
debian_patches += gcc-multiarch
 
322
ifeq ($(with_multiarch_lib),yes)
 
323
  ifneq ($(single_package),yes)
 
324
    debian_patches += libjava-multiarch
 
325
  endif
 
326
endif
 
327
debian_patches += libjava-nobiarch-check
 
328
debian_patches += config-ml
 
329
ifneq ($(single_package),yes)
 
330
  ifeq ($(with_multiarch_cxxheaders),yes)
 
331
    debian_patches += g++-multiarch-incdir
 
332
  endif
 
333
endif
 
334
ifeq ($(DEB_CROSS),yes)
 
335
  debian_patches += cross-no-locale-include
 
336
endif
 
337
ifeq ($(biarch64),yes)
 
338
  ifeq ($(DEB_CROSS),yes)
 
339
    debian_patches += cross-biarch
 
340
  endif
 
341
endif
 
342
debian_patches += gcc-multilib-multiarch
 
343
ifeq ($(with_ibm_branch),yes)
 
344
  debian_patches += powerpc64le-multilib-definitions
 
345
endif
 
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); 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