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

« back to all changes in this revision

Viewing changes to .svn/pristine/b4/b46953721f1b677016864c7fb8cff5890823318d.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.conf
 
3
#       - used to build debian/control and debian/rules.parameters
 
4
#       - assumes unpacked sources
 
5
 
 
6
include debian/rules.defs
 
7
include debian/rules.sonames
 
8
 
 
9
# manual ...
 
10
ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),hppa m68k))
 
11
  ifeq ($(DEB_TARGET_ARCH),m68k)
 
12
    GCC_SONAME := 2
 
13
  endif
 
14
  ifeq ($(DEB_TARGET_ARCH),hppa)
 
15
    GCC_SONAME := 4
 
16
  endif
 
17
  DEB_LIBGCC_SOVERSION := $(DEB_SOVERSION)
 
18
  DEB_LIBGCC_VERSION := $(DEB_VERSION)
 
19
else
 
20
  GCC_SONAME := 1
 
21
  DEB_LIBGCC_SOVERSION := $(DEB_SOEVERSION)
 
22
  DEB_LIBGCC_VERSION := $(DEB_EVERSION)
 
23
endif
 
24
 
 
25
_soname_map = gcc=$(GCC_SONAME) stdc++=$(CXX_SONAME) gomp=$(GOMP_SONAME) \
 
26
        mudflap=$(MUDFLAP_SONAME) ssp=$(SSP_SONAME) gfortran=$(FORTRAN_SONAME) \
 
27
        itm=$(ITM_SONAME) objc=$(OBJC_SONAME) quadmath=$(QUADMATH_SONAME) \
 
28
        go=$(GO_SONAME) backtrace=$(BTRACE_SONAME) \
 
29
        atomic=$(ATOMIC_SONAME) asan=$(ASAN_SONAME) tsan=$(TSAN_SONAME)
 
30
_soname = $(patsubst $(1)=%,%,$(filter $(1)=%,$(_soname_map)))
 
31
 
 
32
# $(call _lib_name,<name>,<biarch>,<ext>)
 
33
_lib_name = $(subst $(SPACE),, \
 
34
  lib$(2)$(1) \
 
35
  $(if $(filter dev,$(3)),,$(call _soname,$(1))) \
 
36
  $(if $(or $(filter $(3),dev),$(and $(filter $(3),dbg),$(filter $(1),stdc++))),-$(BASE_VERSION)) \
 
37
  $(if $(3),-$(3))$(LS)$(AQ))
 
38
# $(call _lib_vers,<ext>,<vers>) 
 
39
_lib_vers = ($(if $(filter $(1),dev),=,>=) $(2))
 
40
 
 
41
# Helper to generate biarch/triarch dependencies.
 
42
# For example, $(eval $(call gen_multilib_deps,gomp)) will create the
 
43
# libgompbiarch variable, and make it contains the libgompbiarch{32,64,n32}
 
44
# variables if biarch{32,64,n32} is set to yes.
 
45
 
 
46
define gen_multilib_deps
 
47
  lib$1biarch64$2  := $(call _lib_name,$(1),64,$(2)) $(call _lib_vers,$(2),$(3))
 
48
  lib$1biarch32$2  := $(call _lib_name,$(1),32,$(2)) $(call _lib_vers,$(2),$(3))
 
49
  lib$1biarchn32$2 := $(call _lib_name,$(1),n32,$(2)) $(call _lib_vers,$(2),$(3))
 
50
  lib$1biarchx32$2 := $(call _lib_name,$(1),x32,$(2)) $(call _lib_vers,$(2),$(3))
 
51
  lib$1biarchhf$2  := $(call _lib_name,$(1),hf,$(2)) $(call _lib_vers,$(2),$(3))
 
52
  lib$1biarchsf$2  := $(call _lib_name,$(1),sf,$(2)) $(call _lib_vers,$(2),$(3))
 
53
  ifeq ($$(biarch64),yes)
 
54
    lib$1biarch$2 := $$(lib$1biarch64$2)
 
55
  endif
 
56
  ifeq ($$(biarch32),yes)
 
57
    ifeq ($$(biarch64),yes)
 
58
      lib$1biarch$2 := $$(lib$1biarch64$2), $$(lib$1biarch32$2)
 
59
    else
 
60
      lib$1biarch$2 := $$(lib$1biarch32$2)
 
61
    endif
 
62
  endif
 
63
  ifeq ($$(biarchx32),yes)
 
64
    ifeq ($$(biarch64),yes)
 
65
      lib$1biarch$2 := $$(lib$1biarch64$2), $$(lib$1biarchx32$2)
 
66
    else ifeq ($$(biarch32),yes)
 
67
      lib$1biarch$2 := $$(lib$1biarch32$2), $$(lib$1biarchx32$2)
 
68
    else
 
69
      lib$1biarch$2 := $$(lib$1biarchx32$2)
 
70
    endif
 
71
  endif
 
72
  ifeq ($$(biarchn32),yes)
 
73
    ifeq ($$(biarch64),yes)
 
74
      lib$1biarch$2 := $$(lib$1biarch64$2), $$(lib$1biarchn32$2)
 
75
    else
 
76
      lib$1biarch$2 := $$(lib$1biarchn32$2)
 
77
    endif
 
78
  endif
 
79
  ifeq ($$(biarchhf),yes)
 
80
    lib$1biarch$2 := $$(lib$1biarchhf$2) | $(call _lib_name,$(1),hf,$(2))
 
81
  endif
 
82
  ifeq ($$(biarchsf),yes)
 
83
    lib$1biarch$2 := $$(lib$1biarchsf$2) | $(call _lib_name,$(1),sf,$(2))
 
84
  endif
 
85
endef
 
86
ifeq ($(with_shared_libgcc),yes)
 
87
  LIBGCC_DEP := libgcc$(GCC_SONAME)$(LS)$(AQ) (>= $(DEB_LIBGCC_VERSION))
 
88
  $(eval $(call gen_multilib_deps,gcc,,$(DEB_LIBGCC_VERSION)))
 
89
endif
 
90
$(foreach x,stdc++ gomp mudflap ssp gfortran itm objc atomic asan quadmath go, \
 
91
        $(eval $(call gen_multilib_deps,$(x),,$$$${gcc:Version})))
 
92
$(foreach x,gcc stdc++ gfortran objc go, \
 
93
        $(eval $(call gen_multilib_deps,$(x),dev,$$$${gcc:Version})))
 
94
$(foreach x,gcc stdc++ gfortran objc go, \
 
95
        $(eval $(call gen_multilib_deps,$(x),dbg,$$$${gcc:Version})))
 
96
 
 
97
# Helper to generate _no_archs variables.
 
98
# For example, $(eval $(call gen_no_archs,java)) will create the java_no_archs
 
99
# variable, using the java_no_cpu and java_no_systems variables.
 
100
define gen_no_archs
 
101
  $1_no_archs :=
 
102
  ifneq (,$$($1_no_cpus))
 
103
    $1_no_archs += $$(foreach cpu,$$(filter-out i386 amd64 alpha arm,$$($1_no_cpus)),!$$(cpu))
 
104
    ifneq (,$$(filter i386,$$($1_no_cpus)))
 
105
      $1_no_archs += !i386 !hurd-i386 !kfreebsd-i386
 
106
    endif
 
107
    ifneq (,$$(filter amd64,$$($1_no_cpus)))
 
108
      $1_no_archs += !amd64 !kfreebsd-amd64
 
109
    endif
 
110
    ifneq (,$$(filter alpha,$$($1_no_cpus)))
 
111
      $1_no_archs += !alpha !hurd-alpha
 
112
    endif
 
113
    ifneq (,$$(filter arm,$$($1_no_cpus)))
 
114
      $1_no_archs += !arm !armel !armhf
 
115
    endif
 
116
    ifneq (,$$(strip $3))
 
117
      $1_no_systems_tmp := $$(subst $$(SPACE)gnu$$(SPACE),$$(SPACE)hurd-gnu$$(SPACE),$$(SPACE)$3$$(SPACE))
 
118
      $1_no_archs += $$(foreach cpu,$$($1_no_cpus),$$(foreach system,$$($1_no_systems_tmp),!$$(subst gnu,$$(cpu),$$(system))))
 
119
    endif
 
120
  endif
 
121
  ifneq (,$$($1_no_systems))
 
122
    $1_no_systems_tmp := $$(subst $$(SPACE)gnu$$(SPACE),$$(SPACE)hurd-gnu$$(SPACE),$$(SPACE)$$($1_no_systems)$$(SPACE))
 
123
    $1_no_archs += $$(foreach system,$$($1_no_systems_tmp),$$(foreach cpu,$2,!$$(subst gnu,$$(cpu),$$(system))))
 
124
  endif
 
125
  $1_no_archs := $$(strip $$($1_no_archs))
 
126
endef
 
127
base_deb_cpus := amd64 i386 alpha
 
128
base_deb_systems :=
 
129
$(foreach x,ada java java_plugin fortran libphobos libgc check locale,$(eval $(call gen_no_archs,$(x),$(base_deb_cpus),$(base_deb_systems))))
 
130
linux_no_archs := !hurd-any !kfreebsd-any
 
