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

« back to all changes in this revision

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