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

« back to all changes in this revision

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