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

« back to all changes in this revision

Viewing changes to .svn/pristine/f1/f1146b2c3939021c89eaf8ae0ba515a54822e922.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
        gotest-elfv2 \
 
85
 
 
86
gdb_depends := $(shell dpkg -s gdb | grep '^Depends:.*libpython3')
 
87
ifneq (,$(findstring libpython3,$(gdb_depends)))
 
88
  debian_patches += libstdc++-python3
 
89
endif
 
90
 
 
91
#       $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
 
92
#       libstdc++-nothumb-check \
 
93
# TODO: update ...
 
94
#       gcc-cloog-dl \
 
95
#       libjava-rpath \
 
96
 
 
97
hardening_patches =
 
98
ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)
 
99
  hardening_patches += gcc-default-ssp
 
100
endif
 
101
ifeq ($(distribution),Ubuntu)
 
102
  ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
 
103
    hardening_patches += \
 
104
        gcc-default-format-security \
 
105
        gcc-default-fortify-source \
 
106
        gcc-default-relro \
 
107
        testsuite-hardening-format \
 
108
        testsuite-hardening-printf-types \
 
109
        testsuite-hardening-updates
 
110
  endif
 
111
endif
 
112
 
 
113
# FIXME 4.5: Drop and adjust symbols files
 
114
ifneq (,$(findstring 4.4, $(PKGSOURCE)))
 
115
  debian_patches += pr39491
 
116
endif
 
117
 
 
118
ifeq ($(with_ada),yes)
 
119
  debian_patches += \
 
120
        ada-driver-check \
 
121
        ada-gcc-name \
 
122
        ada-default-project-path \
 
123
        ada-symbolic-tracebacks \
 
124
        ada-library-project-files-soname
 
125
 
 
126
  ifeq ($(biarch64),yes)
 
127
    debian_patches += \
 
128
        ada-nobiarch-check
 
129
  endif
 
130
 
 
131
  ifeq ($(with_libgnat),yes)
 
132
    debian_patches += \
 
133
        ada-link-lib \
 
134
        ada-libgnatvsn \
 
135
        ada-libgnatprj \
 
136
        ada-acats
 
137
    ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes)
 
138
      debian_patches += \
 
139
        ada-sjlj
 
140
    endif
 
141
  endif
 
142
 
 
143
  ifneq (,$(findstring $(DEB_TARGET_ARCH_OS),kfreebsd hurd))
 
144
    debian_patches += ada-kfreebsd-gnu \
 
145
        ada-bug564232
 
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
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
187
    debian_patches += alpha-ieee-doc
 
188
  endif
 
189
endif
 
190
 
 
191
ifeq ($(DEB_TARGET_ARCH_CPU),amd64)
 
192
  debian_patches += libjava-testsuite
 
193
endif
 
194
 
 
195
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf))
 
196
  debian_patches += libjava-armel-unwind
 
197
endif
 
198
 
 
199
ifeq ($(DEB_TARGET_ARCH),armhf)
 
200
 debian_patches += gcj-arm-mode
 
201
else ifeq ($(DEB_TARGET_ARCH),armel)
 
202
  ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
 
203
    debian_patches += gcj-arm-mode
 
204
  endif
 
205
endif
 
206
 
 
207
ifeq ($(DEB_TARGET_ARCH),m68k)
 
208
  debian_patches += m68k-ada
 
209
  debian_patches += m68k-revert-pr45144
 
210
  debian_patches += pr52714
 
211
endif
 
212
 
 
213
ifeq ($(DEB_TARGET_ARCH),powerpcspe)
 
214
  debian_patches += powerpc_remove_many
 
215
  debian_patches += powerpc_nofprs
 
216
endif
 
217
 
 
218
ifeq ($(DEB_TARGET_ARCH),ppc64)
 
219
  ifeq ($(distribution),Ubuntu)
 
220
    #debian_patches += ibm-branch
 
221
  endif
 
222
endif
 
223
 
 
224
ifeq ($(with_ibm_branch),yes)
 
225
  debian_patches += gcc-ppc64el libffi-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 += \
 
273
        ada-kfreebsd \
 
