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

« back to all changes in this revision

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