131
 
 
132
GCC_VERSION := $(strip $(shell cat $(firstword $(wildcard $(srcdir)/gcc/FULL-VER $(srcdir)/gcc/BASE-VER))))
 
133
NEXT_GCC_VERSION := $(shell echo $(GCC_VERSION) | \
 
134
        awk -F. '{OFS="."; if (NF==2) $$3=1; else $$NF += 1; print}')
 
135
GCC_MAJOR_VERSION := $(shell echo $(GCC_VERSION)   | sed -r 's/([0-9])\.[0-9]\.[0-9]/\1/')
 
136
GCC_MINOR_VERSION := $(shell echo $(GCC_VERSION)   | sed -r 's/[0-9]\.([0-9])\.[0-9]/\1/')
 
137
GCC_RELEASE_VERSION := $(shell echo $(GCC_VERSION) | sed -r 's/[0-9]\.[0-9]\.([0-9])/\1/')
 
138
NEXT_GCC_MAJOR_VERSION := $(shell expr $(echo $(GCC_MAJOR_VERSION)) + 1)
 
139
NEXT_GCC_MINOR_VERSION := $(shell expr $(echo $(GCC_MINOR_VERSION)) + 1)
 
140
NEXT_GCC_RELEASE_VERSION := $(shell expr $(echo $(GCC_MAJOR_VERSION)) + 1)
 
141
 
 
142
ifeq ($(single_package),yes)
 
143
  BASE_VERSION := $(shell echo $(GCC_VERSION) | sed -e 's/\([1-9]\.[0-9]\).*/\1/')
 
144
endif
 
145
 
 
146
GCC_SOURCE_VERSION := $(shell echo $(DEB_VERSION) | sed 's/-.*//')
 
147
NEXT_GCC_SOURCE_VERSION := $(shell echo $(GCC_SOURCE_VERSION) | \
 
148
        awk -F. '{OFS="."; if (NF==2) $$3=1; else $$NF += 1; print}')
 
149
 
 
150
MAINTAINER = Debian GCC Maintainers <debian-gcc@lists.debian.org>
 
151
ifeq ($(distribution),Ubuntu)
 
152
  ifneq (,$(findstring $(PKGSOURCE),gnat gdc))
 
153
    MAINTAINER = Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
 
154
  else
 
155
    MAINTAINER = Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
 
156
  endif
 
157
endif
 
158
 
 
159
UPLOADERS = Matthias Klose <doko@debian.org>
 
160
ifneq (,$(findstring $(PKGSOURCE),gnat))
 
161
  UPLOADERS = Ludovic Brenta <lbrenta@debian.org>
 
162
endif
 
163
ifneq (,$(findstring $(PKGSOURCE),gdc))
 
164
  UPLOADERS = Iain Buclaw <ibuclaw@ubuntu.com>, Matthias Klose <doko@debian.org>
 
165
endif
 
166
 
 
167
DPKGV = 1.14.15
 
168
ifeq ($(with_multiarch_lib),yes)
 
169
  DPKGV = 1.16.0~ubuntu4
 
170
endif
 
171
ifeq ($(multiarch_stage1),yes)
 
172
  DPKGV = 1.16.0~ubuntu4
 
173
endif
 
174
DPKG_BUILD_DEP = dpkg-dev (>= $(DPKGV)),
 
175
 
 
176
# The binutils version needed.
 
177
# The oldest suitable versions for the various platforms can be found in
 
178
# INSTALL/specific.html ; we take a tighter dependency if possible to be on
 
179
# the safe side (something like newest( version in stable, versions for the
 
180
# various platforms in INSTALL/specific.html) ).
 
181
# We need binutils (>= 2.19.1) for a new dwarf unwind expression opcode.
 
182
# See http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01713.html
 
183
ifeq ($(trunk_build),yes)
 
184
  BINUTILSBDV = 2.23
 
185
else
 
186
  BINUTILSBDV = 2.22
 
187
  ifneq (,$(filter $(distrelease),jessie sid saucy))
 
188
    BINUTILSBDV = 2.23.52
 
189
  endif
 
190
endif
 
191
ifeq ($(DEB_CROSS),yes)
 
192
  BINUTILS_BUILD_DEP = binutils$(TS) (>= $(BINUTILSBDV)), binutils-multiarch (>= $(BINUTILSBDV))
 
193
  BINUTILSV := $(shell dpkg -l binutils$(TS) \
 
194
                        | awk '/^ii/{print $$3;exit}' | sed 's/-.*//')
 
195
else
 
196
  BINUTILS_BUILD_DEP = binutils (>= $(BINUTILSBDV)) | binutils-multiarch (>= $(BINUTILSBDV))
 
197
  ifeq ($(REVERSE_CROSS),yes)
 
198
    BINUTILSV := $(shell dpkg -l binutils$(TS) \
 
199
                        | awk '/^ii/{print $$3;exit}' | sed 's/-.*//')
 
200
  else
 
201
    BINUTILSV := $(shell dpkg -l binutils binutils-multiarch \
 
202
                        | awk '/^ii/{print $$3;exit}' | sed 's/-.*//')
 
203
  endif
 
204
endif
 
205
ifeq (,$(BINUTILSV))
 
206
  BINUTILSV := $(BINUTILSBDV)
 
207
endif
 
208
 
 
209
# FIXME; stripping doesn't work with gold
 
210
#BINUTILS_BUILD_DEP += , binutils-gold (>= $(BINUTILSV)) [$(gold_archs)]
 
211
 
 
212
# libc-dev dependencies
 
213
libc_ver := 2.11
 
214
libc_dev_ver := $(libc_ver)
 
215
ifeq ($(with_multiarch_lib),yes)
 
216
  ifeq ($(distribution),Debian)
 
217
    libc_dev_ver := 2.13-5
 
218
    #ifeq (,$(filter arm, $(go_no_cpus)))
 
219
    #  libc_dev_ver := 2.13-31
 
220
    #endif
 
221
  else
 
222
    libc_dev_ver := 2.13-0ubuntu6
 
223
  endif
 
224
endif
 
225
ifeq ($(DEB_TARGET_ARCH_OS),linux)
 
226
  ifneq (,$(findstring $(DEB_TARGET_ARCH),alpha ia64))
 
227
    LIBC_DEP = libc6.1
 
228
  else
 
229
    LIBC_DEP = libc6
 
230
  endif
 
231
else
 
232
  ifeq ($(DEB_TARGET_ARCH_OS),hurd)
 
233
    LIBC_DEP = libc0.3
 
234
  endif
 
235
  ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd)
 
236
    LIBC_DEP = libc0.1
 
237
  endif
 
238
  ifeq ($(DEB_TARGET_ARCH),uclibc)
 
239
       LIBC_DEP ?= libuclibc
 
240
       LIBC_DEV_DEP ?= libuclibc-dev
 
241
  endif
 
242
endif
 
243
LIBC_DEV_DEP = $(LIBC_DEP)-dev
 
244
# for cross
 
245
ifeq ($(DEB_CROSS),yes)
 
246
  LIBC_DEP ?= $(LIBC_DEP)$(LS)$(AQ)
 
247
  LIBC_DEV_DEP ?= $(LIBC_DEV_DEP)$(LS)$(AQ)
 
248
else
 
249
  LIBC_DBG_DEP = libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg,
 
250
endif
 
251
 
 
252
# this is about Debian archs name, *NOT* GNU target triplet
 
253
biarch_deb_map := \
 
254
        i386=amd64 amd64=i386 \
 
255
        mips=mips64 mipsel=mips64 \
 
256
        powerpc=ppc64 ppc64=powerpc \
 
257
        sparc=sparc64 \
 
258
        s390=s390x s390x=s390 \
 
259
        kfreebsd-amd64=i386 \
 
260
        armel=armhf \
 
261
        armhf=armel
 
262
biarch_deb_arch := $(patsubst $(DEB_TARGET_ARCH)=%,%, \
 
263
        $(filter $(DEB_TARGET_ARCH)=%,$(biarch_deb_map)))
 
264
 
 
265
LIBC_BIARCH_DEP :=
 
266
LIBC_BIARCH_DEV_DEP :=
 
267
ifneq (,$(findstring yes,$(biarch64) $(biarch32) $(biarchn32) $(biarchx32)$(biarchhf)$(biarchsf)))
 
268
  LIBC_BIARCH_DEP := $${shlibs:Depends}
 
269
  LIBC_BIARCH_DEV_DEP := $(LIBC_DEV_DEP)-$(biarch_deb_arch)$(LS)$(AQ) (>= $(libc_ver))
 
270
  ifeq ($(biarch64)$(biarch32),yesyes)
 
271
    LIBC_BIARCH_DEV_DEP := $(LIBC_DEV_DEP)-amd64$(LS)$(AQ) (>= $(libc_ver)), $(LIBC_DEV_DEP)-i386$(LS)$(AQ) (>= $(libc_ver))
 
272
  endif
 
273
  ifeq ($(biarch64)$(biarchx32),yesyes)
 
274
    LIBC_BIARCH_DEV_DEP := $(LIBC_DEV_DEP)-amd64$(LS)$(AQ) (>= $(libc_ver)), $(LIBC_DEV_DEP)-x32$(LS)$(AQ) (>= $(libc_ver))
 
275
  endif
 
276
  ifeq ($(biarch32)$(biarchx32),yesyes)
 