274
 
 
275
ifeq ($(with_softfloat),yes)
 
276
  debian_patches += arm-multilib-soft-float
 
277
else ifeq ($(multilib),yes)
 
278
  ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
 
279
    debian_patches += arm-multilib-softfp$(if $(filter yes,$(DEB_CROSS)),-cross)
 
280
  else
 
281
    debian_patches += arm-multilib-soft$(if $(filter yes,$(DEB_CROSS)),-cross)
 
282
  endif
 
283
endif
 
284
debian_patches += arm-multilib-defaults
 
285
 
 
286
ifeq ($(DEB_CROSS),yes)
 
287
  debian_patches += cross-fixes
 
288
  ifeq ($(with_deps_on_target_arch_pkgs),yes)
 
289
    debian_patches += cross-ma-install-location
 
290
  else
 
291
    debian_patches += cross-install-location
 
292
  endif
 
293
endif
 
294
 
 
295
ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
296
  debian_patches += hurd-changes
 
297
endif
 
298
 
 
299
debian_patches += gcc-ice-hack gcc-ice-apport
 
300
#FIXME
 
301
#debian_patches += gold-and-ld
 
302
 
 
303
debian_patches += libjava-fixed-symlinks
 
304
debian_patches += libstdc++-arm-wno-abi
 
305
 
 
306
ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel))
 
307
  # timeouts on the buildd's, Debian
 
308
  debian_patches += libstdc++-no-testsuite
 
309
else ifeq ($(distribution),Ubuntu)
 
310
  # timeouts on the buildd's, Ubuntu only
 
311
  ifneq (,$(filter $(DEB_TARGET_ARCH), armel ia64))
 
312
    debian_patches += libstdc++-no-testsuite
 
313
  endif
 
314
endif
 
315
debian_patches += ada-mips
 
316
debian_patches += libffi-ro-eh_frame_sect
 
317
 
 
318
debian_patches += gcc-multiarch
 
319
ifeq ($(with_multiarch_lib),yes)
 
320
  ifneq ($(single_package),yes)
 
321
    debian_patches += libjava-multiarch
 
322
  endif
 
323
endif
 
324
debian_patches += libjava-nobiarch-check
 
325
debian_patches += config-ml
 
326
ifneq ($(single_package),yes)
 
327
  ifeq ($(with_multiarch_cxxheaders),yes)
 
328
    debian_patches += g++-multiarch-incdir
 
329
  endif
 
330
endif
 
331
ifeq ($(DEB_CROSS),yes)
 
332
  debian_patches += cross-no-locale-include
 
333
endif
 
334
ifeq ($(biarch64),yes)
 
335
  ifeq ($(DEB_CROSS),yes)
 
336
    debian_patches += cross-biarch
 
337
  endif
 
338
endif
 
339
debian_patches += gcc-multilib-multiarch
 
340
ifeq ($(with_ibm_branch),yes)
 
341
  debian_patches += powerpc64le-multilib-definitions
 
342
endif
 
343
 
 
344
ifneq (,$(filter $(derivative),Ubuntu))
 
345
  ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick))
 
346
    debian_patches += gcc-as-needed
 
347
  endif
 
348
else # Debian
 
349
    #debian_patches += gcc-as-needed
 
350
endif
 
351
debian_patches += mips-fix-loongson2f-nop
 
352
ifeq ($(derivative),Ubuntu)
 
353
  ifeq ($(DEB_TARGET_ARCH),ppc64)
 
354
    debian_patches += gcc-ppc64-O3
 
355
  endif
 
356
endif
 
357
debian_patches += libgomp-kfreebsd-testsuite
 
358
 
 
359
series_stamp = $(stampdir)/02-series-stamp
 
360
series: $(series_stamp)
 
361
$(series_stamp):
 
362
        echo $(strip $(addsuffix .diff,$(debian_patches))) \
 
363
          | sed -r 's/  +/ /g' | tr " " "\n" > $(series_file)
 
364
ifneq (,$(strip $(hardening_patches)))
 
365
  ifneq ($(trunk_build),yes)
 
