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

« back to all changes in this revision

Viewing changes to .svn/pristine/94/94c4dff8cadbf8fb5a2a26708d94825ccdfe3884.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
        pr24619 \
 
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
        aarch64-libjava \
 
77
        libgo-setcontext-config \
 
78
        pr57211 \
 
79
        gcc-auto-build \
 
80
        kfreebsd-unwind \
 
81
        libgcc-no-limits-h \
 
82
        kfreebsd-boehm-gc \
 
83
        pr49847 \
 
84
        libffi-m68k \
 
85
        m68k-picflag \
 
86
        gotest-elfv2 \
 
87
        sys-auxv-header \
 
88
        go-use-gold \
 
89
 
 
90
gdb_depends := $(shell dpkg -s gdb | grep '^Depends:.*libpython3')
 
91
ifneq (,$(findstring libpython3,$(gdb_depends)))
 
92
  debian_patches += libstdc++-python3
 
93
endif
 
94
 
 
95
#       $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \
 
96
#       libstdc++-nothumb-check \
 
97
# TODO: update ...
 
98
#       gcc-cloog-dl \
 
99
#       libjava-rpath \
 
100
 
 
101
hardening_patches =
 
102
ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)
 
103
  hardening_patches += gcc-default-ssp
 
104
  hardening_patches += gcc-default-format-security
 
105
endif
 
106
ifeq ($(distribution),Ubuntu)
 
107
  ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
 
108
    hardening_patches += \
 
109
        gcc-default-fortify-source \
 
110
        gcc-default-relro \
 
111
        testsuite-hardening-format \
 
112
        testsuite-hardening-printf-types \
 
113
        testsuite-hardening-updates
 
114
  endif
 
115
endif
 
116
 
 
117
# FIXME 4.5: Drop and adjust symbols files
 
118
ifneq (,$(findstring 4.4, $(PKGSOURCE)))
 
119
  debian_patches += pr39491
 
120
endif
 
121
 
 
122
ifeq ($(with_ada),yes)
 
123
  debian_patches += \
 
124
        ada-driver-check \
 
125
        ada-gcc-name \
 
126
        ada-default-project-path \
 
127
        ada-symbolic-tracebacks \
 
128
        ada-library-project-files-soname
 
129
 
 
130
  ifeq ($(biarch64),yes)
 
131
    debian_patches += \
 
132
        ada-nobiarch-check
 
133
  endif
 
134
 
 
135
  ifeq ($(with_libgnat),yes)
 
136
    debian_patches += \
 
137
        ada-link-lib \
 
138
        ada-libgnatvsn \
 
139
        ada-libgnatprj \
 
140
        ada-acats
 
141
    ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes)
 
142
      debian_patches += \
 
143
        ada-sjlj
 
144
    endif
 
145
  endif
 
146
 
 
147
  ifneq (,$(findstring $(DEB_TARGET_ARCH_OS),kfreebsd hurd))
 
148
    debian_patches += ada-kfreebsd-gnu \
 
149
        ada-bug564232
 
150
  endif
 
151
 
 
152
  ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
153
    debian_patches += \
 
154
        gcc_ada_gcc-interface_Makefile.in \
 
155
        ada-s-osinte-gnu.adb \
 
156
        ada-s-osinte-gnu.ads \
 
157
        ada-s-taprop-gnu.adb
 
158
  endif
 
159
 
 
160
  debian_patches += \
 
161
        ada-link-shlib
 
162
endif
 
163
 
 
164
ifeq ($(with_d),yes)
 
165
  debian_patches += \
 
166
        gdc-updates \
 
167
        gdc-4.8 \
 
168
        gdc-versym-cpu \
 
169
        gdc-versym-os \
 
170
        gdc-frontend-posix
 
171
#       gdc-multiarch
 
172
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
173
    debian_patches += gdc-4.8-doc
 
174
  else
 
175
    debian_patches += gdc-texinfo
 
176
  endif
 
177
  ifeq ($(with_libphobos),yes)
 
178
    debian_patches += gdc-libphobos-build
 
179
  else
 
180
    debian_patches += gdc-driver-nophobos
 
