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 \
153
--disable-libmudflap \
155
--disable-libquadmath \
157
--libexecdir=/$(libexecdir) \
158
--libdir=/$(PF)/$(configured_libdir) \
159
$(if $(with_build_sysroot),--with-build-sysroot=$(with_build_sysroot)) \
160
$(if $(with_sysroot),--with-sysroot=$(with_sysroot))
162
ifeq ($(with_multiarch_lib),yes)
167
ifeq ($(DEB_STAGE),stage1)
180
--enable-linker-build-id \
182
ifneq ($(single_package),yes)
184
--libexecdir=/$(libexecdir) \
185
--without-included-gettext \
186
--enable-threads=posix \
187
--with-gxx-include-dir=/$(cxx_inc_dir) \
188
--libdir=/$(PF)/$(configured_libdir)
191
ifneq ($(with_cpp),yes)
192
CONFARGS += --disable-cpp
195
ifeq ($(with_nls),yes)
196
CONFARGS += --enable-nls
198
CONFARGS += --disable-nls
201
ifeq ($(with_bootstrap),off)
202
CONFARGS += --disable-bootstrap
203
else ifneq ($(with_bootstrap),)
204
CONFARGS += --enable-bootstrap=$(with_bootstrap)
207
ifneq ($(with_sysroot),)
208
CONFARGS += --with-sysroot=$(with_sysroot)
210
ifneq ($(with_build_sysroot),)
211
CONFARGS += --with-build-sysroot=$(with_build_sysroot)
214
ifeq ($(force_gnu_locales),yes)
215
CONFARGS += --enable-clocale=gnu
218
ifeq ($(with_cxx)-$(with_debug),yes-yes)
219
CONFARGS += --enable-libstdcxx-debug
221
CONFARGS += --enable-libstdcxx-time=yes
223
ifeq (,$(filter $(DEB_TARGET_ARCH), hurd-i386 kfreebsd-i386 kfreebsd-amd64))
224
CONFARGS += --enable-gnu-unique-object
227
ifneq ($(with_ssp),yes)
228
CONFARGS += --disable-libssp
231
ifneq ($(with_mudflap),yes)
232
CONFARGS += --disable-libmudflap
235
ifneq ($(with_gomp),yes)
236
CONFARGS += --disable-libgomp
239
ifneq ($(with_itm),yes)
240
CONFARGS += --disable-libitm
243
ifeq ($(with_plugins),yes)
244
CONFARGS += --enable-plugin
247
#ifeq ($(with_gold),yes)
248
# CONFARGS += --enable-gold --enable-ld=default
251
#CONFARGS += --with-plugin-ld=ld.gold
252
#CONFARGS += --with-plugin-ld
256
CONFARGS += --with-system-zlib
258
jvm_name_short = java-1.5.0-gcj-$(BASE_VERSION)$(if $(findstring snap,$(PKGSOURCE)),-snap)
259
jvm_name_long = $(jvm_name_short)-1.5.0.0
261
ifeq ($(with_java),yes)
262
CONFARGS += --disable-browser-plugin
263
ifeq ($(with_java_maintainer_mode),yes)
264
CONFARGS += --enable-java-maintainer-mode
266
ifeq ($(with_java_biarch_awt),yes)
267
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)-default))
269
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)))
271
ifneq (,$(findstring gtk,$(java_awt_peers)))
272
CONFARGS += --enable-gtk-cairo
274
jvm_ext = -$(DEB_TARGET_ARCH)$(if $(filter yes,$(DEB_CROSS)),-cross)
275
jvm_dir = /usr/lib/jvm/$(jvm_name_short)$(jvm_ext)
276
CONFARGS += --with-java-home=$(jvm_dir)/jre
277
CONFARGS += --enable-java-home \
278
--with-jvm-root-dir=$(jvm_dir) \
279
--with-jvm-jar-dir=/usr/lib/jvm-exports/$(jvm_name_short)$(jvm_ext)
280
CONFARGS += --with-arch-directory=$(java_cpu)
281
ifeq (./,$(dir $(ecj_jar)))
282
CONFARGS += --with-ecj-jar=$(jvm_dir)/lib/ecj.jar
284
CONFARGS += --with-ecj-jar=$(ecj_jar)
288
ifeq ($(with_gcj),yes)
289
ifeq ($(DEB_HOST_GNU_CPU),m32r)
290
CONFARGS += --enable-libgcj
294
ifeq ($(with_objc)-$(with_objc_gc),yes-yes)
295
CONFARGS += --enable-objc-gc
298
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), i486-linux-gnu i586-linux-gnu i686-linux-gnu))
299
ifeq ($(multilib),yes)
300
ifeq ($(biarch64),yes)
301
CONFARGS += --enable-targets=all
306
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), x86_64-linux-gnu x86_64-kfreebsd-gnu s390x-linux-gnu))
307
ifneq ($(biarch32),yes)
308
CONFARGS += --disable-multilib
312
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), powerpc-linux-gnu powerpc-linux-gnuspe))
313
CONFARGS += --enable-secureplt
314
ifeq ($(biarch64),yes)
315
CONFARGS += --disable-softfloat --with-cpu=default32
316
ifeq ($(multilib),yes)
317
CONFARGS += --disable-softfloat \
318
--enable-targets=powerpc-linux,powerpc64-linux
321
CONFARGS += --disable-multilib
325
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
326
CONFARGS += --enable-secureplt
327
ifeq ($(biarch32),yes)
328
ifeq ($(multilib),yes)
329
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
332
CONFARGS += --disable-multilib
334
ifeq ($(distribution),Ubuntu)
335
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
339
ifeq ($(REVERSE_CROSS),yes)
340
# FIXME: requires isl and cloog headers for the target
341
#CONFARGS += --without-isl
342
# FIXME: build currently fails build the precompiled headers
343
CONFARGS += --disable-libstdcxx-pch
346
ifeq ($(with_multiarch_lib),yes)
347
CONFARGS += --enable-multiarch
350
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
351
CONFARGS += --with-cpu=8548 --enable-e500_double
354
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
355
CONFARGS += --with-float=soft
358
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
359
CONFARGS += --with-fpu=vfp
362
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
363
ifeq ($(multilib),yes)
364
CONFARGS += --enable-multilib
366
CONFARGS += --disable-sjlj-exceptions
367
# FIXME: libjava is not ported for thumb, this hack only works for
368
# separate gcj builds
369
ifneq (,$(filter armhf,$(DEB_TARGET_ARCH)))
370
ifneq (,$(findstring gcj,$(PKGSOURCE)))
371
with_arm_arch = armv6
373
with_arm_arch = armv7-a
375
with_arm_fpu = vfpv3-d16
378
ifeq ($(distribution),Debian)
379
with_arm_arch = armv4t
380
else ifneq (,$(filter $(distrelease),karmic))
381
with_arm_arch = armv6
382
with_arm_fpu = vfpv3-d16
383
else ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
384
ifneq (,$(findstring gcj,$(PKGSOURCE)))
385
with_arm_arch = armv6
387
with_arm_arch = armv7-a
389
with_arm_fpu = vfpv3-d16
391
with_arm_arch = armv5t # starting with quantal
394
CONFARGS += --with-arch=$(with_arm_arch)
395
ifneq (,$(with_arm_fpu))
396
CONFARGS += --with-fpu=$(with_arm_fpu)
398
CONFARGS += --with-float=$(float_abi)
399
ifeq ($(with_arm_thumb),yes)
400
CONFARGS += --with-mode=thumb
404
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
405
CONFARGS += --disable-werror
407
# FIXME: correct fix-warnings.dpatch
408
ifeq ($(distribution),Ubuntu)
409
CONFARGS += --disable-werror
412
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
413
ifeq ($(biarch64),yes)
414
CONFARGS += --enable-targets=all
418
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
419
ifneq ($(biarch32),yes)
420
CONFARGS += --disable-multilib
424
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
425
CONFARGS += --with-system-libunwind
428
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
429
ifeq ($(multilib),yes)
430
CONFARGS += --with-multilib-list=m4,m4-nofpu
432
CONFARGS += --with-cpu=sh4
435
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
436
CONFARGS += --disable-multilib
439
ifeq ($(DEB_TARGET_ARCH_OS),linux)
440
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
441
CONFARGS += --with-long-double-128
445
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
446
ifneq (,$(filter $(distrelease),etch lenny dapper hardy))
447
CONFARGS += --with-arch-32=i486
448
else ifneq (,$(filter $(distrelease),squeeze wheezy sid jaunty karmic lucid))
449
CONFARGS += --with-arch-32=i586
451
CONFARGS += --with-arch-32=i686
455
ifeq ($(DEB_TARGET_ARCH),amd64)
456
CONFARGS += --with-abi=m64
458
ifeq ($(multilib),yes)
459
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
460
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
461
else ifeq ($(DEB_TARGET_ARCH),x32)
462
CONFARGS += --with-abi=mx32 --with-multilib-list=mx32,m64,m32
466
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
467
CONFARGS += --with-arch=i586
470
ifeq ($(DEB_TARGET_ARCH),lpia)
471
CONFARGS += --with-arch=pentium-m --with-tune=i586
474
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
475
CONFARGS += --with-tune=generic
478
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
479
CONFARGS += --with-mips-plt
480
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
481
ifeq ($(multilib),yes)
482
ifeq ($(biarchn32)-$(biarch64),yes-yes)
483
CONFARGS += --enable-targets=all
484
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
489
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
490
CONFARGS += --with-mips-plt
491
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
492
ifeq ($(multilib),yes)
493
ifeq ($(biarchn32)-$(biarch64),yes-yes)
494
CONFARGS += --enable-targets=all
495
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
500
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
501
ifeq ($(multilib),yes)
502
ifeq ($(biarch64),yes)
503
CONFARGS += --enable-targets=all
508
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
509
CONFARGS += --disable-libstdcxx-pch
512
ifneq (,$(findstring gdc, $(PKGSOURCE)))
513
CONFARGS += --disable-libquadmath
516
ifeq ($(trunk_build),yes)
517
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
518
CONFARGS += --disable-werror
520
CONFARGS += --enable-checking=yes
522
CONFARGS += --enable-checking=release
526
--build=$(DEB_BUILD_GNU_TYPE) \
527
--host=$(DEB_HOST_GNU_TYPE) \
528
--target=$(TARGET_ALIAS)
530
ifeq ($(DEB_CROSS),yes)
532
--program-prefix=$(TARGET_ALIAS)-
533
ifneq ($(with_deps_on_target_arch_pkgs),yes)
535
--includedir=/$(PFL)/include
539
ifeq ($(with_bootstrap),off)
541
else ifeq ($(with_bootstrap),)
542
bootstrap_target = bootstrap-lean
543
# no profiledbootstrap on the following architectures
544
# - m68k: we're happy that it builds at all
545
no_profiled_bs_archs := alpha arm arm64 hppa m68k
546
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
547
bootstrap_target = profiledbootstrap
548
# FIXME: disabled for first uploads
549
bootstrap_target = bootstrap-lean
551
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
552
bootstrap_target = bootstrap-lean
554
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
555
bootstrap_target = bootstrap-lean
558
# disable profiled bootstrap on slow archs, get to testing first ...
559
ifeq ($(distribution),Debian)
560
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
561
bootstrap_target = bootstrap-lean
564
ifeq ($(distribution),Ubuntu)
565
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
566
bootstrap_target = bootstrap-lean
572
# Increase the timeout for one testrun on slow architectures
573
ifeq ($(distribution),Debian)
574
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
576
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
579
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
582
else ifeq ($(distribution),Ubuntu)
583
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
585
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
591
ifneq ($(trunk_build),yes)
592
ifeq ($(with_ssp),yes)
593
ifneq ($(single_package),yes)
594
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
596
# FIXME Ubuntu armel buildd hangs
597
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
600
ifeq ($(distribution),Ubuntu)
601
# the buildds are just slow ... don't check the non-default
602
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
609
ifeq ($(distribution),Ubuntu)
610
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
611
ifeq ($(with_arm_thumb),yes)
612
#DEJAGNU_RUNS += -marm
614
DEJAGNU_RUNS += -mthumb
619
# no b-d on g++-multilib, this is run by the built compiler
620
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
621
$(shell cat build/runcheck$(1).out), \
622
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
623
ifeq ($(biarch32),yes)
624
DEJAGNU_RUNS += $(call abi_run_check,-m32)
626
ifeq ($(biarch64),yes)
627
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
629
ifeq ($(biarchn32),yes)
630
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
632
ifeq ($(biarchx32),yes)
633
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
636
# gdc is not multilib'd
637
ifneq (,$(findstring gdc, $(PKGSOURCE)))
641
ifneq (,$(findstring gcj, $(PKGSOURCE)))
646
ifneq (,$(findstring gnat, $(PKGSOURCE)))
650
ifneq (,$(strip $(value DEJAGNU_RUNS)))
651
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
654
# PF is the installation prefix for the package without the leading slash.
655
# It's "usr" for gcc releases.
657
# use value set in the environment
658
else ifeq ($(trunk_build),yes)
659
PF = usr/lib/gcc-snapshot
660
else ifeq ($(PKGSOURCE),gcc-linaro)
661
PF = usr/lib/gcc-linaro
666
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
667
ifeq ($(DEB_CROSS),yes)
668
ifneq ($(with_deps_on_target_arch_pkgs),yes)
669
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
677
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
678
ifeq ($(DEB_CROSS),yes)
679
ifneq ($(with_deps_on_target_arch_pkgs),yes)
680
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
688
ifeq ($(with_multiarch_lib),yes)
689
ifeq ($(DEB_CROSS),yes)
690
ifneq ($(with_deps_on_target_arch_pkgs),yes)
693
libdir = lib/$(DEB_TARGET_MULTIARCH)
696
libdir = lib/$(DEB_TARGET_MULTIARCH)
701
configured_libdir = lib
703
hppa64libexecdir= $(PF)/lib
705
# /usr/libexec doesn't follow the FHS
706
ifeq ($(single_package),yes)
708
libexecdir = $(PF)/libexec
709
versiondir = $(GCC_VERSION)
711
libexecdir = $(PF)/$(configured_libdir)
712
versiondir = $(BASE_VERSION)
714
buildlibdir = $(builddir)/$(TARGET_ALIAS)
716
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
717
gcc_subdir_name = gcc
718
ifneq ($(single_package),yes)
719
ifeq ($(DEB_CROSS),yes)
720
ifneq ($(with_deps_on_target_arch_pkgs),yes)
721
gcc_subdir_name = gcc-cross
726
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
727
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
734
p_l= $(1)$(cross_lib_arch)
735
p_d= $(1)-dbg$(cross_lib_arch)
739
ifeq ($(DEB_CROSS),yes)
740
ifneq ($(with_deps_on_target_arch_pkgs),yes)
743
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
744
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
745
usr_lib = $(PFL)/lib/sh4-linux-gnu/
748
usr_lib = $(PFL)/$(libdir)
751
usr_lib = $(PFL)/$(libdir)
753
usr_lib32 = $(PFL)/lib32
754
usr_libn32 = $(PFL)/lib32
755
usr_libx32 = $(PFL)/libx32
756
usr_lib64 = $(PFL)/lib64
757
# FIXME: Don't hard code
758
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
759
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
761
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
762
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
763
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
764
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
765
# FIXME: Don't hard code
766
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
767
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
769
libgcc_dir = $(RPF)/$(libdir)
770
# yes, really; lib32gcc_s ends up in usr
771
libgcc_dir32 = $(PFL)/lib32
772
libgcc_dirn32 = $(RPF)/lib32
773
# libx32gcc_s also ends up in usr
774
libgcc_dirx32 = $(PFL)/libx32
775
libgcc_dir64 = $(RPF)/lib64
776
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
777
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
779
# install_gcc_lib(lib,soname,flavour,package)
780
define install_gcc_lib
781
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
782
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
784
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
788
checkdirs = $(builddir)
789
ifeq ($(with_separate_libgcj),yes)
790
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
791
ifneq ($(with_standalone_gcj),yes)
792
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
796
ifeq ($(with_separate_go),yes)
797
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
798
checkdirs = $(buildlibdir)/libgo
801
ifeq ($(with_separate_gnat),yes)
802
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
803
checkdirs = $(builddir)/gcc
807
ifneq ($(DEB_CROSS),yes)
808
ifneq ($(single_package),yes)
809
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
811
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
814
ifeq ($(with_deps_on_target_arch_pkgs),yes)
815
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
817
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
821
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
822
MULTIARCH_DIRNAME := $(DEB_HOST_MULTIARCH)
823
export MULTIARCH_DIRNAME
827
configure: $(configure_dependencies)
829
$(configure_dummy_stamp):
830
touch $(configure_dummy_stamp)
834
: # give information about the build process
835
@echo "------------------------ Build process variables ------------------------"
836
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
837
@echo "Package source: $(PKGSOURCE)"
838
@echo "GCC version: $(GCC_VERSION)"
839
@echo "Base Debian version: $(BASE_VERSION)"
840
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
841
ifeq ($(DEB_CROSS),yes)
842
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
844
@echo "Using shell $(SHELL)"
845
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
846
@echo "CPPFLAGS: $(CPPFLAGS)"
847
@echo "CFLAGS: $(CFLAGS)"
848
@echo "LDFLAGS: $(LDFLAGS)"
849
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
850
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
851
@echo "Install prefix: /$(PF)"
852
ifeq ($(biarchn32)-$(biarch64),yes-yes)
853
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
854
else ifeq ($(biarch64)-$(biarch32),yes-yes)
855
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
856
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
857
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
858
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
859
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
861
ifeq ($(biarch64),yes)
862
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
864
ifeq ($(biarch32),yes)
865
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
867
@echo "Will not build the biarch compilers"
872
ifeq ($(with_cxx),yes)
873
@echo "Will build the C++ compiler"
875
@echo "Will not build the C++ compiler: $(with_cxx)"
877
ifeq ($(with_objc),yes)
878
@echo "Will build the ObjC compiler."
879
ifeq ($(with_objc_gc),yes)
880
@echo "Will build the extra ObjC runtime for garbage collection."
882
@echo "Will not build the extra ObjC runtime for garbage collection."
885
@echo "Will not build the ObjC compiler: $(with_objc)"
887
ifeq ($(with_objcxx),yes)
888
@echo "Will build the Obj-C++ compiler"
890
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
892
ifeq ($(with_fortran),yes)
893
@echo "Will build the Fortran 95 compiler."
895
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
897
ifeq ($(with_java),yes)
898
@echo "Will build the Java compiler."
900
@echo "Will not build the Java compiler: $(with_java)"
902
ifeq ($(with_ada),yes)
903
@echo "Will build the Ada compiler."
904
ifeq ($(with_libgnat),yes)
905
@echo "Will build the shared Ada libraries."
907
@echo "Will not build the shared Ada libraries."
910
@echo "Will not build the Ada compiler: $(with_ada)"
912
ifeq ($(with_go),yes)
913
@echo "Will build the Go compiler."
915
@echo "Will not build the Go compiler: $(with_go)"
918
@echo "Will build the D compiler"
919
ifeq ($(with_libphobos),yes)
920
@echo "Will build the phobos D runtime library."
922
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
925
@echo "Will not build the D compiler: $(with_d)"
927
ifeq ($(with_ssp),yes)
928
@echo "Will build with SSP support."
930
@echo "Will build without SSP support: $(with_ssp)"
932
ifeq ($(with_check),yes)
933
@echo "Will run the testsuite."
935
@echo "Will not run the testsuite: $(with_check)"
937
ifeq ($(with_nls),yes)
938
@echo "Will enable national language support."
940
@echo "Will disable national language support: $(with_nls)"
942
@echo "-----------------------------------------------------------------------------"
944
ifeq ($(with_check),yes)
945
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
948
echo "expect is failing on your system with the above error, which means the GCC"; \
949
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
950
echo "-----------------------------------------------------------------------------"; \
954
rm -f $(configure_stamp) $(build_stamp)
955
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
965
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
966
../src/configure $(subst ___, ,$(CONFARGS))
968
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
969
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
970
mkdir -p $(builddir)/sys-include; \
971
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
974
touch $(configure_stamp)
976
build: $(build_dependencies)
978
$(build_dummy_stamp):
979
touch $(build_dummy_stamp)
981
$(build_locale_stamp):
982
ifeq ($(locale_data)-$(with_cxx),generate-yes)
983
: # build locales needed by libstdc++ testsuite
986
- sh debian/locale-gen
988
touch $(build_locale_stamp)
991
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
993
rm -f bootstrap-protocol
994
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
996
ifeq ($(DEB_CROSS),yes)
997
: # build cross compiler for $(TARGET_ALIAS)
1002
$(MAKE) -C $(builddir) $(NJOBS) \
1005
$(LDFLAGS_TO_PASS) \
1007
echo $$? > status; \
1008
) 2>&1 | tee bootstrap-protocol
1009
s=`cat status`; rm -f status; test $$s -eq 0
1011
# REVERSE_CROSS build
1012
ifeq ($(REVERSE_CROSS),yes)
1013
: # build cross compiler for $(TARGET_ALIAS)
1018
$(MAKE) -C $(builddir) $(NJOBS) \
1021
$(LDFLAGS_TO_PASS) \
1023
echo $$? > status; \
1024
) 2>&1 | tee bootstrap-protocol
1025
s=`cat status`; rm -f status; test $$s -eq 0
1028
ifeq ($(with_java),yes)
1030
ln -sf /usr/bin/fastjar bin/jar
1031
ifeq ($(with_native_ecj),yes)
1032
: # prepare the standalone ecj jar
1033
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1034
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1036
ifeq ($(with_java_maintainer_mode),yes)
1039
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1042
: # If we don't have gjavah in PATH, try to build it with the old gij
1044
if [ -x /usr/bin/gjavah-4.8 ]; then \
1045
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1046
elif [ -x bin/gjavah ]; then \
1049
mkdir -p $(builddir)/java_hacks; \
1050
cd $(builddir)/java_hacks; \
1051
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1052
mkdir -p gnu/classpath/tools; \
1053
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1054
gnu/classpath/tools/; \
1055
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1056
gnu/classpath/tools/common; \
1058
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1060
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1061
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1062
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1065
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1066
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1067
) > $(PWD)/bin/gjavah; \
1068
chmod +x $(PWD)/bin/gjavah; \
1072
: # build native compiler
1078
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1081
$(STAGE1_CFLAGS_TO_PASS) \
1082
$(LDFLAGS_TO_PASS) \
1084
echo $$? > status; \
1085
) 2>&1 | tee bootstrap-protocol
1086
s=`cat status`; rm -f status; test $$s -eq 0
1089
-chmod 755 $(srcdir)/contrib/warn_summary
1090
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1091
rm -f bootstrap-summary; \
1092
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1093
> bootstrap-summary; \
1096
touch $(build_stamp)
1098
ifeq ($(versioned_packages),yes)
1099
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1102
ifeq ($(DEB_CROSS),yes)
1103
CC_for_hppa64_cross = $(CC)
1105
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1108
$(configure_hppa64_stamp): $(build_stamp)
1110
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1111
rm -rf $(builddir_hppa64)
1112
mkdir $(builddir_hppa64)
1114
cd $(builddir_hppa64) && \
1117
CC="$(CC_for_hppa64_cross)" \
1119
--enable-languages=c \
1121
--libexecdir=/$(hppa64libexecdir) \
1125
--disable-libatomic \
1128
--disable-libmudflap \
1130
--disable-libquadmath \
1132
--with-system-zlib \
1133
--with-as=/usr/bin/hppa64-linux-gnu-as \
1134
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1135
--includedir=/usr/hppa64-linux-gnu/include \
1136
--build=$(DEB_BUILD_GNU_TYPE) \
1137
--host=$(DEB_HOST_GNU_TYPE) \
1138
--target=hppa64-linux-gnu
1139
touch $(configure_hppa64_stamp)
1141
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1145
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1146
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1147
CC="$(CC_for_hppa64_cross)" \
1150
touch $(build_hppa64_stamp)
1152
$(configure_neon_stamp): $(build_stamp)
1154
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1155
rm -rf $(builddir_neon)
1156
mkdir $(builddir_neon)
1158
cd $(builddir_neon) && \
1161
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1163
--disable-bootstrap \
1164
--enable-languages=c,c++,objc,fortran \
1166
--libexecdir=/$(libexecdir) \
1167
--program-suffix=-$(BASE_VERSION) \
1170
--disable-libmudflap \
1171
--with-arch=armv7-a --with-tune=cortex-a8 \
1172
--with-float=$(float_abi) --with-fpu=neon \
1173
--host=arm-linux-gnueabi \
1174
--build=arm-linux-gnueabi \
1175
--target=arm-linux-gnueabi
1176
touch $(configure_neon_stamp)
1178
$(build_neon_stamp): $(configure_neon_stamp)
1182
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1183
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1186
touch $(build_neon_stamp)
1190
$(srcdir)/gcc/doc/cpp.texi \
1191
$(srcdir)/gcc/doc/cppinternals.texi \
1192
$(srcdir)/gcc/doc/gcc.texi \
1193
$(srcdir)/gcc/doc/gccint.texi
1194
ifeq ($(with_fortran),yes)
1195
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1197
ifeq ($(with_java),yes)
1198
MANUALS += $(srcdir)/gcc/java/gcj.texi
1200
ifeq ($(with_ada),yes)
1202
$(builddir)/gcc/doc/gnat_ugn.texi \
1203
$(srcdir)/gcc/ada/gnat_rm.texi \
1204
$(srcdir)/gcc/ada/gnat-style.texi
1206
ifeq ($(with_gomp),yes)
1207
MANUALS += $(srcdir)/libgomp/libgomp.texi
1209
ifeq ($(with_itm),yes)
1210
MANUALS += $(srcdir)/libitm/libitm.texi
1212
ifeq ($(with_qmath),yes)
1213
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1215
ifeq ($(with_go),yes)
1216
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1219
html-docs: $(build_html_stamp)
1220
#$(build_html_stamp): html-texi2html
1221
#$(build_html_stamp): html-makeinfo
1222
$(build_html_stamp): html-makeinfo-nosplit
1225
rm -rf html $(builddir)/gcc/html
1226
mkdir $(builddir)/gcc/html
1227
ln -s $(builddir)/gcc/html html
1228
cd $(builddir)/gcc; \
1229
for manual in $(MANUALS); do \
1230
outname=`basename $${manual} .texi`; \
1231
echo "generating $$outname ..."; \
1232
texi2html -number -split chapter \
1233
-I $(srcdir)/gcc/doc/include \
1234
-I $(srcdir)/gcc/p/doc \
1235
-I $(srcdir)/gcc/p/doc/generated \
1236
-I `dirname $${manual}` \
1237
-I $(builddir)/gcc \
1238
-I $(buildlibdir)/libquadmath \
1246
cd $(builddir)/gcc; \
1247
for manual in $(MANUALS); do \
1248
manual=`find $(srcdir) -name $${file}.texi`; \
1249
outname=`basename $${manual} .texi`; \
1250
echo "generating $$outname ..."; \
1251
if [ "$${manual}" ]; then \
1252
makeinfo --html --number-sections \
1253
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1254
-I $(srcdir)/gcc/p/doc \
1255
-I $(srcdir)/gcc/p/doc/generated \
1256
-I $(builddir)/gcc \
1257
-I $(buildlibdir)/libquadmath \
1263
html-makeinfo-nosplit:
1266
cd $(builddir)/gcc; \
1267
for manual in $(MANUALS); do \
1268
outname=`basename $${manual} .texi`.html; \
1269
echo "generating $$outname ..."; \
1270
makeinfo --html --number-sections --no-split \
1271
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1272
-I $(srcdir)/gcc/p/doc \
1273
-I $(srcdir)/gcc/p/doc/generated \
1274
-I $(builddir)/gcc \
1275
-I $(buildlibdir)/libquadmath \
1276
-o $(PWD)/html/$${outname} \
1280
# start the script only on architectures known to have slow autobuilders ...
1281
logwatch_archs := alpha arm m68k mips mipsel sparc
1282
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1283
start_logwatch = yes
1285
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1286
start_logwatch = yes
1289
stamps/mauve-build: stamps/build
1292
ifeq ($(with_mauve_check),yes)
1293
tar xf $(wildcard /usr/src/mauve*.tar.*)
1298
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1299
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1303
stamps/mauve-check: stamps/build stamps/mauve-build
1304
ifeq ($(with_mauve_check),yes)
1306
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1307
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1308
xvfb-run -s "-extension GLX" java Harness \
1309
-vm $(CURDIR)/$(sdkimg)/bin/java \
1310
-file $(CURDIR)/debian/mauve_tests \
1311
-timeout 30000 2>&1 \
1315
echo "mauve testsuite not run for this build" > mauve/mauve_output
1319
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1320
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1322
rm -f $(builddir)/runcheck*
1324
-chmod 755 $(srcdir)/contrib/test_summary
1326
: # needed for the plugin tests to succeed
1327
ln -sf gcc $(builddir)/prev-gcc
1328
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1330
ifneq ($(with_common_libs),yes)
1331
ifeq ($(with_cxx),yes)
1332
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1334
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1335
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1338
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1339
echo "Running testsuite in $$d ..."; \
1344
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1346
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1347
done 2>&1 | tee test-protocol2
1349
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1350
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1352
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1353
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1354
) > libstdc++-test-summary
1355
echo 'BEGIN installed libstdc++-v3 test-summary'
1356
cat libstdc++-test-summary
1357
echo 'END installed libstdc++-v3 test-summary'
1358
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1363
ifeq ($(start_logwatch),yes)
1364
: # start logwatch script for regular output during test runs
1365
chmod +x debian/logwatch.sh
1366
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1367
-m '\ntestsuite still running ...\n' \
1369
$(builddir)/gcc/testsuite/gcc/gcc.log \
1370
$(builddir)/gcc/testsuite/g++/g++.log \
1371
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1372
$(builddir)/gcc/testsuite/objc/objc.log \
1373
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1374
$(builddir)/gcc/testsuite/gnat/gnat.log \
1375
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1376
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1377
$(builddir)/gcc/p/test/test_log \
1378
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1379
$(buildlibdir)/libjava/testsuite/libjava.log \
1380
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1381
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1382
$(buildlibdir)/libffi/testsuite/libffi.log \
1386
ifeq ($(with_ada),yes)
1387
chmod +x debian/acats-killer.sh
1388
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1389
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1390
$(builddir)/gcc/testsuite/g++.log \
1396
for d in $(checkdirs); do \
1397
echo "Running testsuite in $$d ..."; \
1401
EXTRA_TEST_PFLAGS=-g0 \
1402
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1404
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1405
done 2>&1 | tee test-protocol
1407
-ps aux | fgrep logwatch | fgrep -v fgrep
1408
-if [ -f $(builddir)/logwatch.pid ]; then \
1409
kill -1 `cat $(builddir)/logwatch.pid`; \
1411
kill -9 `cat $(builddir)/logwatch.pid`; \
1412
rm -f $(builddir)/logwatch.pid; \
1414
-ps aux | fgrep logwatch | fgrep -v fgrep
1416
ifeq ($(with_ada),yes)
1417
-if [ -f $(builddir)/acats-killer.pid ]; then \
1418
kill -1 `cat $(builddir)/acats-killer.pid`; \
1420
kill -9 `cat $(builddir)/acats-killer.pid`; \
1421
rm -f $(builddir)/acats-killer.pid; \
1425
: # running the libjava testsuite alone is missing this information
1426
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1428
if [ -x $(srcdir)/contrib/test_summary ]; then \
1429
rm -f test-summary; \
1432
echo '' > ts-include; \
1433
echo '' >> ts-include; \
1434
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1435
echo 'Bootstrap comparison failure:' >> ts-include; \
1436
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1437
echo '' >> ts-include; \
1438
echo '' >> ts-include; \
1440
echo "Build Dependencies:" >> ts-include; \
1441
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1442
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1443
| fgrep -v '<none>' >> ts-include; \
1444
echo '' >> ts-include; \
1445
cat ../$(patch_stamp) >> ts-include; \
1446
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1447
$(srcdir)/contrib/test_summary \
1448
-i ts-include -m "$(S_EMAIL)" \
1449
) > raw-test-summary; \
1450
if [ -n "$(testsuite_tarball)" ]; then \
1451
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1452
echo " Do not interpret the results on its own" >> test-summary; \
1453
echo " but compare them with the results from" >> test-summary; \
1454
echo " the gcc-snapshot package." >> test-summary; \
1456
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1458
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1459
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1460
echo '' >> test-summary; \
1461
cat bootstrap-summary >> test-summary; \
1463
echo 'BEGIN test-summary'; \
1465
echo 'END test-summary'; \
1468
touch $(check_stamp)
1470
$(check_inst_stamp): $(check_stamp)
1471
rm -f test-inst-protocol
1473
ifeq ($(start_logwatch),yes)
1474
: # start logwatch script for regular output during test runs
1475
chmod +x debian/logwatch.sh
1476
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1477
-m '\ntestsuite (3.3) still running ...\n' \
1478
test-inst-protocol \
1479
check-inst/{gcc,g++,g77,objc}.log \
1486
echo "Running testsuite ..."
1490
EXTRA_TEST_PFLAGS=-g0 \
1491
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1492
cd check-inst && $(srcdir)/contrib/test_installed \
1493
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1494
2>&1 | tee test-inst-protocol
1496
-ps aux | fgrep logwatch | fgrep -v fgrep
1497
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1498
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1502
-ps aux | fgrep logwatch | fgrep -v fgrep
1504
-chmod 755 $(srcdir)/contrib/test_summary
1505
if [ -x $(srcdir)/contrib/test_summary ]; then \
1506
rm -f test-inst-summary; \
1509
echo '' > ts-include; \
1510
echo '' >> ts-include; \
1511
echo "Build Dependencies:" >> ts-include; \
1512
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1513
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1514
| fgrep -v '<none>' >> ts-include; \
1515
echo '' >> ts-include; \
1516
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1517
$(srcdir)/contrib/test_summary \
1518
-i ts-include -m "$(S_EMAIL)" \
1519
) > raw-test-inst-summary; \
1520
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1521
>> test-inst-summary; \
1522
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1523
| grep -v EOF >> test-inst-summary; \
1524
echo 'BEGIN test-installed-summary'; \
1525
cat test-inst-summary; \
1526
echo 'END test-installed-summary'; \
1529
chmod 755 debian/reduce-test-diff.awk
1530
if diff -u test-inst-summary test-summary \
1531
| debian/reduce-test-diff.awk > diff-summary; \
1533
mv -f diff-summary testsuite-comparision; \
1536
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1539
) > testsuite-comparision; \
1540
rm -f diff-summary; \
1542
touch $(check_inst_stamp)
1544
clean: debian/control
1547
rm -f *-summary *-protocol testsuite-comparision summary-diff
1548
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1549
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1551
rm -f $(srcdir)/gcc/po/*.gmo
1552
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1553
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1555
[ -f $$f ] || continue; \
1557
| 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$$//'); \
1560
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1561
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1562
rm -f debian/shlibs.local debian/substvars.local
1563
rm -f debian/*.debhelper
1564
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1565
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1566
rm -f debian/lib*gcj-bc.shlibs
1567
rm -rf bin locales share
1571
$(cross_clean) dh_clean
1573
# -----------------------------------------------------------------------------
1574
# some abbrevations for the package names and directories;
1575
# p_XXX is the package name, d_XXX is the package directory
1576
# these macros are only used in the binary-* targets.
1578
ifeq ($(versioned_packages),yes)
1579
pkg_ver := -$(BASE_VERSION)
1582
ifneq ($(DEB_CROSS),yes)
1583
p_base = gcc$(pkg_ver)-base
1584
p_xbase = gcc$(pkg_ver)-base
1585
p_gcc = gcc$(pkg_ver)
1586
p_cpp = cpp$(pkg_ver)
1587
p_cppd = cpp$(pkg_ver)-doc
1588
p_cxx = g++$(pkg_ver)
1589
p_doc = gcc$(pkg_ver)-doc
1590
p_lgcc = libgcc$(GCC_SONAME)
1592
# only triggered if DEB_CROSS set
1593
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1594
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1595
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1597
p_base = gcc$(pkg_ver)-base
1600
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1601
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1602
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1604
p_hppa64 = gcc$(pkg_ver)-hppa64
1607
d_base = debian/$(p_base)
1608
d_xbase = debian/$(p_xbase)
1609
d_gcc = debian/$(p_gcc)
1610
d_cpp = debian/$(p_cpp)
1611
d_cppd = debian/$(p_cppd)
1612
d_cxx = debian/$(p_cxx)
1613
d_doc = debian/$(p_doc)
1614
d_lgcc = debian/$(p_lgcc)
1615
d_hppa64= debian/$(p_hppa64)
1617
d_neon = debian/tmp-neon
1619
common_substvars = \
1620
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1622
ifeq ($(DEB_CROSS),yes)
1623
lib_binaries := indep_binaries
1625
lib_binaries := arch_binaries
1628
# ---------------------------------------------------------------------------
1630
ifeq ($(single_package),yes)
1631
include debian/rules.d/binary-snapshot.mk
1634
ifneq ($(DEB_CROSS),yes)
1635
ifeq ($(with_source),yes)
1636
include debian/rules.d/binary-source.mk
1640
ifneq ($(BACKPORT),true)
1641
ifeq ($(with_gccxbase),yes)
1642
include debian/rules.d/binary-base.mk
1645
ifeq ($(with_gccbase),yes)
1646
include debian/rules.d/binary-base.mk
1649
# always include to get some definitions
1650
include debian/rules.d/binary-libgcc.mk
1652
ifeq ($(with_libqmath),yes)
1653
include debian/rules.d/binary-libquadmath.mk
1656
ifeq ($(with_libgmath),yes)
1657
include debian/rules.d/binary-libgccmath.mk
1660
ifeq ($(with_libgomp),yes)
1661
include debian/rules.d/binary-libgomp.mk
1664
ifeq ($(with_libitm),yes)
1665
include debian/rules.d/binary-libitm.mk
1668
ifeq ($(with_libatomic),yes)
1669
include debian/rules.d/binary-libatomic.mk
1672
ifeq ($(with_libbacktrace),yes)
1673
include debian/rules.d/binary-libbacktrace.mk
1676
ifeq ($(with_cdev),yes)
1677
include debian/rules.d/binary-cpp.mk
1680
ifeq ($(with_fixincl),yes)
1681
include debian/rules.d/binary-fixincl.mk
1684
ifeq ($(with_mudflap),yes)
1685
include debian/rules.d/binary-libmudflap.mk
1688
ifeq ($(with_libssp),yes)
1689
include debian/rules.d/binary-libssp.mk
1692
ifeq ($(with_objcxx),yes)
1693
include debian/rules.d/binary-objcxx.mk
1696
ifeq ($(with_objc),yes)
1697
include debian/rules.d/binary-objc.mk
1698
include debian/rules.d/binary-libobjc.mk
1701
ifeq ($(with_go),yes)
1702
include debian/rules.d/binary-go.mk
1705
# include before cxx
1706
ifeq ($(with_java),yes)
1707
include debian/rules.d/binary-java.mk
1710
ifeq ($(with_cxxdev),yes)
1711
include debian/rules.d/binary-cxx.mk
1713
ifeq ($(with_cxx),yes)
1714
include debian/rules.d/binary-libstdcxx.mk
1717
ifeq ($(with_libasan),yes)
1718
include debian/rules.d/binary-libasan.mk
1721
ifeq ($(with_libtsan),yes)
1722
include debian/rules.d/binary-libtsan.mk
1725
ifeq ($(with_f77),yes)
1726
include debian/rules.d/binary-f77.mk
1729
ifeq ($(with_fortran),yes)
1730
include debian/rules.d/binary-fortran.mk
1733
ifeq ($(with_ada),yes)
1734
include debian/rules.d/binary-ada.mk
1737
ifeq ($(with_d),yes)
1738
include debian/rules.d/binary-d.mk
1741
ifeq ($(with_libnof),yes)
1742
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1743
include debian/rules.d/binary-nof.mk
1747
ifeq ($(with_softfloat),yes)
1748
include debian/rules.d/binary-softfloat.mk
1751
# gcc must be moved/built after g77 and g++
1752
ifeq ($(with_cdev),yes)
1753
include debian/rules.d/binary-gcc.mk
1756
ifeq ($(with_hppa64),yes)
1757
include debian/rules.d/binary-hppa64.mk
1760
ifeq ($(with_neon),yes)
1761
include debian/rules.d/binary-neon.mk
1766
endif # ($(single_package),yes)
1768
# ----------------------------------------------------------------------
1769
install: $(install_dependencies)
1771
$(install_dummy_stamp): $(build_dummy_stamp)
1772
touch $(install_dummy_stamp)
1774
$(install_snap_stamp): $(build_dependencies)
1779
: # Install directories
1783
ifeq ($(with_hppa64),yes)
1786
$(MAKE) -C $(builddir_hppa64) \
1789
$(LDFLAGS_TO_PASS) \
1790
DESTDIR=$(PWD)/$(d) \
1793
ls -l $(d)/$(PF)/bin
1794
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1795
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1797
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1800
for i in ar nm ranlib; do \
1801
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1804
: # remove files not needed from the hppa64 build
1805
rm -rf $(d)/$(PF)/share/info
1806
rm -rf $(d)/$(PF)/share/man
1807
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1808
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1810
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1811
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1813
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1816
README|features.h|syslimits.h|limits.h) ;; \
1817
linux|$(TARGET_ALIAS)) ;; \
1818
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1819
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1824
: # Work around PR lto/41569
1825
ln -sf gcc $(builddir)/prev-gcc
1826
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1828
: # Install everything
1831
$(MAKE) -C $(builddir) \
1833
$(LDFLAGS_TO_PASS) \
1834
DESTDIR=$(PWD)/$(d) \
1835
infodir=/$(PF)/share/info \
1836
mandir=/$(PF)/share/man \
1839
ls -l $(d)/$(PF)/bin
1840
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1841
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1843
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1846
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1849
README|features.h|syslimits.h|limits.h) ;; \
1850
linux|$(TARGET_ALIAS)) ;; \
1851
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1852
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1856
ifneq ($(configured_libdir),$(libdir))
1857
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1858
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1859
$(d)/$(PF)/$(libdir)/. || true; \
1863
# FIXME: libjava/classpath not correctly patched
1864
ifeq ($(with_java),yes)
1865
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1866
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1867
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1868
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1869
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1872
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1874
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1875
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1876
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1877
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1878
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1879
$(srcdir)/libjava/libgcj_bc.c \
1880
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1881
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
1885
if [ -d $(d)/usr/man/man1 ]; then \
1886
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
1889
chmod 755 debian/dh_*
1890
touch $(install_snap_stamp)
1892
$(install_stamp): $(build_stamp)
1895
dh_clean -k -N$(p_hppa64)
1897
if [ -f $(binary_stamp)-hppa64 ]; then \
1898
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
1900
rm -f $(binary_stamp)*
1901
if [ -f saved-stamp-hppa64 ]; then \
1902
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
1905
: # Install directories
1907
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
1908
ifeq ($(biarch32),yes)
1909
mkdir -p $(d)/$(PF)/lib32/debug
1911
ifeq ($(biarch64),yes)
1912
mkdir -p $(d)/$(PF)/lib64/debug
1914
ifeq ($(biarchn32),yes)
1915
mkdir -p $(d)/$(PF)/$(libn32)/debug
1917
ifeq ($(biarchx32),yes)
1918
mkdir -p $(d)/$(PF)/libx32/debug
1921
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
1922
ifneq ($(DEB_TARGET_ARCH),x32)
1923
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
1924
: # (this works when CONFARGS contains '--disable-multilib')
1925
ln -s $(configured_libdir) $(d)/lib64
1926
mkdir -p $(d)/$(PF)/$(configured_libdir)
1927
ln -s $(configured_libdir) $(d)/$(PF)/lib64
1930
ifeq ($(DEB_TARGET_ARCH),x32)
1931
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
1932
ln -s $(configured_libdir) $(d)/libx32
1933
mkdir -p $(d)/$(PF)/$(configured_libdir)
1934
ln -s $(configured_libdir) $(d)/$(PF)/libx32
1937
: # Work around PR lto/41569
1938
ln -sf gcc $(builddir)/prev-gcc
1940
: # Install everything
1943
$(MAKE) -C $(builddir) \
1945
$(LDFLAGS_TO_PASS) \
1946
DESTDIR=$(PWD)/$(d) \
1947
infodir=/$(PF)/share/info \
1948
mandir=/$(PF)/share/man \
1951
ifneq ($(configured_libdir),$(libdir))
1952
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
1953
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1954
$(d)/$(PF)/$(libdir)/. || true; \
1958
ifeq ($(with_libcxxdbg),yes)
1959
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
1960
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
1961
[ -f $$i ] || continue; \
1962
d=$$(dirname $$i); \
1963
b=$$(basename $$i); \
1964
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
1969
# FIXME: libjava/classpath not correctly patched
1970
ifeq ($(with_java),yes)
1971
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1972
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1973
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1974
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1975
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1979
: # remove rpath settings from binaries and shared libs
1980
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
1981
$(if $(filter $(with_multiarch_lib),yes), \
1982
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
1983
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
1984
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
1986
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
1987
[ -h $$i ] && continue; \
1988
chrpath --delete $$i; \
1989
echo "removed RPATH: $$i"; \
1992
: # remove '*.la' and '*.lai' files, not shipped in any package.
1993
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
1995
ifneq ($(with_libgnat),yes)
1996
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
1999
ifeq ($(GFDL_INVARIANT_FREE),yes)
2000
for i in gcc gcov; do \
2001
I=`echo $$i | tr a-z A-Z`; \
2002
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2003
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2006
ifeq ($(with_fortran),yes)
2008
I=`echo $$i | tr a-z A-Z`; \
2009
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2010
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2013
ifeq ($(with_java),yes)
2014
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2016
I=`echo $$i | tr a-z A-Z`; \
2017
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2018
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2023
# ifeq ($(with_ada),yes)
2024
# : # rename files (versioned ada binaries)
2026
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2027
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2028
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2030
# for i in $(GNAT_TOOLS); do \
2031
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2035
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2036
ifneq ($(DEB_STAGE),stage1)
2037
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2038
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2039
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2040
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2042
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2043
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2044
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2045
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2050
for i in ar nm ranlib; do \
2051
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2054
chmod 755 debian/dh_*
2056
# tar cf tmp.tar debian/tmp
2058
touch $(install_stamp)
2060
$(install_hppa64_stamp): $(build_hppa64_stamp)
2064
mkdir -p $(d_hppa64)/$(PF)
2067
$(MAKE) -C $(builddir_hppa64) \
2070
$(LDFLAGS_TO_PASS) \
2071
DESTDIR=$(PWD)/$(d_hppa64) \
2074
ifeq ($(versioned_packages),yes)
2075
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp \
2076
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp$(pkg_ver)
2079
ifneq ($(single_package),yes)
2080
: # remove files not needed
2081
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2082
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2083
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2084
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2085
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2087
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2088
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2089
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2092
touch $(install_hppa64_stamp)
2094
$(install_neon_stamp): $(build_neon_stamp)
2098
mkdir -p $(d_neon)/$(PF)
2101
$(MAKE) -C $(builddir_neon) \
2104
$(LDFLAGS_TO_PASS) \
2105
DESTDIR=$(PWD)/$(d_neon) \
2107
touch $(install_neon_stamp)
2109
# ----------------------------------------------------------------------
2110
# Build architecture-dependent files here.
2111
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2112
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2113
ifeq ($(with_check),yes)
2115
# : # Send Email about sucessfull build.
2116
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2119
# ----------------------------------------------------------------------
2120
# Build architecture-independent files here.
2121
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2122
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2125
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2127
binary: binary-indep binary-arch
2128
.PHONY: build clean binary-indep binary-arch binary