4
# Uncomment this to turn on verbose mode.
9
include debian/rules.defs
10
include debian/rules.parameters
13
SHELL = /bin/bash -e # brace expansion in rules file
14
IR = install -m 644 # Install regular file
15
IP = install -m 755 # Install program
16
IS = install -m 755 # Install script
18
#number of jobs to run for build
19
ifeq ($(USE_NJOBS),no)
23
ifeq ($(with_java),yes)
28
NUM_CPUS := $(shell if echo $(USE_NJOBS) | grep -q -E '^[0-9]+$$'; \
29
then echo $(USE_NJOBS); \
30
else getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1; fi)
31
USE_CPUS := $(shell mt=`awk '/^MemTotal/ { print $$2 }' /proc/meminfo`; \
32
awk -vn=$(NUM_CPUS) -vmt=$$mt -vm=$(MEM_PER_CPU) \
33
'END { mt/=1024; n2 = int(mt/m); print n==1 ? 1 : n2<n+1 ? n2 : n+1}' < /dev/null)
34
ifneq (,$(strip $(USE_CPUS)))
35
NJOBS := -j $(USE_CPUS)
39
# Support parallel=<n> in DEB_BUILD_OPTIONS (see #209008)
40
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
41
USE_CPUS := $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
42
NJOBS := -j $(USE_CPUS)
45
# kernel-specific ulimit hack
46
ifeq ($(findstring linux,$(DEB_HOST_GNU_SYSTEM)),linux)
47
ULIMIT_M = if [ -e /proc/meminfo ]; then \
48
m=`awk '/^((Mem|Swap)Free|Cached)/{m+=$$2}END{print int(m*.9)}' \
51
m=`vmstat --free --swap-free --kilobytes|awk '{m+=$$2}END{print int(m*.9)}'`; \
54
echo "Limited memory for test runs to `ulimit -m`kB"
59
ifeq ($(locale_data),generate)
60
SET_LOCPATH = LOCPATH=$(PWD)/locales
63
SET_PATH = PATH=$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
64
ifeq ($(trunk_build),yes)
65
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
66
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
68
ifneq (,$(findstring ppc64-linux,$(DEB_TARGET_GNU_TYPE)))
69
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
73
# the recipient for the test summaries. Send with: debian/rules mail-summary
74
S_EMAIL = gcc@packages.debian.org gcc-testresults@gcc.gnu.org
76
# build not yet prepared to take variables from the environment
81
$(foreach v, CPPFLAGS CFLAGS CXXFLAGS FFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v)))))
83
ifeq ($(REVERSE_CROSS),yes)
86
CC = $(if $(filter yes,$(with_ada)),gnatgcc,gcc)
89
ifneq ($(distribution),Ubuntu)
90
ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel mips mipsel))
91
STAGE1_CFLAGS = -g -O2
100
ifeq ($(with_ssp_default),yes)
104
LIBCXXFLAGS = -g -O2 -fno-implicit-templates
105
# Only use -fno-stack-protector when known to the stage1 compiler.
106
cc-fno-stack-protector := $(shell if $(CC) $(CFLAGS) -fno-stack-protector \
107
-S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
108
then echo "-fno-stack-protector"; fi;)
109
$(foreach var,STAGE1_CFLAGS BOOT_CFLAGS LIBCFLAGS LIBCXXFLAGS,$(eval \
110
$(var) += $(cc-fno-stack-protector)))
113
ifeq ($(DEB_CROSS),yes)
117
ifneq (,$(findstring static,$(DEB_BUILD_OPTIONS)))
121
ifneq (,$(filter $(DEB_TARGET_ARCH),alpha))
122
LDFLAGS += -Wl,--no-relax
126
$(if $(CFLAGS),CFLAGS="$(CFLAGS)") \
127
$(if $(BOOT_CFLAGS),BOOT_CFLAGS="$(BOOT_CFLAGS)") \
128
$(if $(LIBCFLAGS),LIBCFLAGS="$(LIBCFLAGS)") \
129
$(if $(LIBCXXFLAGS),LIBCXXFLAGS="$(LIBCXXFLAGS)")
131
$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)")
132
STAGE1_CFLAGS_TO_PASS = \
133
$(if $(STAGE1_CFLAGS),STAGE1_CFLAGS="$(STAGE1_CFLAGS)")
135
docdir = usr/share/doc
138
--with-pkgversion='$(distribution)$(if $(with_linaro_branch),/Linaro)___$(DEB_VERSION)' \
139
--with-bugurl='file:///usr/share/doc/$(subst gcj,gcc,$(PKGSOURCE))/README.Bugs'
142
--enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \
145
ifeq ($(versioned_packages),yes)
146
CONFARGS += --program-suffix=-$(BASE_VERSION)
151
--disable-decimal-float \
152
--disable-libatomic \
154
--disable-libmudflap \
156
--disable-libquadmath \
157
--disable-libsanitizer \
159
--libexecdir=/$(libexecdir) \
160
--libdir=/$(PF)/$(configured_libdir) \
161
$(if $(with_build_sysroot),--with-build-sysroot=$(with_build_sysroot)) \
162
$(if $(with_sysroot),--with-sysroot=$(with_sysroot))
164
ifeq ($(with_multiarch_lib),yes)
169
ifeq ($(DEB_STAGE),stage1)
182
--enable-linker-build-id \
184
ifneq ($(single_package),yes)
186
--libexecdir=/$(libexecdir) \
187
--without-included-gettext \
188
--enable-threads=posix \
189
--with-gxx-include-dir=/$(cxx_inc_dir) \
190
--libdir=/$(PF)/$(configured_libdir)
193
ifneq ($(with_cpp),yes)
194
CONFARGS += --disable-cpp
197
ifeq ($(with_nls),yes)
198
CONFARGS += --enable-nls
200
CONFARGS += --disable-nls
203
ifeq ($(with_bootstrap),off)
204
CONFARGS += --disable-bootstrap
205
else ifneq ($(with_bootstrap),)
206
CONFARGS += --enable-bootstrap=$(with_bootstrap)
209
ifneq ($(with_sysroot),)
210
CONFARGS += --with-sysroot=$(with_sysroot)
212
ifneq ($(with_build_sysroot),)
213
CONFARGS += --with-build-sysroot=$(with_build_sysroot)
216
ifeq ($(force_gnu_locales),yes)
217
CONFARGS += --enable-clocale=gnu
220
ifeq ($(with_cxx)-$(with_debug),yes-yes)
221
CONFARGS += --enable-libstdcxx-debug
223
CONFARGS += --enable-libstdcxx-time=yes
225
ifeq (,$(filter $(DEB_TARGET_ARCH), hurd-i386 kfreebsd-i386 kfreebsd-amd64))
226
CONFARGS += --enable-gnu-unique-object
229
ifneq ($(with_ssp),yes)
230
CONFARGS += --disable-libssp
233
ifneq ($(with_mudflap),yes)
234
CONFARGS += --disable-libmudflap
237
ifneq ($(with_gomp),yes)
238
CONFARGS += --disable-libgomp
241
ifneq ($(with_itm),yes)
242
CONFARGS += --disable-libitm
245
ifneq ($(with_atomic),yes)
246
CONFARGS += --disable-libatomic
249
ifneq ($(with_asan),yes)
250
CONFARGS += --disable-libsanitizer
253
ifneq ($(with_qmath),yes)
254
CONFARGS += --disable-libquadmath
257
ifeq ($(with_plugins),yes)
258
CONFARGS += --enable-plugin
261
#ifeq ($(with_gold),yes)
262
# CONFARGS += --enable-gold --enable-ld=default
265
#CONFARGS += --with-plugin-ld=ld.gold
266
#CONFARGS += --with-plugin-ld
270
CONFARGS += --with-system-zlib
272
jvm_name_short = java-1.5.0-gcj-$(BASE_VERSION)$(if $(findstring snap,$(PKGSOURCE)),-snap)
273
jvm_name_long = $(jvm_name_short)-1.5.0.0
275
ifeq ($(with_java),yes)
276
CONFARGS += --disable-browser-plugin
277
ifeq ($(with_java_maintainer_mode),yes)
278
CONFARGS += --enable-java-maintainer-mode
280
ifeq ($(with_java_biarch_awt),yes)
281
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)-default))
283
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)))
285
ifneq (,$(findstring gtk,$(java_awt_peers)))
286
CONFARGS += --enable-gtk-cairo
288
jvm_ext = -$(DEB_TARGET_ARCH)$(if $(filter yes,$(DEB_CROSS)),-cross)
289
jvm_dir = /usr/lib/jvm/$(jvm_name_short)$(jvm_ext)
290
CONFARGS += --with-java-home=$(jvm_dir)/jre
291
CONFARGS += --enable-java-home \
292
--with-jvm-root-dir=$(jvm_dir) \
293
--with-jvm-jar-dir=/usr/lib/jvm-exports/$(jvm_name_short)$(jvm_ext)
294
CONFARGS += --with-arch-directory=$(java_cpu)
295
ifeq (./,$(dir $(ecj_jar)))
296
CONFARGS += --with-ecj-jar=$(jvm_dir)/lib/ecj.jar
298
CONFARGS += --with-ecj-jar=$(ecj_jar)
302
ifeq ($(with_gcj),yes)
303
ifeq ($(DEB_HOST_GNU_CPU),m32r)
304
CONFARGS += --enable-libgcj
308
ifeq ($(with_objc)-$(with_objc_gc),yes-yes)
309
CONFARGS += --enable-objc-gc
312
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), i486-linux-gnu i586-linux-gnu i686-linux-gnu))
313
ifeq ($(multilib),yes)
314
ifeq ($(biarch64),yes)
315
CONFARGS += --enable-targets=all
320
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), x86_64-linux-gnu x86_64-kfreebsd-gnu s390x-linux-gnu))
321
ifneq ($(biarch32),yes)
322
CONFARGS += --disable-multilib
326
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), powerpc-linux-gnu powerpc-linux-gnuspe))
327
CONFARGS += --enable-secureplt
328
ifeq ($(biarch64),yes)
329
CONFARGS += --disable-softfloat --with-cpu=default32
330
ifeq ($(multilib),yes)
331
CONFARGS += --disable-softfloat \
332
--enable-targets=powerpc-linux,powerpc64-linux
335
CONFARGS += --disable-multilib
339
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
340
CONFARGS += --enable-secureplt
341
ifeq ($(biarch32),yes)
342
ifeq ($(multilib),yes)
343
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
346
CONFARGS += --disable-multilib
348
ifeq ($(distribution),Ubuntu)
349
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
353
ifeq ($(REVERSE_CROSS),yes)
354
# FIXME: requires isl and cloog headers for the target
355
#CONFARGS += --without-isl
356
# FIXME: build currently fails build the precompiled headers
357
CONFARGS += --disable-libstdcxx-pch
360
ifeq ($(with_multiarch_lib),yes)
361
CONFARGS += --enable-multiarch
364
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
365
CONFARGS += --with-cpu=8548 --enable-e500_double
368
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
369
CONFARGS += --with-float=soft
372
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
373
CONFARGS += --with-fpu=vfp
376
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
377
ifeq ($(multilib),yes)
378
CONFARGS += --enable-multilib
380
CONFARGS += --disable-sjlj-exceptions
381
# FIXME: libjava is not ported for thumb, this hack only works for
382
# separate gcj builds
383
ifneq (,$(filter armhf,$(DEB_TARGET_ARCH)))
384
ifneq (,$(findstring gcj,$(PKGSOURCE)))
385
with_arm_arch = armv6
387
with_arm_arch = armv7-a
389
with_arm_fpu = vfpv3-d16
392
ifeq ($(distribution),Debian)
393
with_arm_arch = armv4t
394
else ifneq (,$(filter $(distrelease),karmic))
395
with_arm_arch = armv6
396
with_arm_fpu = vfpv3-d16
397
else ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
398
ifneq (,$(findstring gcj,$(PKGSOURCE)))
399
with_arm_arch = armv6
401
with_arm_arch = armv7-a
403
with_arm_fpu = vfpv3-d16
405
with_arm_arch = armv5t # starting with quantal
408
CONFARGS += --with-arch=$(with_arm_arch)
409
ifneq (,$(with_arm_fpu))
410
CONFARGS += --with-fpu=$(with_arm_fpu)
412
CONFARGS += --with-float=$(float_abi)
413
ifeq ($(with_arm_thumb),yes)
414
CONFARGS += --with-mode=thumb
418
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
419
CONFARGS += --disable-werror
421
# FIXME: correct fix-warnings.dpatch
422
ifeq ($(distribution),Ubuntu)
423
CONFARGS += --disable-werror
426
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
427
ifeq ($(biarch64),yes)
428
CONFARGS += --enable-targets=all
432
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
433
ifneq ($(biarch32),yes)
434
CONFARGS += --disable-multilib
438
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
439
CONFARGS += --with-system-libunwind
442
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
443
ifeq ($(multilib),yes)
444
CONFARGS += --with-multilib-list=m4,m4-nofpu
446
CONFARGS += --with-cpu=sh4
449
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
450
CONFARGS += --disable-multilib
453
ifeq ($(DEB_TARGET_ARCH_OS),linux)
454
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
455
CONFARGS += --with-long-double-128
459
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
460
ifneq (,$(filter $(distrelease),etch lenny dapper hardy))
461
CONFARGS += --with-arch-32=i486
462
else ifneq (,$(filter $(distrelease),squeeze wheezy sid jaunty karmic lucid))
463
CONFARGS += --with-arch-32=i586
465
CONFARGS += --with-arch-32=i686
469
ifeq ($(DEB_TARGET_ARCH),amd64)
470
CONFARGS += --with-abi=m64
472
ifeq ($(multilib),yes)
473
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
474
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
475
else ifeq ($(DEB_TARGET_ARCH),x32)
476
CONFARGS += --with-abi=mx32 --with-multilib-list=mx32,m64,m32
480
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
481
CONFARGS += --with-arch=i586
484
ifeq ($(DEB_TARGET_ARCH),lpia)
485
CONFARGS += --with-arch=pentium-m --with-tune=i586
488
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
489
CONFARGS += --with-tune=generic
492
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
493
CONFARGS += --with-mips-plt
494
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
495
ifeq ($(multilib),yes)
496
ifeq ($(biarchn32)-$(biarch64),yes-yes)
497
CONFARGS += --enable-targets=all
498
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
503
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
504
CONFARGS += --with-mips-plt
505
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
506
ifeq ($(multilib),yes)
507
ifeq ($(biarchn32)-$(biarch64),yes-yes)
508
CONFARGS += --enable-targets=all
509
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
514
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
515
ifeq ($(multilib),yes)
516
ifeq ($(biarch64),yes)
517
CONFARGS += --enable-targets=all
522
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
523
CONFARGS += --disable-libstdcxx-pch
526
ifneq (,$(findstring gdc, $(PKGSOURCE)))
527
CONFARGS += --disable-libquadmath
530
ifeq ($(trunk_build),yes)
531
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
532
CONFARGS += --disable-werror
534
CONFARGS += --enable-checking=yes
536
CONFARGS += --enable-checking=release
540
--build=$(DEB_BUILD_GNU_TYPE) \
541
--host=$(DEB_HOST_GNU_TYPE) \
542
--target=$(TARGET_ALIAS)
544
ifeq ($(DEB_CROSS),yes)
546
--program-prefix=$(TARGET_ALIAS)-
547
ifneq ($(with_deps_on_target_arch_pkgs),yes)
549
--includedir=/$(PFL)/include
553
ifeq ($(with_bootstrap),off)
555
else ifeq ($(with_bootstrap),)
556
bootstrap_target = bootstrap-lean
557
# no profiledbootstrap on the following architectures
558
# - m68k: we're happy that it builds at all
559
no_profiled_bs_archs := alpha arm arm64 hppa m68k
560
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
561
bootstrap_target = profiledbootstrap
562
# FIXME: disabled for first uploads
563
bootstrap_target = bootstrap-lean
565
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
566
bootstrap_target = bootstrap-lean
568
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
569
bootstrap_target = bootstrap-lean
572
# disable profiled bootstrap on slow archs, get to testing first ...
573
ifeq ($(distribution),Debian)
574
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
575
bootstrap_target = bootstrap-lean
578
ifeq ($(distribution),Ubuntu)
579
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
580
bootstrap_target = bootstrap-lean
586
# Increase the timeout for one testrun on slow architectures
587
ifeq ($(distribution),Debian)
588
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
590
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
593
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
596
else ifeq ($(distribution),Ubuntu)
597
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
599
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
605
ifneq ($(trunk_build),yes)
606
ifeq ($(with_ssp),yes)
607
ifneq ($(single_package),yes)
608
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
610
# FIXME Ubuntu armel buildd hangs
611
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
614
ifeq ($(distribution),Ubuntu)
615
# the buildds are just slow ... don't check the non-default
616
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
623
ifeq ($(distribution),Ubuntu)
624
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
625
ifeq ($(with_arm_thumb),yes)
626
#DEJAGNU_RUNS += -marm
628
DEJAGNU_RUNS += -mthumb
633
# no b-d on g++-multilib, this is run by the built compiler
634
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
635
$(shell cat build/runcheck$(1).out), \
636
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
637
ifeq ($(biarch32),yes)
638
DEJAGNU_RUNS += $(call abi_run_check,-m32)
640
ifeq ($(biarch64),yes)
641
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
643
ifeq ($(biarchn32),yes)
644
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
646
ifeq ($(biarchx32),yes)
647
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
650
# gdc is not multilib'd
651
ifneq (,$(findstring gdc, $(PKGSOURCE)))
655
ifneq (,$(findstring gcj, $(PKGSOURCE)))
660
ifneq (,$(findstring gnat, $(PKGSOURCE)))
664
ifneq (,$(strip $(value DEJAGNU_RUNS)))
665
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
668
# PF is the installation prefix for the package without the leading slash.
669
# It's "usr" for gcc releases.
671
# use value set in the environment
672
else ifeq ($(trunk_build),yes)
673
PF = usr/lib/gcc-snapshot
674
else ifeq ($(PKGSOURCE),gcc-linaro)
675
PF = usr/lib/gcc-linaro
680
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
681
ifeq ($(DEB_CROSS),yes)
682
ifneq ($(with_deps_on_target_arch_pkgs),yes)
683
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
691
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
692
ifeq ($(DEB_CROSS),yes)
693
ifneq ($(with_deps_on_target_arch_pkgs),yes)
694
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
702
ifeq ($(with_multiarch_lib),yes)
703
ifeq ($(DEB_CROSS),yes)
704
ifneq ($(with_deps_on_target_arch_pkgs),yes)
707
libdir = lib/$(DEB_TARGET_MULTIARCH)
710
libdir = lib/$(DEB_TARGET_MULTIARCH)
715
configured_libdir = lib
717
hppa64libexecdir= $(PF)/lib
719
# /usr/libexec doesn't follow the FHS
720
ifeq ($(single_package),yes)
722
libexecdir = $(PF)/libexec
723
versiondir = $(GCC_VERSION)
725
libexecdir = $(PF)/$(configured_libdir)
726
versiondir = $(BASE_VERSION)
728
buildlibdir = $(builddir)/$(TARGET_ALIAS)
730
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
731
gcc_subdir_name = gcc
732
ifneq ($(single_package),yes)
733
ifeq ($(DEB_CROSS),yes)
734
ifneq ($(with_deps_on_target_arch_pkgs),yes)
735
gcc_subdir_name = gcc-cross
740
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
741
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
748
p_l= $(1)$(cross_lib_arch)
749
p_d= $(1)-dbg$(cross_lib_arch)
753
ifeq ($(DEB_CROSS),yes)
754
ifneq ($(with_deps_on_target_arch_pkgs),yes)
757
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
758
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
759
usr_lib = $(PFL)/lib/sh4-linux-gnu/
762
usr_lib = $(PFL)/$(libdir)
765
usr_lib = $(PFL)/$(libdir)
767
usr_lib32 = $(PFL)/lib32
768
usr_libn32 = $(PFL)/lib32
769
usr_libx32 = $(PFL)/libx32
770
usr_lib64 = $(PFL)/lib64
771
usr_libhf = $(PFL)/libhf
772
usr_libsf = $(PFL)/libsf
774
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
775
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
776
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
777
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
778
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
779
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
781
libgcc_dir = $(RPF)/$(libdir)
782
# yes, really; lib32gcc_s ends up in usr
783
libgcc_dir32 = $(PFL)/lib32
784
libgcc_dirn32 = $(RPF)/lib32
785
# libx32gcc_s also ends up in usr
786
libgcc_dirx32 = $(PFL)/libx32
787
libgcc_dir64 = $(RPF)/lib64
788
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
789
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
791
# install_gcc_lib(lib,soname,flavour,package)
792
define install_gcc_lib
793
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
794
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
796
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
800
checkdirs = $(builddir)
801
ifeq ($(with_separate_libgcj),yes)
802
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
803
ifneq ($(with_standalone_gcj),yes)
804
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
808
ifeq ($(with_separate_go),yes)
809
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
810
checkdirs = $(buildlibdir)/libgo
813
ifeq ($(with_separate_gnat),yes)
814
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
815
checkdirs = $(builddir)/gcc
819
ifneq ($(DEB_CROSS),yes)
820
ifneq ($(single_package),yes)
821
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
823
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
826
ifeq ($(with_deps_on_target_arch_pkgs),yes)
827
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
829
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
833
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
834
MULTIARCH_DIRNAME := $(DEB_HOST_MULTIARCH)
835
export MULTIARCH_DIRNAME
839
configure: $(configure_dependencies)
841
$(configure_dummy_stamp):
842
touch $(configure_dummy_stamp)
846
: # give information about the build process
847
@echo "------------------------ Build process variables ------------------------"
848
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
849
@echo "Package source: $(PKGSOURCE)"
850
@echo "GCC version: $(GCC_VERSION)"
851
@echo "Base Debian version: $(BASE_VERSION)"
852
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
853
ifeq ($(DEB_CROSS),yes)
854
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
856
@echo "Using shell $(SHELL)"
857
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
858
@echo "CPPFLAGS: $(CPPFLAGS)"
859
@echo "CFLAGS: $(CFLAGS)"
860
@echo "LDFLAGS: $(LDFLAGS)"
861
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
862
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
863
@echo "Install prefix: /$(PF)"
864
ifeq ($(biarchn32)-$(biarch64),yes-yes)
865
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
866
else ifeq ($(biarch64)-$(biarch32),yes-yes)
867
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
868
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
869
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
870
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
871
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
873
ifeq ($(biarch64),yes)
874
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
876
ifeq ($(biarch32),yes)
877
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
879
@echo "Will not build the biarch compilers"
884
ifeq ($(with_cxx),yes)
885
@echo "Will build the C++ compiler"
887
@echo "Will not build the C++ compiler: $(with_cxx)"
889
ifeq ($(with_objc),yes)
890
@echo "Will build the ObjC compiler."
891
ifeq ($(with_objc_gc),yes)
892
@echo "Will build the extra ObjC runtime for garbage collection."
894
@echo "Will not build the extra ObjC runtime for garbage collection."
897
@echo "Will not build the ObjC compiler: $(with_objc)"
899
ifeq ($(with_objcxx),yes)
900
@echo "Will build the Obj-C++ compiler"
902
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
904
ifeq ($(with_fortran),yes)
905
@echo "Will build the Fortran 95 compiler."
907
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
909
ifeq ($(with_java),yes)
910
@echo "Will build the Java compiler."
912
@echo "Will not build the Java compiler: $(with_java)"
914
ifeq ($(with_ada),yes)
915
@echo "Will build the Ada compiler."
916
ifeq ($(with_libgnat),yes)
917
@echo "Will build the shared Ada libraries."
919
@echo "Will not build the shared Ada libraries."
922
@echo "Will not build the Ada compiler: $(with_ada)"
924
ifeq ($(with_go),yes)
925
@echo "Will build the Go compiler."
927
@echo "Will not build the Go compiler: $(with_go)"
930
@echo "Will build the D compiler"
931
ifeq ($(with_libphobos),yes)
932
@echo "Will build the phobos D runtime library."
934
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
937
@echo "Will not build the D compiler: $(with_d)"
939
ifeq ($(with_ssp),yes)
940
@echo "Will build with SSP support."
942
@echo "Will build without SSP support: $(with_ssp)"
944
ifeq ($(with_check),yes)
945
@echo "Will run the testsuite."
947
@echo "Will not run the testsuite: $(with_check)"
949
ifeq ($(with_nls),yes)
950
@echo "Will enable national language support."
952
@echo "Will disable national language support: $(with_nls)"
954
@echo "-----------------------------------------------------------------------------"
956
ifeq ($(with_check),yes)
957
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
960
echo "expect is failing on your system with the above error, which means the GCC"; \
961
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
962
echo "-----------------------------------------------------------------------------"; \
966
rm -f $(configure_stamp) $(build_stamp)
967
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
977
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
978
../src/configure $(subst ___, ,$(CONFARGS))
980
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
981
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
982
mkdir -p $(builddir)/sys-include; \
983
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
986
touch $(configure_stamp)
988
build: $(build_dependencies)
990
$(build_dummy_stamp):
991
touch $(build_dummy_stamp)
993
$(build_locale_stamp):
994
ifeq ($(locale_data)-$(with_cxx),generate-yes)
995
: # build locales needed by libstdc++ testsuite
998
- sh debian/locale-gen
1000
touch $(build_locale_stamp)
1003
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1005
rm -f bootstrap-protocol
1006
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1008
ifeq ($(DEB_CROSS),yes)
1009
: # build cross compiler for $(TARGET_ALIAS)
1014
$(MAKE) -C $(builddir) $(NJOBS) \
1017
$(LDFLAGS_TO_PASS) \
1019
echo $$? > status; \
1020
) 2>&1 | tee bootstrap-protocol
1021
s=`cat status`; rm -f status; test $$s -eq 0
1023
# REVERSE_CROSS build
1024
ifeq ($(REVERSE_CROSS),yes)
1025
: # build cross compiler for $(TARGET_ALIAS)
1030
$(MAKE) -C $(builddir) $(NJOBS) \
1033
$(LDFLAGS_TO_PASS) \
1035
echo $$? > status; \
1036
) 2>&1 | tee bootstrap-protocol
1037
s=`cat status`; rm -f status; test $$s -eq 0
1040
ifeq ($(with_java),yes)
1042
ln -sf /usr/bin/fastjar bin/jar
1043
ifeq ($(with_native_ecj),yes)
1044
: # prepare the standalone ecj jar
1045
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1046
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1048
ifeq ($(with_java_maintainer_mode),yes)
1051
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1054
: # If we don't have gjavah in PATH, try to build it with the old gij
1056
if [ -x /usr/bin/gjavah-4.8 ]; then \
1057
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1058
elif [ -x bin/gjavah ]; then \
1061
mkdir -p $(builddir)/java_hacks; \
1062
cd $(builddir)/java_hacks; \
1063
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1064
mkdir -p gnu/classpath/tools; \
1065
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1066
gnu/classpath/tools/; \
1067
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1068
gnu/classpath/tools/common; \
1070
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1072
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1073
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1074
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1077
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1078
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1079
) > $(PWD)/bin/gjavah; \
1080
chmod +x $(PWD)/bin/gjavah; \
1084
: # build native compiler
1090
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1093
$(STAGE1_CFLAGS_TO_PASS) \
1094
$(LDFLAGS_TO_PASS) \
1096
echo $$? > status; \
1097
) 2>&1 | tee bootstrap-protocol
1098
s=`cat status`; rm -f status; test $$s -eq 0
1101
-chmod 755 $(srcdir)/contrib/warn_summary
1102
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1103
rm -f bootstrap-summary; \
1104
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1105
> bootstrap-summary; \
1108
touch $(build_stamp)
1110
ifeq ($(versioned_packages),yes)
1111
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1114
ifeq ($(DEB_CROSS),yes)
1115
CC_for_hppa64_cross = $(CC)
1117
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1120
$(configure_hppa64_stamp): $(build_stamp)
1122
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1123
rm -rf $(builddir_hppa64)
1124
mkdir $(builddir_hppa64)
1126
cd $(builddir_hppa64) && \
1129
CC="$(CC_for_hppa64_cross)" \
1131
--enable-languages=c \
1133
--libexecdir=/$(hppa64libexecdir) \
1137
--disable-libatomic \
1140
--disable-libmudflap \
1142
--disable-libquadmath \
1144
--with-system-zlib \
1145
--with-as=/usr/bin/hppa64-linux-gnu-as \
1146
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1147
--includedir=/usr/hppa64-linux-gnu/include \
1148
--build=$(DEB_BUILD_GNU_TYPE) \
1149
--host=$(DEB_HOST_GNU_TYPE) \
1150
--target=hppa64-linux-gnu
1151
touch $(configure_hppa64_stamp)
1153
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1157
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1158
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1159
CC="$(CC_for_hppa64_cross)" \
1162
touch $(build_hppa64_stamp)
1164
$(configure_neon_stamp): $(build_stamp)
1166
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1167
rm -rf $(builddir_neon)
1168
mkdir $(builddir_neon)
1170
cd $(builddir_neon) && \
1173
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1175
--disable-bootstrap \
1176
--enable-languages=c,c++,objc,fortran \
1178
--libexecdir=/$(libexecdir) \
1179
--program-suffix=-$(BASE_VERSION) \
1182
--disable-libmudflap \
1183
--with-arch=armv7-a --with-tune=cortex-a8 \
1184
--with-float=$(float_abi) --with-fpu=neon \
1185
--host=arm-linux-gnueabi \
1186
--build=arm-linux-gnueabi \
1187
--target=arm-linux-gnueabi
1188
touch $(configure_neon_stamp)
1190
$(build_neon_stamp): $(configure_neon_stamp)
1194
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1195
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1198
touch $(build_neon_stamp)
1202
$(srcdir)/gcc/doc/cpp.texi \
1203
$(srcdir)/gcc/doc/cppinternals.texi \
1204
$(srcdir)/gcc/doc/gcc.texi \
1205
$(srcdir)/gcc/doc/gccint.texi
1206
ifeq ($(with_fortran),yes)
1207
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1209
ifeq ($(with_java),yes)
1210
MANUALS += $(srcdir)/gcc/java/gcj.texi
1212
ifeq ($(with_ada),yes)
1214
$(builddir)/gcc/doc/gnat_ugn.texi \
1215
$(srcdir)/gcc/ada/gnat_rm.texi \
1216
$(srcdir)/gcc/ada/gnat-style.texi
1218
ifeq ($(with_gomp),yes)
1219
MANUALS += $(srcdir)/libgomp/libgomp.texi
1221
ifeq ($(with_itm),yes)
1222
MANUALS += $(srcdir)/libitm/libitm.texi
1224
ifeq ($(with_qmath),yes)
1225
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1227
ifeq ($(with_go),yes)
1228
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1231
html-docs: $(build_html_stamp)
1232
#$(build_html_stamp): html-texi2html
1233
#$(build_html_stamp): html-makeinfo
1234
$(build_html_stamp): html-makeinfo-nosplit
1237
rm -rf html $(builddir)/gcc/html
1238
mkdir $(builddir)/gcc/html
1239
ln -s $(builddir)/gcc/html html
1240
cd $(builddir)/gcc; \
1241
for manual in $(MANUALS); do \
1242
outname=`basename $${manual} .texi`; \
1243
echo "generating $$outname ..."; \
1244
texi2html -number -split chapter \
1245
-I $(srcdir)/gcc/doc/include \
1246
-I $(srcdir)/gcc/p/doc \
1247
-I $(srcdir)/gcc/p/doc/generated \
1248
-I `dirname $${manual}` \
1249
-I $(builddir)/gcc \
1250
-I $(buildlibdir)/libquadmath \
1258
cd $(builddir)/gcc; \
1259
for manual in $(MANUALS); do \
1260
manual=`find $(srcdir) -name $${file}.texi`; \
1261
outname=`basename $${manual} .texi`; \
1262
echo "generating $$outname ..."; \
1263
if [ "$${manual}" ]; then \
1264
makeinfo --html --number-sections \
1265
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1266
-I $(srcdir)/gcc/p/doc \
1267
-I $(srcdir)/gcc/p/doc/generated \
1268
-I $(builddir)/gcc \
1269
-I $(buildlibdir)/libquadmath \
1275
html-makeinfo-nosplit:
1278
cd $(builddir)/gcc; \
1279
for manual in $(MANUALS); do \
1280
outname=`basename $${manual} .texi`.html; \
1281
echo "generating $$outname ..."; \
1282
makeinfo --html --number-sections --no-split \
1283
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1284
-I $(srcdir)/gcc/p/doc \
1285
-I $(srcdir)/gcc/p/doc/generated \
1286
-I $(builddir)/gcc \
1287
-I $(buildlibdir)/libquadmath \
1288
-o $(PWD)/html/$${outname} \
1292
# start the script only on architectures known to have slow autobuilders ...
1293
logwatch_archs := alpha arm m68k mips mipsel sparc
1294
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1295
start_logwatch = yes
1297
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1298
start_logwatch = yes
1301
stamps/mauve-build: stamps/build
1304
ifeq ($(with_mauve_check),yes)
1305
tar xf $(wildcard /usr/src/mauve*.tar.*)
1310
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1311
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1315
stamps/mauve-check: stamps/build stamps/mauve-build
1316
ifeq ($(with_mauve_check),yes)
1318
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1319
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1320
xvfb-run -s "-extension GLX" java Harness \
1321
-vm $(CURDIR)/$(sdkimg)/bin/java \
1322
-file $(CURDIR)/debian/mauve_tests \
1323
-timeout 30000 2>&1 \
1327
echo "mauve testsuite not run for this build" > mauve/mauve_output
1331
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1332
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1334
rm -f $(builddir)/runcheck*
1336
-chmod 755 $(srcdir)/contrib/test_summary
1338
: # needed for the plugin tests to succeed
1339
ln -sf gcc $(builddir)/prev-gcc
1340
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1342
ifneq ($(with_common_libs),yes)
1343
ifeq ($(with_cxx),yes)
1344
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1346
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1347
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1350
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1351
echo "Running testsuite in $$d ..."; \
1356
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1358
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1359
done 2>&1 | tee test-protocol2
1361
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1362
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1364
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1365
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1366
) > libstdc++-test-summary
1367
echo 'BEGIN installed libstdc++-v3 test-summary'
1368
cat libstdc++-test-summary
1369
echo 'END installed libstdc++-v3 test-summary'
1370
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1375
ifeq ($(start_logwatch),yes)
1376
: # start logwatch script for regular output during test runs
1377
chmod +x debian/logwatch.sh
1378
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1379
-m '\ntestsuite still running ...\n' \
1381
$(builddir)/gcc/testsuite/gcc/gcc.log \
1382
$(builddir)/gcc/testsuite/g++/g++.log \
1383
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1384
$(builddir)/gcc/testsuite/objc/objc.log \
1385
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1386
$(builddir)/gcc/testsuite/gnat/gnat.log \
1387
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1388
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1389
$(builddir)/gcc/p/test/test_log \
1390
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1391
$(buildlibdir)/libjava/testsuite/libjava.log \
1392
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1393
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1394
$(buildlibdir)/libffi/testsuite/libffi.log \
1398
ifeq ($(with_ada),yes)
1399
chmod +x debian/acats-killer.sh
1400
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1401
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1402
$(builddir)/gcc/testsuite/g++.log \
1408
for d in $(checkdirs); do \
1409
echo "Running testsuite in $$d ..."; \
1413
EXTRA_TEST_PFLAGS=-g0 \
1414
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1416
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1417
done 2>&1 | tee test-protocol
1419
-ps aux | fgrep logwatch | fgrep -v fgrep
1420
-if [ -f $(builddir)/logwatch.pid ]; then \
1421
kill -1 `cat $(builddir)/logwatch.pid`; \
1423
kill -9 `cat $(builddir)/logwatch.pid`; \
1424
rm -f $(builddir)/logwatch.pid; \
1426
-ps aux | fgrep logwatch | fgrep -v fgrep
1428
ifeq ($(with_ada),yes)
1429
-if [ -f $(builddir)/acats-killer.pid ]; then \
1430
kill -1 `cat $(builddir)/acats-killer.pid`; \
1432
kill -9 `cat $(builddir)/acats-killer.pid`; \
1433
rm -f $(builddir)/acats-killer.pid; \
1437
: # running the libjava testsuite alone is missing this information
1438
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1440
if [ -x $(srcdir)/contrib/test_summary ]; then \
1441
rm -f test-summary; \
1444
echo '' > ts-include; \
1445
echo '' >> ts-include; \
1446
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1447
echo 'Bootstrap comparison failure:' >> ts-include; \
1448
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1449
echo '' >> ts-include; \
1450
echo '' >> ts-include; \
1452
echo "Build Dependencies:" >> ts-include; \
1453
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1454
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1455
| fgrep -v '<none>' >> ts-include; \
1456
echo '' >> ts-include; \
1457
cat ../$(patch_stamp) >> ts-include; \
1458
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1459
$(srcdir)/contrib/test_summary \
1460
-i ts-include -m "$(S_EMAIL)" \
1461
) > raw-test-summary; \
1462
if [ -n "$(testsuite_tarball)" ]; then \
1463
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1464
echo " Do not interpret the results on its own" >> test-summary; \
1465
echo " but compare them with the results from" >> test-summary; \
1466
echo " the gcc-snapshot package." >> test-summary; \
1468
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1470
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1471
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1472
echo '' >> test-summary; \
1473
cat bootstrap-summary >> test-summary; \
1475
echo 'BEGIN test-summary'; \
1477
echo 'END test-summary'; \
1479
ifeq ($(with_d),yes)
1480
: # the D test failures for the non-default multilibs are known, ignore them
1481
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1482
mv -f test-summary.tmp test-summary
1485
touch $(check_stamp)
1487
$(check_inst_stamp): $(check_stamp)
1488
rm -f test-inst-protocol
1490
ifeq ($(start_logwatch),yes)
1491
: # start logwatch script for regular output during test runs
1492
chmod +x debian/logwatch.sh
1493
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1494
-m '\ntestsuite (3.3) still running ...\n' \
1495
test-inst-protocol \
1496
check-inst/{gcc,g++,g77,objc}.log \
1503
echo "Running testsuite ..."
1507
EXTRA_TEST_PFLAGS=-g0 \
1508
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1509
cd check-inst && $(srcdir)/contrib/test_installed \
1510
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1511
2>&1 | tee test-inst-protocol
1513
-ps aux | fgrep logwatch | fgrep -v fgrep
1514
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1515
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1519
-ps aux | fgrep logwatch | fgrep -v fgrep
1521
-chmod 755 $(srcdir)/contrib/test_summary
1522
if [ -x $(srcdir)/contrib/test_summary ]; then \
1523
rm -f test-inst-summary; \
1526
echo '' > ts-include; \
1527
echo '' >> ts-include; \
1528
echo "Build Dependencies:" >> ts-include; \
1529
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1530
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1531
| fgrep -v '<none>' >> ts-include; \
1532
echo '' >> ts-include; \
1533
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1534
$(srcdir)/contrib/test_summary \
1535
-i ts-include -m "$(S_EMAIL)" \
1536
) > raw-test-inst-summary; \
1537
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1538
>> test-inst-summary; \
1539
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1540
| grep -v EOF >> test-inst-summary; \
1541
echo 'BEGIN test-installed-summary'; \
1542
cat test-inst-summary; \
1543
echo 'END test-installed-summary'; \
1546
chmod 755 debian/reduce-test-diff.awk
1547
if diff -u test-inst-summary test-summary \
1548
| debian/reduce-test-diff.awk > diff-summary; \
1550
mv -f diff-summary testsuite-comparision; \
1553
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1556
) > testsuite-comparision; \
1557
rm -f diff-summary; \
1559
touch $(check_inst_stamp)
1561
clean: debian/control
1564
rm -f *-summary *-protocol testsuite-comparision summary-diff
1565
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1566
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1568
rm -f $(srcdir)/gcc/po/*.gmo
1569
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1570
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1572
[ -f $$f ] || continue; \
1574
| 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$$//'); \
1577
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1578
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1579
rm -f debian/shlibs.local debian/substvars.local
1580
rm -f debian/*.debhelper
1581
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1582
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1583
rm -f debian/lib*gcj-bc.shlibs
1584
rm -rf bin locales share
1588
$(cross_clean) dh_clean
1590
# -----------------------------------------------------------------------------
1591
# some abbrevations for the package names and directories;
1592
# p_XXX is the package name, d_XXX is the package directory
1593
# these macros are only used in the binary-* targets.
1595
ifeq ($(versioned_packages),yes)
1596
pkg_ver := -$(BASE_VERSION)
1599
ifneq ($(DEB_CROSS),yes)
1600
p_base = gcc$(pkg_ver)-base
1601
p_xbase = gcc$(pkg_ver)-base
1602
p_gcc = gcc$(pkg_ver)
1603
p_cpp = cpp$(pkg_ver)
1604
p_cppd = cpp$(pkg_ver)-doc
1605
p_cxx = g++$(pkg_ver)
1606
p_doc = gcc$(pkg_ver)-doc
1607
p_lgcc = libgcc$(GCC_SONAME)
1609
# only triggered if DEB_CROSS set
1610
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1611
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1612
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1614
p_base = gcc$(pkg_ver)-base
1617
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1618
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1619
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1621
p_hppa64 = gcc$(pkg_ver)-hppa64
1624
d_base = debian/$(p_base)
1625
d_xbase = debian/$(p_xbase)
1626
d_gcc = debian/$(p_gcc)
1627
d_cpp = debian/$(p_cpp)
1628
d_cppd = debian/$(p_cppd)
1629
d_cxx = debian/$(p_cxx)
1630
d_doc = debian/$(p_doc)
1631
d_lgcc = debian/$(p_lgcc)
1632
d_hppa64= debian/$(p_hppa64)
1634
d_neon = debian/tmp-neon
1636
common_substvars = \
1637
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1639
ifeq ($(DEB_CROSS),yes)
1640
lib_binaries := indep_binaries
1642
lib_binaries := arch_binaries
1645
# ---------------------------------------------------------------------------
1647
ifeq ($(single_package),yes)
1648
include debian/rules.d/binary-snapshot.mk
1651
ifneq ($(DEB_CROSS),yes)
1652
ifeq ($(with_source),yes)
1653
include debian/rules.d/binary-source.mk
1657
ifneq ($(BACKPORT),true)
1658
ifeq ($(with_gccxbase),yes)
1659
include debian/rules.d/binary-base.mk
1662
ifeq ($(with_gccbase),yes)
1663
include debian/rules.d/binary-base.mk
1666
# always include to get some definitions
1667
include debian/rules.d/binary-libgcc.mk
1669
ifeq ($(with_libqmath),yes)
1670
include debian/rules.d/binary-libquadmath.mk
1673
ifeq ($(with_libgmath),yes)
1674
include debian/rules.d/binary-libgccmath.mk
1677
ifeq ($(with_libgomp),yes)
1678
include debian/rules.d/binary-libgomp.mk
1681
ifeq ($(with_libitm),yes)
1682
include debian/rules.d/binary-libitm.mk
1685
ifeq ($(with_libatomic),yes)
1686
include debian/rules.d/binary-libatomic.mk
1689
ifeq ($(with_libbacktrace),yes)
1690
include debian/rules.d/binary-libbacktrace.mk
1693
ifeq ($(with_cdev),yes)
1694
include debian/rules.d/binary-cpp.mk
1697
ifeq ($(with_fixincl),yes)
1698
include debian/rules.d/binary-fixincl.mk
1701
ifeq ($(with_mudflap),yes)
1702
include debian/rules.d/binary-libmudflap.mk
1705
ifeq ($(with_libssp),yes)
1706
include debian/rules.d/binary-libssp.mk
1709
ifeq ($(with_objcxx),yes)
1710
include debian/rules.d/binary-objcxx.mk
1713
ifeq ($(with_objc),yes)
1714
include debian/rules.d/binary-objc.mk
1715
include debian/rules.d/binary-libobjc.mk
1718
ifeq ($(with_go),yes)
1719
include debian/rules.d/binary-go.mk
1722
# include before cxx
1723
ifeq ($(with_java),yes)
1724
include debian/rules.d/binary-java.mk
1727
ifeq ($(with_cxxdev),yes)
1728
include debian/rules.d/binary-cxx.mk
1730
ifeq ($(with_cxx),yes)
1731
include debian/rules.d/binary-libstdcxx.mk
1734
ifeq ($(with_libasan),yes)
1735
include debian/rules.d/binary-libasan.mk
1738
ifeq ($(with_libtsan),yes)
1739
include debian/rules.d/binary-libtsan.mk
1742
ifeq ($(with_f77),yes)
1743
include debian/rules.d/binary-f77.mk
1746
ifeq ($(with_fortran),yes)
1747
include debian/rules.d/binary-fortran.mk
1750
ifeq ($(with_ada),yes)
1751
include debian/rules.d/binary-ada.mk
1754
ifeq ($(with_d),yes)
1755
include debian/rules.d/binary-d.mk
1758
ifeq ($(with_libnof),yes)
1759
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1760
include debian/rules.d/binary-nof.mk
1764
ifeq ($(with_softfloat),yes)
1765
include debian/rules.d/binary-softfloat.mk
1768
# gcc must be moved/built after g77 and g++
1769
ifeq ($(with_cdev),yes)
1770
include debian/rules.d/binary-gcc.mk
1773
ifeq ($(with_hppa64),yes)
1774
include debian/rules.d/binary-hppa64.mk
1777
ifeq ($(with_neon),yes)
1778
include debian/rules.d/binary-neon.mk
1783
endif # ($(single_package),yes)
1785
# ----------------------------------------------------------------------
1786
install: $(install_dependencies)
1788
$(install_dummy_stamp): $(build_dummy_stamp)
1789
touch $(install_dummy_stamp)
1791
$(install_snap_stamp): $(build_dependencies)
1796
: # Install directories
1800
ifeq ($(with_hppa64),yes)
1803
$(MAKE) -C $(builddir_hppa64) \
1806
$(LDFLAGS_TO_PASS) \
1807
DESTDIR=$(PWD)/$(d) \
1810
ls -l $(d)/$(PF)/bin
1811
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1812
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1814
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1817
for i in ar nm ranlib; do \
1818
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1821
: # remove files not needed from the hppa64 build
1822
rm -rf $(d)/$(PF)/share/info
1823
rm -rf $(d)/$(PF)/share/man
1824
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1825
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1827
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1828
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1830
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1833
README|features.h|syslimits.h|limits.h) ;; \
1834
linux|$(TARGET_ALIAS)) ;; \
1835
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1836
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1841
: # Work around PR lto/41569
1842
ln -sf gcc $(builddir)/prev-gcc
1843
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1845
: # Install everything
1848
$(MAKE) -C $(builddir) \
1850
$(LDFLAGS_TO_PASS) \
1851
DESTDIR=$(PWD)/$(d) \
1852
infodir=/$(PF)/share/info \
1853
mandir=/$(PF)/share/man \
1856
ls -l $(d)/$(PF)/bin
1857
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1858
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1860
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1863
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1866
README|features.h|syslimits.h|limits.h) ;; \
1867
linux|$(TARGET_ALIAS)) ;; \
1868
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1869
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1873
ifneq ($(configured_libdir),$(libdir))
1874
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1875
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1876
$(d)/$(PF)/$(libdir)/. || true; \
1880
# FIXME: libjava/classpath not correctly patched
1881
ifeq ($(with_java),yes)
1882
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1883
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1884
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1885
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1886
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1889
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1891
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1892
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1893
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1894
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1895
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1896
$(srcdir)/libjava/libgcj_bc.c \
1897
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1898
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
1902
if [ -d $(d)/usr/man/man1 ]; then \
1903
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
1906
chmod 755 debian/dh_*
1907
touch $(install_snap_stamp)
1909
$(install_stamp): $(build_stamp)
1912
dh_clean -k -N$(p_hppa64)
1914
if [ -f $(binary_stamp)-hppa64 ]; then \
1915
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
1917
rm -f $(binary_stamp)*
1918
if [ -f saved-stamp-hppa64 ]; then \
1919
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
1922
: # Install directories
1924
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
1925
ifeq ($(biarch32),yes)
1926
mkdir -p $(d)/$(PF)/lib32/debug
1928
ifeq ($(biarch64),yes)
1929
mkdir -p $(d)/$(PF)/lib64/debug
1931
ifeq ($(biarchn32),yes)
1932
mkdir -p $(d)/$(PF)/$(libn32)/debug
1934
ifeq ($(biarchx32),yes)
1935
mkdir -p $(d)/$(PF)/libx32/debug
1938
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
1939
ifneq ($(DEB_TARGET_ARCH),x32)
1940
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
1941
: # (this works when CONFARGS contains '--disable-multilib')
1942
ln -s $(configured_libdir) $(d)/lib64
1943
mkdir -p $(d)/$(PF)/$(configured_libdir)
1944
ln -s $(configured_libdir) $(d)/$(PF)/lib64
1947
ifeq ($(DEB_TARGET_ARCH),x32)
1948
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
1949
ln -s $(configured_libdir) $(d)/libx32
1950
mkdir -p $(d)/$(PF)/$(configured_libdir)
1951
ln -s $(configured_libdir) $(d)/$(PF)/libx32
1954
: # Work around PR lto/41569
1955
ln -sf gcc $(builddir)/prev-gcc
1957
: # Install everything
1960
$(MAKE) -C $(builddir) \
1962
$(LDFLAGS_TO_PASS) \
1963
DESTDIR=$(PWD)/$(d) \
1964
infodir=/$(PF)/share/info \
1965
mandir=/$(PF)/share/man \
1968
ifneq ($(configured_libdir),$(libdir))
1969
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
1970
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1971
$(d)/$(PF)/$(libdir)/. || true; \
1975
ifeq ($(with_libcxxdbg),yes)
1976
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
1977
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
1978
[ -f $$i ] || continue; \
1979
d=$$(dirname $$i); \
1980
b=$$(basename $$i); \
1981
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
1986
# FIXME: libjava/classpath not correctly patched
1987
ifeq ($(with_java),yes)
1988
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1989
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1990
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1991
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1992
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1996
: # remove rpath settings from binaries and shared libs
1997
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
1998
$(if $(filter $(with_multiarch_lib),yes), \
1999
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2000
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2001
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2003
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2004
[ -h $$i ] && continue; \
2005
chrpath --delete $$i; \
2006
echo "removed RPATH: $$i"; \
2009
: # remove '*.la' and '*.lai' files, not shipped in any package.
2010
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2012
ifneq ($(with_libgnat),yes)
2013
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2016
ifeq ($(GFDL_INVARIANT_FREE),yes)
2017
for i in gcc gcov; do \
2018
I=`echo $$i | tr a-z A-Z`; \
2019
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2020
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2023
ifeq ($(with_fortran),yes)
2025
I=`echo $$i | tr a-z A-Z`; \
2026
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2027
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2030
ifeq ($(with_java),yes)
2031
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2033
I=`echo $$i | tr a-z A-Z`; \
2034
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2035
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2040
# ifeq ($(with_ada),yes)
2041
# : # rename files (versioned ada binaries)
2043
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2044
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2045
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2047
# for i in $(GNAT_TOOLS); do \
2048
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2052
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2053
ifneq ($(DEB_STAGE),stage1)
2054
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2055
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2056
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2057
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2059
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2060
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2061
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2062
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2067
for i in ar nm ranlib; do \
2068
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2071
chmod 755 debian/dh_*
2073
# tar cf tmp.tar debian/tmp
2075
touch $(install_stamp)
2077
$(install_hppa64_stamp): $(build_hppa64_stamp)
2081
mkdir -p $(d_hppa64)/$(PF)
2084
$(MAKE) -C $(builddir_hppa64) \
2087
$(LDFLAGS_TO_PASS) \
2088
DESTDIR=$(PWD)/$(d_hppa64) \
2091
ifeq ($(versioned_packages),yes)
2092
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp \
2093
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp$(pkg_ver)
2096
ifneq ($(single_package),yes)
2097
: # remove files not needed
2098
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2099
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2100
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2101
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2102
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2104
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2105
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2106
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2109
touch $(install_hppa64_stamp)
2111
$(install_neon_stamp): $(build_neon_stamp)
2115
mkdir -p $(d_neon)/$(PF)
2118
$(MAKE) -C $(builddir_neon) \
2121
$(LDFLAGS_TO_PASS) \
2122
DESTDIR=$(PWD)/$(d_neon) \
2124
touch $(install_neon_stamp)
2126
# ----------------------------------------------------------------------
2127
# Build architecture-dependent files here.
2128
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2129
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2130
ifeq ($(with_check),yes)
2132
# : # Send Email about sucessfull build.
2133
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2136
# ----------------------------------------------------------------------
2137
# Build architecture-independent files here.
2138
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2139
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2142
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2144
binary: binary-indep binary-arch
2145
.PHONY: build clean binary-indep binary-arch binary