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

« back to all changes in this revision

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