277
    LIBC_BIARCH_DEV_DEP := $(LIBC_DEV_DEP)-i386$(LS)$(AQ) (>= $(libc_ver)), $(LIBC_DEV_DEP)-x32$(LS)$(AQ) (>= $(libc_ver))
 
278
  endif
 
279
  ifeq ($(biarchn32),yes)
 
280
    ifneq (,$(findstring $(DEB_TARGET_ARCH),mips mipsel))
 
281
      triarch :=
 
282
      ifeq ($(biarch64),yes)
 
283
        triarch := $(COMMA)$(SPACE)
 
284
      endif
 
285
      LIBC_BIARCH_DEV_DEP += $(triarch)libc6-dev-mipsn32$(LS)$(AQ) (>= $(libc_ver))
 
286
    endif
 
287
  endif
 
288
  ifeq ($(biarchhf),yes)
 
289
    LIBC_BIARCH_DEP := $(LIBC_DEP)-$(biarch_deb_arch)$(LS)$(AQ) (>= $(libc_ver))
 
290
    LIBC_BIARCH_DEP += | $(LIBC_DEP)-$(biarch_deb_arch)$(LS)$(AQ)
 
291
    LIBC_BIARCH_DEV_DEP += | $(LIBC_DEV_DEP)-$(biarch_deb_arch)$(LS)$(AQ)
 
292
  endif
 
293
  ifeq ($(biarchsf),yes)
 
294
    LIBC_BIARCH_DEP := $(LIBC_DEP)-$(biarch_deb_arch)$(LS)$(AQ) (>= $(libc_ver))
 
295
    LIBC_BIARCH_DEP += | $(LIBC_DEP)-$(biarch_deb_arch)$(LS)$(AQ)
 
296
    LIBC_BIARCH_DEV_DEP += | $(LIBC_DEV_DEP)-$(biarch_deb_arch)$(LS)$(AQ)
 
297
  endif
 
298
endif
 
299
 
 
300
# Add suffix and required version
 
301
LIBC_DEV_DEP := $(LIBC_DEV_DEP)$(LS)$(AQ) (>= $(libc_dev_ver))
 
302
# TODO: make this automatic, there must be a better way to define LIBC_DEP.
 
303
ifneq ($(DEB_CROSS),yes)
 
304
  LIBC_BUILD_DEP = libc6.1-dev (>= $(libc_dev_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_dev_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_dev_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_dev_ver))
 
305
  ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric))
 
306
    LIBC_BUILD_DEP += , libc6-dev (>= 2.13-31) [armel armhf]
 
307
  endif
 
308
  LIBC_BIARCH_BUILD_DEP = libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 s390x x32], libn32gcc1 [mips mipsel], lib64gcc1 [i386 mips mipsel powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel],
 
309
ifneq (,$(findstring amd64,$(biarchx32archs)))
 
310
  LIBC_BIARCH_BUILD_DEP += libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386],
 
311
endif
 
312
ifneq (,$(findstring armel,$(biarchhfarchs)))
 
313
  LIBC_BIARCH_BUILD_DEP += libc6-dev-armhf [armel], libhfgcc1 [armel],
 
314
endif
 
315
ifneq (,$(findstring armhf,$(biarchsfarchs)))
 
316
  LIBC_BIARCH_BUILD_DEP += libc6-dev-armel [armhf], libsfgcc1 [armhf],
 
317
endif
 
318
else
 
319
  LIBC_BUILD_DEP = $(LIBC_DEV_DEP),
 
320
  ifneq ($(LIBC_BIARCH_DEV_DEP),)
 
321
    LIBC_BIARCH_BUILD_DEP = $(LIBC_BIARCH_DEV_DEP),
 
322
  else
 
323
    LIBC_BIARCH_BUILD_DEP =
 
324
  endif
 
325
endif
 
326
 
 
327
# needed for the include/asm symlink to run the testsuite for
 
328
# non default multilibs
 
329
GCC_MULTILIB_BUILD_DEP = g++-multilib [$(multilib_archs)],
 
330
 
 
331
LIBUNWIND_DEV_DEP := libunwind7-dev$(LS)$(AQ) (>= 0.98.5-6)
 
332
LIBUNWIND_BUILD_DEP := $(LIBUNWIND_DEV_DEP) [ia64],
 
333
LIBATOMIC_OPS_BUILD_DEP := libatomic-ops-dev$(LS) [ia64],
 
334
ifneq ($(DEB_TARGET_ARCH),ia64)
 
335
  LIBUNWIND_DEV_DEP := # nothing
 
336
endif
 
337
 
 
338
ifneq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty))
 
339
  GMP_BUILD_DEP = libgmp3-dev | libgmp-dev (>= 2:5.0.1~),
 
340
  MPFR_BUILD_DEP = libmpfr-dev,
 
341
else
 
342
  GMP_BUILD_DEP = libgmp-dev (>= 2:5.0.1~),
 
343
  MPFR_BUILD_DEP = libmpfr-dev (>= 3.0.0-9~),
 
344
endif
 
345
 
 
346
PPL_BUILD_DEP = libisl-dev,
 
347
CLOOG_BUILD_DEP = libcloog-isl-dev (>= 0.18),
 
348
# FIXME: currently not dl'opened.
 
349
#CLOOG_RUNTIME_DEP = libisl10, libcloog-isl4
 
350
 
 
351
ifneq (,$(filter $(distrelease),lenny etch squeeze wheezy dapper hardy jaunty karmic lucid maverick natty oneiric precise quantal raring))
 
352
  MPC_BUILD_DEP = libmpc-dev,
 
353
else
 
354
  MPC_BUILD_DEP = libmpc-dev (>= 1.0),
 
355
endif
 
356
 
 
357
SOURCE_BUILD_DEP :=
 
358
ifeq (,$(findstring gcc,$(PKGSOURCE)))
 
359
  SOURCE_BUILD_DEP := gcc-$(BASE_VERSION)-source (>= $(GCC_SOURCE_VERSION)), gcc-$(BASE_VERSION)-source (<< $(NEXT_GCC_SOURCE_VERSION)),
 
360
endif
 
361
 
 
362
CHECK_BUILD_DEP := dejagnu [$(check_no_archs)],
 
363
ifneq (,$(findstring gcc,$(PKGSOURCE)))
 
364
  CHECK_BUILD_DEP += autogen,
 
365
endif
 
366
 
 
367
AUTO_BUILD_DEP := m4, libtool,
 
368
AUTO_BUILD_DEP += autoconf2.64,
 
369
 
 
370
ifneq ($(DEB_CROSS),yes)
 
371
JAVA_BUILD_DEP := zlib1g-dev, libantlr-java, python, libffi-dev,
 
372
 
 
373
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
374
  bd_java_archs =
 
375
else ifeq ($(single_package)-$(with_java),yes-yes)
 
376
  bd_java_archs =
 
377
else
 
378
  bd_java_archs = $(if $(java_no_archs),$(EMPTY) [$(java_no_archs)])
 
379
endif
 
380
 
 
381
ifneq (,$(java_awt_peers))
 
382
  JAVA_BUILD_DEP += fastjar$(bd_java_archs), libmagic-dev$(bd_java_archs),
 
383
  JAVA_BUILD_DEP += libecj-java (>= 3.3.0-2)$(bd_java_archs), zip$(bd_java_archs),
 
384
  ifeq ($(with_java_maintainer_mode),yes)
 
385
    # gcj-4.8 needed for gjavah-4.8.
 
386
    JAVA_BUILD_DEP += gcj-4.8$(bd_java_archs), ecj (>= 3.3.0-2)$(bd_java_archs),
 
387
  endif
 
388
  JAVA_BUILD_DEP += libasound2-dev [$(java_no_archs) $(linux_no_archs)],
 
389
  ifneq (,$(findstring gtk,$(java_awt_peers)))
 
390
    JAVA_BUILD_DEP += libxtst-dev$(bd_java_archs), libxt-dev$(bd_java_archs), libgtk2.0-dev (>= 2.4.4-2)$(bd_java_archs), libart-2.0-dev$(bd_java_archs), libcairo2-dev$(bd_java_archs),
 
391
  endif
 
392
  ifneq (,$(findstring qt,$(java_awt_peers)))
 
393
    JAVA_BUILD_DEP += libqt4-dev (>= 4.1.0)$(bd_java_archs),
 
394
  endif
 
395
  # gconf peer, disabled by default
 
396
  #JAVA_BUILD_DEP += libgconf2-dev$(bd_java_archs),
 
397
  # gstreamer peer
 
398
  #JAVA_BUILD_DEP += libgstreamer-plugins-base0.10-dev$(bd_java_archs),
 
399
  ifneq ($(single_package),yes)
 
400
    JAVA_BUILD_DEP += g++-4.8 [armel armhf],
 
401
  endif
 
402
endif
 
403
ifneq ($(with_standalone_gcj),yes)
 
404
  ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
405
    JAVA_BUILD_DEP += $(SOURCE_BUILD_DEP)
 
406
  endif
 
407
endif
 
408
#JAVA_BUILD_INDEP := gcj-$(BASE_VERSION)-jdk
 
409
ifeq ($(single_package),yes)
 
