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

« back to all changes in this revision

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