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

« back to all changes in this revision

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