181
  endif
 
182
  ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386))
 
183
    debian_patches += disable-gdc-tests
 
184
  endif
 
185
else
 
186
  debian_patches += gcc-d-lang
 
187
endif
 
188
 
 
189
ifeq ($(DEB_TARGET_ARCH),alpha)
 
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 ($(DEB_TARGET_ARCH),ppc64)
 
225
  ifeq ($(distribution),Ubuntu)
 
226
    #debian_patches += ibm-branch
 
227
  endif
 
228
endif
 
229
 
 
230
ifeq ($(with_ibm_branch),yes)
 
231
  debian_patches += gcc-ppc64el libffi-ppc64el
 
232
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
233
    debian_patches += gcc-ppc64el-doc
 
234
  endif
 
235
 
 
236
  # this will cause all the configure files to be updated once libtool is patched
 
237
  autotools_files := \
 
238
        ./src/gnattools/configure.ac \
 
239
        ./src/libobjc/configure.ac \
 
240
        ./src/libatomic/configure.ac \
 
241
        ./src/libstdc++-v3/configure.ac \
 
242
        ./src/libgfortran/configure.ac \
 
243
        ./src/boehm-gc/configure.ac \
 
244
        ./src/libsanitizer/configure.ac \
 
245
        ./src/fixincludes/configure.ac \
 
246
        ./src/lto-plugin/configure.ac \
 
247
        ./src/libgcc/configure.ac \
 
248
        ./src/libiberty/configure.ac \
 
249
        ./src/libffi/configure.ac \
 
250
        ./src/zlib/configure.ac \
 
251
        ./src/libbacktrace/configure.ac \
 
252
        ./src/libjava/classpath/configure.ac \
 
253
        ./src/libjava/libltdl/configure.ac \
 
254
        ./src/libjava/configure.ac \
 
255
        ./src/libitm/configure.ac \
 
256
        ./src/intl/configure.ac \
 
257
        ./src/libquadmath/configure.ac \
 
258
        ./src/libada/configure.ac \
 
259
        ./src/libdecnumber/configure.ac \
 
260
        ./src/gcc/configure.ac \
 
261
        ./src/libgo/configure.ac \
 
262
        ./src/libcpp/configure.ac \
 
263
        ./src/configure.ac \
 
264
        ./src/libssp/configure.ac \
 
265
        ./src/libmudflap/configure.ac \
 
266
        ./src/libgomp/configure.ac
 
267
endif
 
268
 
 
269
#debian_patches += link-libs
 
270
 
 
271
# all patches below this line are applied for gcc-snapshot builds as well
 
272
 
 
273
ifeq ($(single_package),yes)
 
274
  debian_patches =
 
275
endif
 
276
 
 
277
debian_patches += gcc-sysroot
 
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
 
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
 
346
ifeq ($(with_ibm_branch),yes)
 
347
  debian_patches += powerpc64le-multilib-definitions
 
348
endif
 
349
 
 
350
ifneq (,$(filter $(derivative),Ubuntu))
 
351
  ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick))
 
352
    debian_patches += gcc-as-needed
 
353
  endif
 
354
else # Debian
 
355
    #debian_patches += gcc-as-needed
 
356
endif
 
357
debian_patches += mips-fix-loongson2f-nop
 
358
ifeq ($(derivative),Ubuntu)
 
359
  ifeq ($(DEB_TARGET_ARCH),ppc64)
 
360
    debian_patches += gcc-ppc64-O3
 
361
  endif
 
362
endif
 
363
debian_patches += libgomp-kfreebsd-testsuite
 
364
 
 
365
series_stamp = $(stampdir)/02-series-stamp
 
366
series: $(series_stamp)
 
367
$(series_stamp):
 
368
        echo $(strip $(addsuffix .diff,$(debian_patches))) \
 
369
          | sed -r 's/  +/ /g' | tr " " "\n" > $(series_file)
 
370
ifneq (,$(strip $(hardening_patches)))
 
371
  ifneq ($(trunk_build),yes)
 
372
        echo $(strip $(addsuffix .diff,$(hardening_patches))) \
 
