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

« back to all changes in this revision

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