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

« back to all changes in this revision

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