373
          | sed -r 's/  +/ /g' | tr " " "\n" >> $(series_file)
 
374
  endif
 
375
endif
 
376
        sed -r 's/(.)$$/\1 -p1/' -i $(series_file)
 
377
        touch $@
 
378
 
 
379
autotools_files += $(addprefix ./,$(foreach file,$(shell lsdiff --no-filename \
 
380
        $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \
 
381
        | sed -r 's:[^/]+/src/:src/:' | sort | uniq),$(shell echo $(file) \
 
382
        | egrep 'configure\.(ac|in)|Makefile\.(am|in)|acinclude.m4')))
 
383
 
 
384
autoconf_version = 2.64
 
385
ifeq ($(trunk_build),yes)
 
386
  # The actual version depends on the build-dependencies set by
 
387
  # variable AUTO_BUILD_DEP in rules.conf.  Here, we assume the
 
388
  # correct version is installed.
 
389
  #autoconf_version =
 
390
endif
 
391
 
 
392
# FIXME: the auto* stuff is done every time for every subdir, which
 
393
# leads to build errors. Idea: record the auto* calls in the patch
 
394
# files (AUTO <dir> <auto-command with options>) and run them separately,
 
395
# maybe only once per directory).
 
396
$(patch_stamp): $(unpack_stamp) $(series_stamp)
 
397
        QUILT_PATCHES=$(patchdir) \
 
398
          quilt --quiltrc /dev/null push -a || test $$? = 2
 
399
 
 
400
ifneq (,$(filter svn-updates, $(debian_patches)))
 
401
        awk '/^EOF/ {exit} p==1 {print} /EOF$$/ {p=1}' \
 
402
          $(patchdir)/svn-updates.diff > src/LAST_UPDATED
 
403
endif
 
404
 
 
405
        if ! test -f stamps/autotools_files ; then touch stamps/autotools_files ; fi
 
406
 
 
407
        cd $(srcdir)/fixincludes && ./genfixes
 
408
 
 
409
        for f in $(autotools_files) ; \
 
410
          do case $$f in \
 
411
            */classpath/m4/acinclude.m4) \
 
412
                : ;; \
 
413
            */configure.*|*/acinclude.m4) \
 
414
                if grep ^"$$(md5sum $$f)"$$ stamps/autotools_files >/dev/null ; \
 
415
                  then echo "Skipping already regenerated file $$f." ; \
 
416
                else \
 
417
                  echo "Running autoconf$(autoconf_version) in $$(dirname $$f)..." ; \
 
418
                  dir="$(CURDIR)"; cd $(CURDIR)/$$(dirname $$f) \
 
419
                    && AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version) \
 
420
                    && cd $$dir \
 
421
                    && echo "$$(md5sum $$f)" >> stamps/autotools_files ; \
 
422
                fi ;; \
 
423
            */Makefile.*) ;; \
 
424
            *) echo "Unknown file: $$f"; false; \
 
425
          esac; \
 
426
        done
 
427
 
 
428
        for i in $(debian_patches); do \
 
429
          echo -e "\n$$i:" >> pxxx; \
 
430
          sed -n 's/^# *DP: */  /p' $(patchdir)/$$i.diff >> pxxx; \
 
431
        done
 
432
#       -$(srcdir)/move-if-change pxxx $@
 
433
        mv pxxx $@
 
434
 
 
435
unpatch:
 
436
        QUILT_PATCHES=$(patchdir) \
 
437
          quilt --quiltrc /dev/null pop -a -R || test $$? = 2
 
438
        rm -rf .pc
 
439
        for f in $(autotools_files); do \
 
440
          rm -f $$(echo $$f | sed -r 's/\.(ac|am|in)$$//'); \
 
441
        done
 
442
 
 
443
update-patches: $(series_stamp)
 
444
        export QUILT_PATCHES=$(patchdir); \
 
445
        export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"; \
 
446
        export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"; \
 
447
        while quilt push; do quilt refresh; done
 
448
 
 
449
patch: $(patch_stamp)
 
450
.PHONY: patch series quilt autotools