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

« back to all changes in this revision

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