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

« back to all changes in this revision

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