410
  LIBSTDCXX_BUILD_INDEP = doxygen (>= 1.7.2), graphviz (>= 2.2), ghostscript, texlive-latex-base
 
411
  LIBSTDCXX_BUILD_INDEP +=, xsltproc, libxml2-utils, docbook-xsl-ns
 
412
  JAVA_BUILD_INDEP :=
 
413
endif
 
414
ifeq ($(with_separate_libgcj),yes)
 
415
  ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
416
    JAVA_BUILD_DEP :=
 
417
    JAVA_BUILD_INDEP :=
 
418
  endif
 
419
endif
 
420
 
 
421
ifeq ($(with_ecj),yes)
 
422
  ifneq (./,$(dir $(ecj_jar)))
 
423
    ECJ_DEP = libecj-java (>= 3.5.1)
 
424
  endif
 
425
else
 
426
  ECJ_DEP = ecj, libecj-java (>= 3.5.1)
 
427
  ECJ_DEP = ecj-gcj, libecj-java-gcj (>= 3.5.1)
 
428
  ifneq (,$(filter $(DEB_HOST_ARCH),arm armel armhf))
 
429
    ECJ_DEP +=, ecj1
 
430
  endif
 
431
endif
 
432
 
 
433
ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
434
  LIBSTDCXX_BUILD_INDEP = doxygen (>= 1.7.2), graphviz (>= 2.2), ghostscript, texlive-latex-base
 
435
  ifeq (,$(filter $(distrelease),lenny etch dapper hardy jaunty karmic lucid maverick natty oneiric))
 
436
    LIBSTDCXX_BUILD_INDEP +=, xsltproc, libxml2-utils, docbook-xsl-ns
 
437
  endif
 
438
  JAVA_BUILD_INDEP :=, $(JAVA_BUILD_INDEP)
 
439
endif
 
440
 
 
441
# FIXME: needs zlib?
 
442
GO_BUILD_DEP := g++-4.6,
 
443
GO_BUILD_DEP := netbase,
 
444
 
 
445
ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
446
  ifneq ($(with_separate_gnat),yes)
 
447
    # Build gnat as part of the combiled gcc-x.y source package.  Do not fail
 
448
    # if gnat is not present on unsupported architectures; the build scripts
 
449
    # will not use gnat anyway.
 
450
    GNAT_BUILD_DEP := gnat (>= 4.1) [$(ada_no_archs)],
 
451
  endif
 
452
else ifeq ($(single_package),yes)
 
453
  # Ditto, as part of the gcc-snapshot package.
 
454
  # FIXME: ad hoc dependency, better fix setting of ada_no_archs
 
455
  #GNAT_BUILD_DEP := gnat (>= 4.1) [$(ada_no_archs)], gcc-snapshot (>= 20090821-1) [armel armhf],
 
456
  GNAT_BUILD_DEP := gnat (>= 4.1) [!arm !armhf !powerpcspe !sh4 !sparc64 !hurd-i386],
 
457
else ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
 
458
  # Special source package just for gnat. Fail early if gnat is not present,
 
459
  # rather than waste CPU cycles and fail later.
 
460
  GNAT_BUILD_DEP := gnat (>= 4.1),
 
461
  GNAT_BUILD_DEP += $(SOURCE_BUILD_DEP)
 
462
  JAVA_BUILD_DEP :=
 
463
  JAVA_BUILD_INDEP :=
 
464
  GDC_BUILD_DEP :=
 
465
  GO_BUILD_DEP :=
 
466
else ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
467
  # Special source package just for gcj.
 
468
  GNAT_BUILD_DEP :=
 
469
  GDC_BUILD_DEP :=
 
470
  GO_BUILD_DEP :=
 
471
else ifeq ($(PKGSOURCE),gdc-$(BASE_VERSION))
 
472
  # Special source package just for gdc.
 
473
  GNAT_BUILD_DEP :=
 
474
  JAVA_BUILD_DEP :=
 
475
  JAVA_BUILD_INDEP :=
 
476
  GDC_BUILD_DEP := $(SOURCE_BUILD_DEP)
 
477
  GO_BUILD_DEP :=
 
478
else ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
 
479
  # Special source package just for gccgo.
 
480
  GNAT_BUILD_DEP :=
 
481
  JAVA_BUILD_DEP :=
 
482
  JAVA_BUILD_INDEP :=
 
483
  GDC_BUILD_DEP := $(SOURCE_BUILD_DEP)
 
484
endif
 
485
 
 
486
else
 
487
# build cross compiler
 
488
  CROSS_BUILD_DEP := libc6-dev$(cross_lib_arch),
 
489
ifeq ($(REVERSE_CROSS),yes)
 
490
  CROSS_BUILD_DEP += zlib1g-dev$(cross_lib_arch), libmpfr-dev$(cross_lib_arch),
 
491
endif
 
492
  SOURCE_BUILD_DEP :=
 
493
  ifeq (,$(findstring gcc,$(PKGSOURCE)))
 
494
    SOURCE_BUILD_DEP := gcc-$(BASE_VERSION)-source (>= $(GCC_SOURCE_VERSION)), gcc-$(BASE_VERSION)-source (<< $(NEXT_GCC_SOURCE_VERSION)),
 
495
  endif
 
496
  ifeq ($(with_java),yes)
 
497
    JAVA_BUILD_DEP := zlib1g-dev, lib64z1-dev [i386 powerpc sparc s390], lib32z1-dev [amd64 ppc64 kfreebsd-amd64 s390x],
 
498
  endif
 
499
  JAVA_BUILD_INDEP :=
 
500
  GNAT_BUILD_DEP :=
 
501
endif # cross compiler
 
502
 
 
503
# The numeric part of the gcc version number (x.yy.zz)
 
504
NEXT_GCC_VERSION := $(shell echo $(GCC_VERSION) | \
 
505
                awk -F. '{OFS="."; if (NF==2) $$3=1; else $$NF += 1; print}')
 
506
# first version with a new path component in gcc_lib_dir (i.e. GCC_VERSION
 
507
# or TARGET_ALIAS changes), or last version available for all architectures
 
508
DEB_GCC_SOFT_VERSION := 4.8
 
509
DEB_GCJ_SOFT_VERSION := 4.8
 
510
 
 
511
ifeq ($(with_d),yes)
 
512
  GDC_VERSION := $(BASE_VERSION)
 
513
  DEB_GDC_VERSION := $(DEB_VERSION)
 
514
endif
 
515
 
 
516
# semiautomatic ...
 
517
DEB_SOVERSION           := $(DEB_VERSION)
 
518
DEB_SOVERSION           := 4.8
 
519
DEB_SOEVERSION          := $(EPOCH):4.8
 
520
DEB_STDCXX_SOVERSION    := 4.8
 
521
DEB_GCJ_SOVERSION       := 4.8
 
522
DEB_GOMP_SOVERSION      := $(DEB_SOVERSION)
 
523
DEB_GCCMATH_SOVERSION   := $(DEB_SOVERSION)
 
524
 
 
525
DEB_GCC_VERSION := $(DEB_VERSION)
 
526
DEB_GCJ_VERSION := $(DEB_VERSION)
 
527
ifeq ($(with_separate_libgcj),yes)
 
528
  ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
529
    DEB_GCC_VERSION := $(DEB_GCC_SOFT_VERSION)
 
530
  endif
 
531
endif
 
532
 
 
533
DEB_GNAT_VERSION := $(DEB_VERSION)
 
534
ifeq ($(with_separate_gnat),yes)
 
535
  ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
 
536
    DEB_GCC_VERSION := $(DEB_GCC_SOFT_VERSION)
 
537
  endif
 
538
endif
 
539
 
 
540
GNAT_VERSION := $(BASE_VERSION)
 
541
 
 
542
LIBGNAT_DEP :=
 
543
ifeq ($(with_libgnat),yes)
 
544
  LIBGNAT_DEP := libgnat-$(GNAT_VERSION) (= $(DEB_VERSION))
 
545
endif
 
546
 
 
547
pkg_ver := -$(BASE_VERSION)
 
548
 
 
549
PKG_GCJ_EXT = $(GCJ_SONAME1)
 
550
PKG_LIBGCJ_EXT = $(GCJ_SONAME1)$(if $(GCJ_SONAME2),-$(GCJ_SONAME2))
 
551
 
 
552
ctrl_flags = \
 
553
        -DBINUTILSV=$(BINUTILSV) \
 
554
        -DBINUTILSBDV=$(BINUTILSBDV) \
 
555
        -DSRCNAME=$(PKGSOURCE) \
 
556
        -D__$(DEB_TARGET_GNU_CPU)__ \
 
557
        -DARCH=$(DEB_TARGET_ARCH) \
 
558
        -DDIST=$(distribution)
 
559
 
 
560
ctrl_flags += \
 
561
        -DLIBC_DEV_DEP="$(LIBC_DEV_DEP)" \
 
562
        -DLIBC_BIARCH_BUILD_DEP="$(LIBC_BIARCH_BUILD_DEP)" \
 
563
        -DLIBC_DBG_DEP="$(LIBC_DBG_DEP)" \
 
564
        -DFORTRAN_BUILD_DEP="$(FORTRAN_BUILD_DEP)" \
 
565
        -DGNAT_BUILD_DEP="$(GNAT_BUILD_DEP)" \
 