366
        echo $(strip $(addsuffix .diff,$(hardening_patches))) \
 
367
          | sed -r 's/  +/ /g' | tr " " "\n" >> $(series_file)
 
368
  endif
 
369
endif
 
370
        sed -r 's/(.)$$/\1 -p1/' -i $(series_file)
 
371
        touch $@
 
372
 
 
373
autotools_files += $(addprefix ./,$(foreach file,$(shell lsdiff --no-filename \
 
374
        $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \
 
375
        | sed -r 's:[^/]+/src/:src/:' | sort | uniq),$(shell echo $(file) \
 
376
        | egrep 'configure\.(ac|in)|Makefile\.(am|in)|acinclude.m4')))
 
377
 
 
378
autoconf_version = 2.64
 
379
ifeq ($(trunk_build),yes)
 
380
  # The actual version depends on the build-dependencies set by
 
381
  # variable AUTO_BUILD_DEP in rules.conf.  Here, we assume the
 
382
  # correct version is installed.
 
383
  #autoconf_version =
 
384
endif
 
385
 
 
386
# FIXME: the auto* stuff is done every time for every subdir, which
 
387
# leads to build errors. Idea: record the auto* calls in the patch
 
388
# files (AUTO <dir> <auto-command with options>) and run them separately,
 
389
# maybe only once per directory).
 
390
$(patch_stamp): $(unpack_stamp) $(series_stamp)
 
391
        QUILT_PATCHES=$(patchdir) \
 
392
          quilt --quiltrc /dev/null push -a || test $$? = 2
 
393
 
 
394
ifneq (,$(filter svn-updates, $(debian_patches)))
 
395
        awk '/^EOF/ {exit} p==1 {print} /EOF$$/ {p=1}' \
 
396
          $(patchdir)/svn-updates.diff > src/LAST_UPDATED
 
397
endif
 
398
 
 
399
        if ! test -f stamps/autotools_files ; then touch stamps/autotools_files ; fi
 
400
 
 
401
        cd $(srcdir)/fixincludes && ./genfixes
 
402
 
 
403
        for f in $(autotools_files) ; \
 
404
          do case $$f in \
 
405
            */classpath/m4/acinclude.m4) \
 
406
                : ;; \
 
407
            */configure.*|*/acinclude.m4) \
 
408
                if grep ^"$$(md5sum $$f)"$$ stamps/autotools_files >/dev/null ; \
 
409
                  then echo "Skipping already regenerated file $$f." ; \
 
410
                else \
 
411
                  echo "Running autoconf$(autoconf_version) in $$(dirname $$f)..." ; \
 
412
                  dir="$(CURDIR)"; cd $(CURDIR)/$$(dirname $$f) \
 
413
                    && AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version) \
 
414
                    && cd $$dir \
 
415
                    && echo "$$(md5sum $$f)" >> stamps/autotools_files ; \
 
416
                fi ;; \
 
417
            */Makefile.*) ;; \
 
418
            *) echo "Unknown file: $$f"; false; \
 
419
          esac; \
 
420
        done
 
421
 
 
422
        for i in $(debian_patches); do \
 
423
          echo -e "\n$$i:" >> pxxx; \
 
424
          sed -n 's/^# *DP: */  /p' $(patchdir)/$$i.diff >> pxxx; \
 
425
        done
 
426
#       -$(srcdir)/move-if-change pxxx $@
 
427
        mv pxxx $@
 
428
 
 
429
unpatch:
 
430
        QUILT_PATCHES=$(patchdir) \
 
431
          quilt --quiltrc /dev/null pop -a -R || test $$? = 2
 
432
        rm -rf .pc
 
433
        for f in $(autotools_files); do \
 
434
          rm -f $$(echo $$f | sed -r 's/\.(ac|am|in)$$//'); \
 
435
        done
 
436
 
 
437
update-patches: $(series_stamp)
 
438
        export QUILT_PATCHES=$(patchdir); \
 
439
        export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"; \
 
440
        export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"; \
 
441
        while quilt push; do quilt refresh; done
 
442
 
 
443
patch: $(patch_stamp)
 
444
.PHONY: patch series quilt autotools