566
        -DJAVA_BUILD_DEP="$(JAVA_BUILD_DEP)" \
 
567
        -DGO_BUILD_DEP="$(GO_BUILD_DEP)" \
 
568
        -DJAVA_BUILD_INDEP="$(JAVA_BUILD_INDEP)" \
 
569
        -DLIBSTDCXX_BUILD_INDEP="$(LIBSTDCXX_BUILD_INDEP)" \
 
570
        -DGDC_BUILD_DEP="$(GDC_BUILD_DEP)" \
 
571
        -DBINUTILS_BUILD_DEP="$(BINUTILS_BUILD_DEP)" \
 
572
        -DLIBC_BUILD_DEP="$(LIBC_BUILD_DEP)" \
 
573
        -DCHECK_BUILD_DEP="$(CHECK_BUILD_DEP)" \
 
574
        -DAUTO_BUILD_DEP="$(AUTO_BUILD_DEP)" \
 
575
        -DAUTOGEN_BUILD_DEP="$(AUTOGEN_BUILD_DEP)" \
 
576
        -DCLOOG_BUILD_DEP="$(CLOOG_BUILD_DEP)" \
 
577
        -DGMP_BUILD_DEP="$(GMP_BUILD_DEP)" \
 
578
        -DMPFR_BUILD_DEP="$(MPFR_BUILD_DEP)" \
 
579
        -DMPC_BUILD_DEP="$(MPC_BUILD_DEP)" \
 
580
        -DDPKG_BUILD_DEP="$(DPKG_BUILD_DEP)" \
 
581
        -DSOURCE_BUILD_DEP="$(SOURCE_BUILD_DEP)" \
 
582
        -DCROSS_BUILD_DEP="$(CROSS_BUILD_DEP)" \
 
583
        -DGCC_MULTILIB_BUILD_DEP='$(GCC_MULTILIB_BUILD_DEP)' \
 
584
        -DMULTILIB_ARCHS="$(multilib_archs)" \
 
585
        -DNEON_ARCHS="$(neon_archs)" \
 
586
        -DTP=$(TP) \
 
587
        -DTS=$(TS) \
 
588
        -DLS=$(LS) \
 
589
        -DAQ=$(AQ)
 
590
 
 
591
ifeq ($(DEB_CROSS),yes)
 
592
  ctrl_flags += \
 
593
        -DTARGET=$(DEB_TARGET_ARCH) \
 
594
        -DLIBUNWIND_BUILD_DEP="$(LIBUNWIND_BUILD_DEP)" \
 
595
        -DLIBATOMIC_OPS_BUILD_DEP="$(LIBATOMIC_OPS_BUILD_DEP)"
 
596
  ifeq ($(with_deps_on_target_arch_pkgs),yes)
 
597
    ctrl_flags += -DCROSS_ARCH=$(DEB_TARGET_ARCH)
 
598
  endif
 
599
else
 
600
  # add '-DPRI=optional' to ctrl_flags if this is not the default compiler
 
601
  # ctrl_flags += \
 
602
  #     -DPRI=optional
 
603
endif
 
604
 
 
605
ifeq ($(with_base_only),yes)
 
606
  ctrl_flags += \
 
607
        -DBASE_ONLY=yes
 
608
endif
 
609
 
 
610
ifeq ($(with_multiarch_lib),yes)
 
611
  ctrl_flags += \
 
612
        -DMULTIARCH=yes
 
613
endif
 
614
 
 
615
control: control-file readme-bugs-file parameters-file symbols-files copyright-file substvars-file versioned-files check-versions
 
616
 
 
617
# stage1 and stage2 compilers are only C
 
618
ifdef DEB_STAGE
 
619
  languages = c
 
620
  addons = cdev plugindev
 
621
  ifeq ($(multilib),yes)
 
622
    addons += multilib
 
623
  endif
 
624
  addons += $(if $(findstring armel,$(biarchhfarchs)),armml)
 
625
  addons += $(if $(findstring armhf,$(biarchsfarchs)),armml)
 
626
  ifeq ($(DEB_STAGE),stage2)
 
627
    addons += libgcc gccxbase
 
628
    ifeq ($(multilib),yes)
 
629
      addons += lib32gcc lib64gcc libn32gcc
 
630
      addons += $(if $(findstring amd64,$(biarchx32archs)),libx32gcc)
 
631
      addons += $(if $(findstring armel,$(biarchhfarchs)),libhfgcc)
 
632
      addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfgcc)
 
633
    endif
 
634
  endif
 
635
else
 
636
languages = c c++ fortran objc objpp
 
637
ifeq ($(with_gccbase),yes)
 
638
    addons += gccbase
 
639
endif
 
640
ifeq ($(with_gccxbase),yes)
 
641
    addons += gccxbase
 
642
endif
 
643
addons += cdev c++dev fdev objcdev source objppdev multilib
 
644
addons += plugindev
 
645
addons += $(if $(findstring armel,$(biarchhfarchs)),armml)
 
646
addons += $(if $(findstring armhf,$(biarchsfarchs)),armml)
 
647
addons += $(if $(findstring amd64,$(biarchx32archs)),x32dev)
 
648
ifeq ($(with_libgcc),yes)
 
649
  addons += libgcc lib4gcc lib32gcc lib64gcc libn32gcc
 
650
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32gcc)
 
651
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfgcc)
 
652
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfgcc)
 
653
endif
 
654
ifeq ($(with_libcxx),yes)
 
655
  addons += libcxx lib32cxx lib64cxx libn32cxx
 
656
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32cxx)
 
657
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfcxx)
 
658
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfcxx)
 
659
endif
 
660
addons += $(if $(findstring amd64,$(biarchx32archs)),libx32dbgcxx)
 
661
addons += $(if $(findstring armel,$(biarchhfarchs)),libhfdbgcxx)
 
662
addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfdbgcxx)
 
663
ifeq ($(with_mudflap),yes)
 
664
  addons += mudflap
 
665
  ifeq ($(with_libmudflap),yes)
 
666
    addons += libmudf
 
667
  endif
 
668
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32mudflap)
 
669
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfmudflap)
 
670
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfmudflap)
 
671
endif
 
672
ifeq ($(with_libgfortran),yes)
 
673
  addons += libgfortran lib32gfortran lib64gfortran libn32gfortran
 
674
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32gfortran)
 
675
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfgfortran)
 
676
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfgfortran)
 
677
endif
 
678
ifeq ($(with_libobjc),yes)
 
679
  addons += libobjc lib32objc lib64objc libn32objc
 
680
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32objc)
 
681
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfobjc)
 
682
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfobjc)
 
683
endif
 
684
ifeq ($(with_libgomp),yes)
 
685
  addons += libgomp lib32gomp lib64gomp libn32gomp
 
686
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32gomp)
 
687
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfgomp)
 
688
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfgomp)
 
689
endif
 
690
ifeq ($(with_libitm),yes)
 
691
  addons += libitm lib32itm lib64itm libn32itm
 
692
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32itm)
 
693
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfitm)
 
694
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfitm)
 
695
endif
 
696
ifeq ($(with_libatomic),yes)
 
697
  addons += libatomic lib32atomic lib64atomic libn32atomic
 
698
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32atomic)
 
699
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfatomic)
 
700
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfatomic)
 
701
endif
 
702
ifeq ($(with_libbacktrace),yes)
 
703
  addons += libbtrace lib32btrace lib64btrace libn32btrace
 
704
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32btrace)
 
705
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfbtrace)
 
706
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfbtrace)
 
707
endif
 
708
ifeq ($(with_libasan),yes)
 
709
  addons += libasan lib32asan lib64asan libn32asan
 
710
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32asan)
 
711
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfasan)
 
712
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfasan)
 
713
endif
 
714
  addons += libtsan
 
715
ifeq ($(with_libtsan),yes)
 
716
  addons += libtsan #lib32tsan lib64tsan libn32tsan
 
717
  #addons += $(if $(findstring amd64,$(biarchx32archs)),libx32tsan)
 
718
  #addons += $(if $(findstring armel,$(biarchhfarchs)),libhftsan)
 
719
  #addons += $(if $(findstring armhf,$(biarchsfarchs)),libsftsan)
 
720
endif
 
721
ifeq ($(with_libqmath),yes)
 
722
  addons += libqmath lib32qmath lib64qmath libn32qmath
 
723
  addons += $(if $(findstring amd64,$(biarchx32archs)),libx32qmath)
 
724
  addons += $(if $(findstring armel,$(biarchhfarchs)),libhfqmath)
 
725
  addons += $(if $(findstring armhf,$(biarchsfarchs)),libsfqmath)
 
726
endif
 
727
ifeq ($(with_d),yes)
 
728
  languages += d
 
729
  ifeq ($(with_libphobos),yes)
 
730
    addons += libphobos
 
731
  endif
 
732
endif
 
733
ifeq ($(with_go),yes)
 
734
  addons += ggo godev
 
735
  ifeq ($(with_libgo),yes)
 
736
    addons += libggo lib32ggo lib64ggo libn32ggo
 
737
    addons += $(if $(findstring amd64,$(biarchx32archs)),libx32ggo)
 
738
  endif
 
739
endif
 
740
 
 
741
  languages += ada java
 
742
  addons += libgcj libgcjdev gcjdoc gcjsrc libgnat libs source # libgmath libnof lib64gnat ssp
 
743
 
 
744
  ifneq ($(DEB_CROSS),yes)
 
745
  ifneq (,$(neon_archs))
 
746
    addons += libneongcc libneongomp libneonitm libneonobjc libneongfortran libneoncxx
 
747
  endif
 
748
  ifeq ($(with_fixincl),yes)
 
749
    addons += fixincl
 
750
  endif
 
751
  ifeq ($(with_libgcj_doc),yes)
 
752
    addons += gcjdoc
 
753
  endif
 
754
  endif # DEB_CROSS
 
755
#  ifneq (,$(findstring gtk, $(java_awt_peers)))
 
756
#    addons += gtkpeer
 
757
#  endif
 
758
#  ifneq (,$(findstring qt, $(java_awt_peers)))
 
759
#    addons += qtpeer
 
760
#  endif
 
761
  ifeq ($(with_separate_libgcj),yes)
 
762
    ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
763
      languages := $(filter-out java,$(languages))
 
764
      addons := $(filter-out gcj libgcj libgcjdev gcjdoc gcjsrc gtkpeer qtpeer,$(addons))
 
765
    endif
 
766
    ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
767
      languages = java
 
768
      addons = gcj libgcj libgcjdev gcjsrc
 
769
      addons += $(if $(filter yes,$(with_gcjbase)),gcjbase)
 
770
      addons += $(if $(filter yes,$(with_gcjxbase)),gcjxbase)
 
771
    ifeq ($(with_libgcj_doc),yes)
 
772
      addons += gcjdoc
 
773
    endif
 
774
    ifeq ($(DEB_CROSS),yes)
 
775
      addons := $(filter-out gcjdoc gcjsrc,$(addons))
 
776
    endif
 
777
#      ifneq (,$(findstring gtk, $(java_awt_peers)))
 
778
#        addons += gtkpeer
 
779
#      endif
 
780
#      ifneq (,$(findstring qt, $(java_awt_peers)))
 
781
#        addons += qtpeer
 
782
#      endif
 
783
      ifeq ($(with_standalone_gcj),yes)
 
784
        addons += libgcc lib4gcc lib64gcc lib32gcc libn32gcc libx32gcc
 
785
      endif
 
786
    endif
 
787
  endif
 
788
  ifeq ($(with_standalone_gcj),yes)
 
789
    ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
 
790
      ctrl_flags += -DSTANDALONEJAVA
 
791
    endif
 
792
  endif
 
793
  ifeq ($(with_separate_libgo),yes)
 
794
    ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
795
      languages := $(filter-out go,$(languages))
 
796
      addons := $(filter-out ggo godev libggo lib64ggo lib32ggo libn32ggo libx32ggo,$(addons))
 
797
    endif
 
798
    ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
 
799
      languages = go
 
800
      addons = ggo godev libggo lib64ggo lib32ggo libn32ggo gccbase multilib
 
801
      addons += $(if $(findstring amd64,$(biarchx32archs)),libx32ggo)
 
802
      # FIXME: use the convenience libgcc ...
 
803
      #ifeq ($(with_standalone_go),yes)
 
804
      # addons += libgcc lib4gcc lib64gcc lib32gcc libn32gcc libx32gcc
 
805
      #endif
 
806
    endif
 
807
  endif
 
808
  ifeq ($(with_standalone_go),yes)
 
809
    ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
 
810
      ctrl_flags += -DSTANDALONEGO
 
811
    endif
 
812
  endif
 
813
  ifeq ($(with_separate_gnat),yes)
 
814
    ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
815
      languages := $(filter-out ada,$(languages))
 
816
      addons := $(filter-out libgnat,$(addons))
 
817
    endif
 
818
    ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
 
819
      languages = ada
 
820
      addons = libgnat
 
821
    endif
 
822
  endif
 
823
  ifeq ($(with_separate_gdc),yes)
 
824
    ifeq ($(PKGSOURCE),gcc-$(BASE_VERSION))
 
825
      languages := $(filter-out d,$(languages))
 
826
    endif
 
827
    ifeq ($(PKGSOURCE),gdc-$(BASE_VERSION))
 
828
      languages = d
 
829
      addons = 
 
830
      ifeq ($(with_libphobos),yes)
 
831
        addons += libphobos
 
832
      endif
 
833
    endif
 
834
  endif
 
835
  ifneq ($(DEB_CROSS),yes) # no docs for cross compilers
 
836
  ifneq ($(GFDL_INVARIANT_FREE),yes)
 
837
    addons += gfdldoc
 
838
  endif
 
839
  endif
 
840
endif # not stage
 
841
 
 
842
control-file:
 
843
        echo "addons: $(addons)"; \
 
844
        m4 $(ctrl_flags) \
 
845
          -DPV=$(pkg_ver) \
 
846
          -DCXX_SO=$(CXX_SONAME) \
 
847
          -DGCC_SO=$(GCC_SONAME) \
 
848
          -DOBJC_SO=$(OBJC_SONAME) \
 
849
          -DFORTRAN_SO=$(FORTRAN_SONAME) \
 
850
          -DGCJ_SO=$(PKG_GCJ_EXT) \
 
851
          -DLIBGCJ_EXT=$(PKG_LIBGCJ_EXT) \
 
852
          -DGNAT_SO=$(GNAT_SONAME) \
 
853
          -DGNAT_V=$(GNAT_VERSION) \
 
854
          -DPHOBOS_V=$(libphobos_version) \
 
855
          -DGOMP_SO=$(GOMP_SONAME) \
 
856
          -DGCCMATH_SO=$(GCCMATH_SONAME) \
 
857
          -DITM_SO=$(ITM_SONAME) \
 
858
          -DATOMIC_SO=$(ATOMIC_SONAME) \
 
859
          -DBTRACE_SO=$(BTRACE_SONAME) \
 
860
          -DASAN_SO=$(ASAN_SONAME) \
 
861
          -DTSAN_SO=$(TSAN_SONAME) \
 
862
          -DMF_SO=$(MUDFLAP_SONAME) \
 
863
          -DQMATH_SO=$(QUADMATH_SONAME) \
 
864
          -DSSP_SO=$(SSP_SONAME) \
 
865
          -DGO_SO=$(GO_SONAME) \
 
866
          -Denabled_languages="$(languages) $(addons)" \
 
867
          -Dada_no_archs="$(ada_no_archs)" \
 
868
          -Djava_no_archs="$(java_no_archs)" \
 
869
          -Dfortran_no_archs="$(fortran_no_archs)" \
 
870
          -Dlibgc_no_archs="$(libgc_no_archs)" \
 
871
          -Dlibphobos_archs="$(libphobos_archs)" \
 
872
          -Dlibphobos_no_archs="$(libphobos_no_archs)" \
 
873
          -Dcheck_no_archs="$(check_no_archs)" \
 
874
          -Dlocale_no_archs="$(locale_no_archs)" \
 
875
          -Dlinux_gnu_archs="$(linux_gnu_archs)" \
 
876
          -Dbiarch32_archs="$(strip $(subst /, ,$(biarch32archs)))" \
 
877
          -Dbiarch64_archs="$(strip $(subst /, ,$(biarch64archs)))" \
 
878
          -Dbiarchn32_archs="$(strip $(subst /, ,$(biarchn32archs)))" \
 
879
          -Dbiarchx32_archs="$(strip $(subst /, ,$(biarchx32archs)))" \
 
880
          -Dbiarchhf_archs="$(strip $(subst /, ,$(biarchhfarchs)))" \
 
881
          -Dbiarchsf_archs="$(strip $(subst /, ,$(biarchsfarchs)))" \
 
882
          -Dadd_built_using=$(add_built_using) \
 
883
                debian/control.m4 > debian/control.tmp2
 
884
        uniq debian/control.tmp2 | sed '/^Build/s/ *, */, /g;/^  /s/ *, */, /g' \
 
885
                > debian/control.tmp
 
886
        rm -f debian/control.tmp2
 
887
        [ -e debian/control ] \
 
888
          && cmp -s debian/control debian/control.tmp \
 
889
          && rm -f debian/control.tmp && exit 0; \
 
890
          mv debian/control.tmp debian/control; touch $(control_stamp)
 
891
 
 
892
readme-bugs-file:
 
893
        m4 -DDIST=$(distribution) -DSRCNAME=$(PKGSOURCE) \
 
894
                debian/README.Bugs.m4 > debian/README.Bugs
 
895
 
 
896
copyright-file:
 
897
        rm -f debian/copyright
 
898
        if echo $(SOURCE_VERSION) | grep -E ^'[0-9]\.[0-9]-[0-9]{8}' ; \
 
899
                then SVN_BRANCH="trunk" ; \
 
900
        else \
 
901
                SVN_BRANCH="gcc-$(subst .,_,$(BASE_VERSION))-branch" ; \
 
902
        fi ; \
 
903
        sed debian/copyright.in         \
 
904
                -e "s/@BV@/$(BASE_VERSION)/g"           \
 
905
                -e "s/@SVN_BRANCH@/$$SVN_BRANCH/g"      \
 
906
                > debian/copyright
 
907
 
 
908
substvars-file:
 
909
        rm -f debian/substvars.local.tmp
 
910
        ( \
 
911
                echo 'libgcc:Version=$(DEB_LIBGCC_VERSION)'; \
 
912
                echo 'gcc:Version=$(DEB_GCC_VERSION)'; \
 
913
                echo 'gcc:EpochVersion=$(DEB_EVERSION)'; \
 
914
                echo 'gcc:SoftVersion=$(DEB_GCC_SOFT_VERSION)'; \
 
915
                echo 'gdc:Version=$(DEB_GDC_VERSION)'; \
 
916
                echo 'gcj:Version=$(DEB_GCJ_VERSION)'; \
 
917
                echo 'gcj:SoftVersion=$(DEB_GCJ_SOFT_VERSION)'; \
 
918
                echo 'gcj:BaseVersion=$(BASE_VERSION)'; \
 
919
                echo 'gnat:Version=$(DEB_GNAT_VERSION)'; \
 
920
                echo 'binutils:Version=$(BINUTILSV)'; \
 
921
                echo 'dep:libgcc=$(LIBGCC_DEP)'; \
 
922
                echo 'dep:libgccbiarch=$(libgccbiarch)'; \
 
923
                echo 'dep:libgccbiarchdev=$(libgccbiarchdev)'; \
 
924
                echo 'dep:libc=$(LIBC_DEP) (>= $(libc_ver))'; \
 
925
                echo 'dep:libcdev=$(LIBC_DEV_DEP)'; \
 
926
                echo 'dep:libcbiarch=$(LIBC_BIARCH_DEP)'; \
 
927
                echo 'dep:libcbiarchdev=$(LIBC_BIARCH_DEV_DEP)'; \
 
928
                echo 'dep:libunwinddev=$(LIBUNWIND_DEV_DEP)'; \
 
929
                echo 'dep:libcxxbiarchdev=$(libstdc++biarchdev)'; \
 
930
                echo 'dep:libcxxbiarchdbg=$(libstdc++biarchdbg)'; \
 
931
                echo 'dep:libgnat=$(LIBGNAT_DEP)'; \
 
932
                echo 'dep:ecj=$(ECJ_DEP)'; \
 
933
                echo 'dep:libcloog=$(CLOOG_RUNTIME_DEP)'; \
 
934
        ) > debian/substvars.local.tmp
 
935
ifneq (,$(filter $(DEB_TARGET_ARCH), $(multilib_archs)))
 
936
        ( \
 
937
                echo 'gcc:multilib=gcc-$(BASE_VERSION)-multilib$(TS)'; \
 
938
                echo 'gxx:multilib=g++-$(BASE_VERSION)-multilib$(TS)'; \
 
939
                echo 'gobjc:multilib=gobjc-$(BASE_VERSION)-multilib$(TS)'; \
 
940
                echo 'gobjcxx:multilib=gobjc++-$(BASE_VERSION)-multilib$(TS)'; \
 
941
                echo 'gfortran:multilib=gfortran-$(BASE_VERSION)-multilib$(TS)'; \
 
942
        ) >> debian/substvars.local.tmp
 
943
endif
 
944
ifeq ($(with_gold),yes)
 
945
        echo 'dep:gold=binutils-gold (>= $(BINUTILSV))' \
 
946
                >> debian/substvars.local.tmp
 
947
endif
 
948
ifeq ($(with_libssp),yes)
 
949
        echo 'dep:libssp=libssp$(SSP_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
950
                >> debian/substvars.local.tmp
 
951
endif
 
952
ifeq ($(with_gomp),yes)
 
953
        echo 'dep:libgomp=libgomp$(GOMP_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
954
                >> debian/substvars.local.tmp
 
955
endif
 
956
ifeq ($(with_itm),yes)
 
957
        echo 'dep:libitm=libitm$(ITM_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
958
                >> debian/substvars.local.tmp
 
959
endif
 
960
ifeq ($(with_atomic),yes)
 
961
        echo 'dep:libatomic=libatomic$(ATOMIC_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
962
                >> debian/substvars.local.tmp
 
963
endif
 
964
ifeq ($(with_libbacktrace),yes)
 
965
        echo 'dep:libbacktrace=libbtrace$(BTRACE_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
966
                >> debian/substvars.local.tmp
 
967
endif
 
968
ifeq ($(with_asan),yes)
 
969
        echo 'dep:libasan=libasan$(ASAN_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
970
                >> debian/substvars.local.tmp
 
971
endif
 
972
ifeq ($(with_tsan),yes)
 
973
        echo 'dep:libtsan=libtsan$(TSAN_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
974
                >> debian/substvars.local.tmp
 
975
endif
 
976
ifeq ($(with_qmath),yes)
 
977
        echo 'dep:libqmath=libquadmath$(QUADMATH_SONAME)$(LS)$(AQ) (>= $${gcc:Version})' \
 
978
                >> debian/substvars.local.tmp
 
979
endif
 
980
ifeq ($(multilib),yes)
 
981
        echo 'dep:libgfortranbiarchdev=$(libgfortranbiarchdev)' \
 
982
                >> debian/substvars.local.tmp
 
983
        echo 'dep:libobjcbiarchdev=$(libobjcbiarchdev)' \
 
984
                >> debian/substvars.local.tmp
 
985
  ifeq ($(with_mudflap),yes)
 
986
        echo 'dep:libmudflapbiarch=$(libmudflapbiarch)' \
 
987
                >> debian/substvars.local.tmp
 
988
  endif
 
989
  ifeq ($(with_libssp),yes)
 
990
        echo 'dep:libsspbiarch=$(libsspbiarch)' \
 
991
                >> debian/substvars.local.tmp
 
992
  endif
 
993
  ifeq ($(with_gomp),yes)
 
994
        echo 'dep:libgompbiarch=$(libgompbiarch)' \
 
995
                >> debian/substvars.local.tmp
 
996
  endif
 
997
  ifeq ($(with_itm),yes)
 
998
        echo 'dep:libitmbiarch=$(libitmbiarch)' \
 
999
                >> debian/substvars.local.tmp
 
1000
  endif
 
1001
  ifeq ($(with_atomic),yes)
 
1002
        echo 'dep:libatomicbiarch=$(libatomicbiarch)' \
 
1003
                >> debian/substvars.local.tmp
 
1004
  endif
 
1005
  ifeq ($(with_libbacktrace),yes)
 
1006
        echo 'dep:libbtracebiarch=$(libbtracebiarch)' \
 
1007
                >> debian/substvars.local.tmp
 
1008
  endif
 
1009
  ifeq ($(with_asan),yes)
 
1010
        echo 'dep:libasanbiarch=$(libasanbiarch)' \
 
1011
                >> debian/substvars.local.tmp
 
1012
  endif
 
1013
  ifeq ($(with_tsan),yes)
 
1014
        #echo 'dep:libtsanbiarch=$(libtsanbiarch)' \
 
1015
        #       >> debian/substvars.local.tmp
 
1016
  endif
 
1017
  ifeq ($(with_qmath),yes)
 
1018
        echo 'dep:libqmathbiarch=$(libquadmathbiarch)' \
 
1019
                >> debian/substvars.local.tmp
 
1020
  endif
 
1021
  ifeq ($(with_go),yes)
 
1022
        echo 'dep:libgobiarchdev=$(libgobiarchdev)' \
 
1023
                >> debian/substvars.local.tmp
 
1024
        echo 'dep:libgobiarch=$(libgobiarch)' \
 
1025
                >> debian/substvars.local.tmp
 
1026
  endif
 
1027
endif
 
1028
ifneq ($(with_standalone_gcj),yes)
 
1029
  ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf))
 
1030
        echo 'dep:gcj=g++$(pkg_ver) (>= $(DEB_GCC_SOFT_VERSION))' \
 
1031
                >> debian/substvars.local.tmp
 
1032
  else
 
1033
        echo 'dep:gcj=gcc$(pkg_ver) (>= $(DEB_GCC_SOFT_VERSION))' \
 
1034
                >> debian/substvars.local.tmp
 
1035
  endif
 
1036
endif
 
1037
#ifneq (,$(findstring gtk, $(java_awt_peers)))
 
1038
#       echo 'pkg:gcjgtk=libgcj$(subst 0,,$(GCJ_SONAME))-awt-gtk (>= $(DEB_GCJ_VERSION))' \
 
1039
#               >> debian/substvars.local.tmp
 
1040
#endif
 
1041
#ifneq (,$(findstring qt, $(java_awt_peers)))
 
1042
#       echo 'pkg:gcjqt=libgcj$(subst 0,,$(GCJ_SONAME))-awt-qt (>= $(DEB_GCJ_VERSION))' \
 
1043
#               >> debian/substvars.local.tmp
 
1044
#endif
 
1045
ifeq ($(DEB_HOST_ARCH),hppa)
 
1046
        echo 'dep:prctl=prctl' >> debian/substvars.local.tmp
 
1047
endif
 
1048
ifeq ($(distribution)-$(DEB_HOST_ARCH),Debian-amd64)
 
1049
        echo 'confl:lib32=libc6-i386 (<< 2.9-22)' >> debian/substvars.local.tmp
 
1050
endif
 
1051
ifeq ($(with_multiarch_lib),yes)
 
1052
        echo 'multiarch:breaks=gcc-4.1, gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)' >> debian/substvars.local.tmp
 
1053
endif
 
1054
ifeq ($(add_built_using),yes)
 
1055
        echo "Built-Using=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W gcc$(pkg_ver)-source)" \
 
1056
        >> debian/substvars.local.tmp
 
1057
endif
 
1058
        [ -e debian/substvars.local ] \
 
1059
          && cmp -s debian/substvars.local debian/substvars.local.tmp \
 
1060
          && rm -f debian/substvars.local.tmp && exit 0; \
 
1061
          mv debian/substvars.local.tmp debian/substvars.local; \
 
1062
          touch $(control_stamp)
 
1063
 
 
1064
parameters-file:
 
1065
        rm -f debian/rules.parameters.tmp
 
1066
        ( \
 
1067
                echo '# configuration parameters taken from upstream source files'; \
 
1068
                echo 'GCC_VERSION       := $(GCC_VERSION)'; \
 
1069
                echo 'NEXT_GCC_VERSION  := $(NEXT_GCC_VERSION)'; \
 
1070
                echo 'BASE_VERSION      := $(BASE_VERSION)'; \
 
1071
                echo 'SOURCE_VERSION    := $(SOURCE_VERSION)'; \
 
1072
                echo 'DEB_VERSION       := $(DEB_VERSION)'; \
 
1073
                echo 'DEB_EVERSION      := $(DEB_EVERSION)'; \
 
1074
                echo 'DEB_GDC_VERSION   := $(DEB_GDC_VERSION)'; \
 
1075
                echo 'DEB_SOVERSION     := $(DEB_SOVERSION)'; \
 
1076
                echo 'DEB_SOEVERSION    := $(DEB_SOEVERSION)'; \
 
1077
                echo 'DEB_LIBGCC_SOVERSION      := $(DEB_LIBGCC_SOVERSION)'; \
 
1078
                echo 'DEB_LIBGCC_VERSION        := $(DEB_LIBGCC_VERSION)'; \
 
1079
                echo 'DEB_STDCXX_SOVERSION      := $(DEB_STDCXX_SOVERSION)'; \
 
1080
                echo 'DEB_GCJ_SOVERSION := $(DEB_GCJ_SOVERSION)'; \
 
1081
                echo 'PKG_GCJ_EXT       := $(PKG_GCJ_EXT)'; \
 
1082
                echo 'PKG_LIBGCJ_EXT    := $(PKG_LIBGCJ_EXT)'; \
 
1083
                echo 'DEB_GOMP_SOVERSION        := $(DEB_GOMP_SOVERSION)'; \
 
1084
                echo 'DEB_GCCMATH_SOVERSION     := $(DEB_GCCMATH_SOVERSION)'; \
 
1085
                echo 'GCC_SONAME        := $(GCC_SONAME)'; \
 
1086
                echo 'CXX_SONAME        := $(CXX_SONAME)'; \
 
1087
                echo 'FORTRAN_SONAME    := $(FORTRAN_SONAME)'; \
 
1088
                echo 'OBJC_SONAME       := $(OBJC_SONAME)'; \
 
1089
                echo 'GCJ_SONAME        := $(GCJ_SONAME)'; \
 
1090
                echo 'GDC_VERSION       := $(GDC_VERSION)'; \
 
1091
                echo 'GNAT_VERSION      := $(GNAT_VERSION)'; \
 
1092
                echo 'GNAT_SONAME       := $(GNAT_SONAME)'; \
 
1093
                echo 'FFI_SONAME        := $(FFI_SONAME)'; \
 
1094
                echo 'MUDFLAP_SONAME    := $(MUDFLAP_SONAME)'; \
 
1095
                echo 'SSP_SONAME        := $(SSP_SONAME)'; \
 
1096
                echo 'GOMP_SONAME       := $(GOMP_SONAME)'; \
 
1097
                echo 'ITM_SONAME        := $(ITM_SONAME)'; \
 
1098
                echo 'ATOMIC_SONAME     := $(ATOMIC_SONAME)'; \
 
1099
                echo 'BTRACE_SONAME     := $(BTRACE_SONAME)'; \
 
1100
                echo 'ASAN_SONAME       := $(ASAN_SONAME)'; \
 
1101
                echo 'TSAN_SONAME       := $(TSAN_SONAME)'; \
 
1102
                echo 'QMATH_SONAME      := $(QUADMATH_SONAME)'; \
 
1103
                echo 'GCCMATH_SONAME    := $(GCCMATH_SONAME)'; \
 
1104
                echo 'GO_SONAME         := $(GO_SONAME)'; \
 
1105
                echo 'LIBC_DEP          := $(LIBC_DEP)'; \
 
1106
        ) > debian/rules.parameters.tmp
 
1107
        [ -e debian/rules.parameters ] \
 
1108
          && cmp -s debian/rules.parameters debian/rules.parameters.tmp \
 
1109
          && rm -f debian/rules.parameters.tmp && exit 0; \
 
1110
          mv debian/rules.parameters.tmp debian/rules.parameters; \
 
1111
          touch $(control_stamp)
 
1112
 
 
1113
symbols-files:
 
1114
ifeq ($(DEB_CROSS),yes)
 
1115
  ifneq ($(with_deps_on_target_arch_pkgs),yes)
 
1116
        for f in debian/*.symbols; do \
 
1117
          [ -f "$$f" ] || continue; \
 
1118
          [ -L "$$f" ] && continue; \
 
1119
          b=$$(basename $$f .symbols); \
 
1120
          ln -sf $$f debian/$$b$(LS).symbols; \
 
1121
        done
 
1122
        for f in debian/*.symbols.$(DEB_TARGET_ARCH); do \
 
1123
          [ -f "$$f" ] || continue; \
 
1124
          [ -L "$$f" ] && continue; \
 
1125
          b=$$(basename $$f .symbols.$(DEB_TARGET_ARCH)); \
 
1126
          ln -sf $$f debian/$$b$(LS).symbols; \
 
1127
        done
 
1128
  endif
 
1129
endif
 
1130
 
 
1131
versioned-files:
 
1132
        fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
 
1133
        for f in $$fs debian/source.lintian-overrides.in; do \
 
1134
          [ -f $$f ] || echo "CANNOT FIND $$f"; \
 
1135
          [ -f $$f ] || continue; \
 
1136
          if [ -z "$(DEB_CROSS)" ]; then case "$$f" in *-CR*) continue; esac; fi; \
 
1137
          f2=$$(echo $$f \
 
1138
                | sed 's/BV/$(BASE_VERSION)/;s/CXX/$(CXX_SONAME)/;s/LGCJ/$(PKG_LIBGCJ_EXT)/;s/GCJ/$(PKG_GCJ_EXT)/;s/LC/$(GCC_SONAME)/;s/MF/$(MUDFLAP_SONAME)/;s/-CRB/$(cross_bin_arch)/;s/\.in$$//'); \
 
1139
          sed -e 's/@BV@/$(BASE_VERSION)/g' \
 
1140
              -e 's/@CXX@/$(CXX_SONAME)/g' \
 
1141
              -e 's/@LGCJ@/$(PKG_LIBGCJ_EXT)/g' \
 
1142
              -e 's/@GCJ@/$(PKG_GCJ_EXT)/g' \
 
1143
              -e 's/@GCJSO@/$(GCJ_SONAME)/g' \
 
1144
              -e 's/@LC@/$(GCC_SONAME)/g' \
 
1145
              -e 's/@MF@/$(MUDFLAP_SONAME)/g' \
 
1146
              -e 's/@SRC@/$(PKGSOURCE)/g' \
 
1147
              -e 's/@GFDL@/$(if $(filter yes,$(GFDL_INVARIANT_FREE)),#)/g' \
 
1148
              -e 's/@java_priority@/$(java_priority)/g' \
 
1149
              -e 's/@gcc_priority@/$(subst .,,$(BASE_VERSION))/g' \
 
1150
              -e 's/@TARGET@/$(DEB_TARGET_GNU_TYPE)/g' \
 
1151
            $$f > $$f2; \
 
1152
          touch -r $$f $$f2; \
 
1153
        done
 
1154
        for t in ar nm ranlib; do \
 
1155
          sed "s/@BV@/$(BASE_VERSION)/g;s/@TOOL@/$$t/g" \
 
1156
            debian/gcc-XX-BV.1 > debian/gcc-$$t-$(BASE_VERSION).1; \
 
1157
        done
 
1158
 
 
1159
# don't encode versioned build dependencies in the control file, but check
 
1160
# these here instead.
 
1161
check-versions:
 
1162
        v=$$(dpkg-query -l dpkg-dev | awk '/^ii/ {print $$3}'); \
 
1163
        if dpkg --compare-versions "$$v" lt "$(DPKGV)"; then \
 
1164
          echo "dpkg-dev (>= $(DPKGV)) required, found $$v"; \
 
1165
          exit 1; \
 
1166
        fi
 
1167
        v=$$(dpkg-query -l binutils binutils-multiarch | awk '/^ii/ {print $$3;exit}'); \
 
1168
        if dpkg --compare-versions "$$v" lt "$(BINUTILSBDV)"; then \
 
1169
          echo "binutils (>= $(BINUTILSBDV)) required, found $$v"; \
 
1170
          exit 1; \
 
1171
        fi