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)
88
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_TARGET_GNU_TYPE))
89
CC_FOR_TARGET = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
91
CC_FOR_TARGET = $(DEB_TARGET_GNU_TYPE)-gcc
94
ifneq ($(distribution),Ubuntu)
95
ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel mips mipsel))
96
STAGE1_CFLAGS = -g -O2
105
# work around PR 57689
106
ifeq ($(DEB_TARGET_ARCH),ia64)
110
ifeq ($(with_ssp_default),yes)
112
ifeq (,$(BOOT_CFLAGS))
116
LIBCXXFLAGS = -g -O2 -fno-implicit-templates
117
# Only use -fno-stack-protector when known to the stage1 compiler.
118
cc-fno-stack-protector := $(shell if $(CC) $(CFLAGS) -fno-stack-protector \
119
-S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
120
then echo "-fno-stack-protector"; fi;)
121
$(foreach var,STAGE1_CFLAGS BOOT_CFLAGS LIBCFLAGS LIBCXXFLAGS,$(eval \
122
$(var) += $(cc-fno-stack-protector)))
125
ifeq ($(DEB_CROSS),yes)
129
ifneq (,$(findstring static,$(DEB_BUILD_OPTIONS)))
133
ifneq (,$(filter $(DEB_TARGET_ARCH),alpha))
134
LDFLAGS += -Wl,--no-relax
138
$(if $(CFLAGS),CFLAGS="$(CFLAGS)") \
139
$(if $(BOOT_CFLAGS),BOOT_CFLAGS="$(BOOT_CFLAGS)") \
140
$(if $(LIBCFLAGS),LIBCFLAGS="$(LIBCFLAGS)") \
141
$(if $(LIBCXXFLAGS),LIBCXXFLAGS="$(LIBCXXFLAGS)")
143
$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)")
144
STAGE1_CFLAGS_TO_PASS = \
145
$(if $(STAGE1_CFLAGS),STAGE1_CFLAGS="$(STAGE1_CFLAGS)")
147
docdir = usr/share/doc
150
--with-pkgversion='$(distribution)$(if $(with_linaro_branch),/Linaro)___$(DEB_VERSION)' \
151
--with-bugurl='file:///usr/share/doc/$(subst gcj,gcc,$(PKGSOURCE))/README.Bugs'
154
--enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \
157
ifeq ($(versioned_packages),yes)
158
CONFARGS += --program-suffix=-$(BASE_VERSION)
163
--disable-decimal-float \
164
--disable-libatomic \
166
--disable-libmudflap \
168
--disable-libquadmath \
169
--disable-libsanitizer \
171
--libexecdir=/$(libexecdir) \
172
--libdir=/$(PF)/$(configured_libdir) \
173
$(if $(with_build_sysroot),--with-build-sysroot=$(with_build_sysroot)) \
174
$(if $(with_sysroot),--with-sysroot=$(with_sysroot))
176
ifeq ($(with_multiarch_lib),yes)
181
ifeq ($(DEB_STAGE),stage1)
194
--enable-linker-build-id \
196
ifneq ($(single_package),yes)
198
--libexecdir=/$(libexecdir) \
199
--without-included-gettext \
200
--enable-threads=posix \
201
--with-gxx-include-dir=/$(cxx_inc_dir) \
202
--libdir=/$(PF)/$(configured_libdir)
205
ifneq ($(with_cpp),yes)
206
CONFARGS += --disable-cpp
209
ifeq ($(with_nls),yes)
210
CONFARGS += --enable-nls
212
CONFARGS += --disable-nls
215
ifeq ($(with_bootstrap),off)
216
CONFARGS += --disable-bootstrap
217
else ifneq ($(with_bootstrap),)
218
CONFARGS += --enable-bootstrap=$(with_bootstrap)
221
ifneq ($(with_sysroot),)
222
CONFARGS += --with-sysroot=$(with_sysroot)
224
ifneq ($(with_build_sysroot),)
225
CONFARGS += --with-build-sysroot=$(with_build_sysroot)
228
ifeq ($(force_gnu_locales),yes)
229
CONFARGS += --enable-clocale=gnu
232
ifeq ($(with_cxx)-$(with_debug),yes-yes)
233
CONFARGS += --enable-libstdcxx-debug
235
CONFARGS += --enable-libstdcxx-time=yes
237
ifeq (,$(filter $(DEB_TARGET_ARCH), hurd-i386 kfreebsd-i386 kfreebsd-amd64))
238
CONFARGS += --enable-gnu-unique-object
241
ifneq ($(with_ssp),yes)
242
CONFARGS += --disable-libssp
245
ifneq ($(with_mudflap),yes)
246
CONFARGS += --disable-libmudflap
249
ifneq ($(with_gomp),yes)
250
CONFARGS += --disable-libgomp
253
ifneq ($(with_itm),yes)
254
CONFARGS += --disable-libitm
257
ifneq ($(with_atomic),yes)
258
CONFARGS += --disable-libatomic
261
ifneq ($(with_asan),yes)
262
CONFARGS += --disable-libsanitizer
265
ifneq ($(with_qmath),yes)
266
CONFARGS += --disable-libquadmath
269
ifeq ($(with_plugins),yes)
270
CONFARGS += --enable-plugin
273
#ifeq ($(with_gold),yes)
274
# CONFARGS += --enable-gold --enable-ld=default
277
#CONFARGS += --with-plugin-ld=ld.gold
278
#CONFARGS += --with-plugin-ld
282
CONFARGS += --with-system-zlib
284
jvm_name_short = java-1.5.0-gcj-$(BASE_VERSION)$(if $(findstring snap,$(PKGSOURCE)),-snap)
285
jvm_name_long = $(jvm_name_short)-1.5.0.0
287
ifeq ($(with_java),yes)
288
CONFARGS += --disable-browser-plugin
289
ifeq ($(with_java_maintainer_mode),yes)
290
CONFARGS += --enable-java-maintainer-mode
292
ifeq ($(with_java_biarch_awt),yes)
293
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)-default))
295
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)))
297
ifneq (,$(findstring gtk,$(java_awt_peers)))
298
CONFARGS += --enable-gtk-cairo
300
jvm_ext = -$(DEB_TARGET_ARCH)$(if $(filter yes,$(DEB_CROSS)),-cross)
301
jvm_dir = /usr/lib/jvm/$(jvm_name_short)$(jvm_ext)
302
CONFARGS += --with-java-home=$(jvm_dir)/jre
303
CONFARGS += --enable-java-home \
304
--with-jvm-root-dir=$(jvm_dir) \
305
--with-jvm-jar-dir=/usr/lib/jvm-exports/$(jvm_name_short)$(jvm_ext)
306
CONFARGS += --with-arch-directory=$(java_cpu)
307
ifeq (./,$(dir $(ecj_jar)))
308
CONFARGS += --with-ecj-jar=$(jvm_dir)/lib/ecj.jar
310
CONFARGS += --with-ecj-jar=$(ecj_jar)
312
ifneq ($(with_libgcj),yes)
313
CONFARGS += --disable-libgcj
317
ifeq ($(with_gcj),yes)
318
ifeq ($(DEB_HOST_GNU_CPU),m32r)
319
CONFARGS += --enable-libgcj
323
ifeq ($(with_objc)-$(with_objc_gc),yes-yes)
324
CONFARGS += --enable-objc-gc
327
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), i486-linux-gnu i586-linux-gnu i686-linux-gnu))
328
ifeq ($(multilib),yes)
329
ifeq ($(biarch64),yes)
330
CONFARGS += --enable-targets=all
335
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), x86_64-linux-gnu x86_64-kfreebsd-gnu s390x-linux-gnu))
336
ifneq ($(biarch32),yes)
337
CONFARGS += --disable-multilib
341
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), powerpc-linux-gnu powerpc-linux-gnuspe))
342
CONFARGS += --enable-secureplt
343
ifeq ($(biarch64),yes)
344
CONFARGS += --disable-softfloat --with-cpu=default32
345
ifeq ($(multilib),yes)
346
CONFARGS += --disable-softfloat \
347
--enable-targets=powerpc-linux,powerpc64-linux
350
CONFARGS += --disable-multilib
354
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
355
CONFARGS += --enable-secureplt
356
ifeq ($(biarch32),yes)
357
ifeq ($(multilib),yes)
358
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
361
CONFARGS += --disable-multilib
363
ifeq ($(distribution),Ubuntu)
364
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
368
ifeq ($(REVERSE_CROSS),yes)
369
# FIXME: requires isl and cloog headers for the target
370
#CONFARGS += --without-isl
371
# FIXME: build currently fails build the precompiled headers
372
CONFARGS += --disable-libstdcxx-pch
375
ifeq ($(with_multiarch_lib),yes)
376
CONFARGS += --enable-multiarch
379
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
380
CONFARGS += --with-cpu=8548 --enable-e500_double
383
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
384
CONFARGS += --with-float=soft
387
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
388
CONFARGS += --with-fpu=vfp
391
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
392
ifeq ($(multilib),yes)
393
CONFARGS += --enable-multilib
395
CONFARGS += --disable-sjlj-exceptions
396
# FIXME: libjava is not ported for thumb, this hack only works for
397
# separate gcj builds
398
ifneq (,$(filter armhf,$(DEB_TARGET_ARCH)))
399
ifneq (,$(findstring gcj,$(PKGSOURCE)))
400
with_arm_arch = armv6
402
with_arm_arch = armv7-a
404
with_arm_fpu = vfpv3-d16
407
ifeq ($(distribution),Debian)
408
with_arm_arch = armv4t
409
else ifneq (,$(filter $(distrelease),karmic))
410
with_arm_arch = armv6
411
with_arm_fpu = vfpv3-d16
412
else ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
413
ifneq (,$(findstring gcj,$(PKGSOURCE)))
414
with_arm_arch = armv6
416
with_arm_arch = armv7-a
418
with_arm_fpu = vfpv3-d16
420
with_arm_arch = armv5t # starting with quantal
423
CONFARGS += --with-arch=$(with_arm_arch)
424
ifneq (,$(with_arm_fpu))
425
CONFARGS += --with-fpu=$(with_arm_fpu)
427
CONFARGS += --with-float=$(float_abi)
428
ifeq ($(with_arm_thumb),yes)
429
CONFARGS += --with-mode=thumb
433
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
434
CONFARGS += --disable-werror
436
# FIXME: correct fix-warnings.dpatch
437
ifeq ($(distribution),Ubuntu)
438
CONFARGS += --disable-werror
441
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
442
ifeq ($(biarch64),yes)
443
CONFARGS += --enable-targets=all
447
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
448
ifeq ($(biarch32),yes)
449
CONFARGS += --enable-targets=all
453
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
454
CONFARGS += --with-system-libunwind
457
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
458
ifeq ($(multilib),yes)
459
CONFARGS += --with-multilib-list=m4,m4-nofpu
461
CONFARGS += --with-cpu=sh4
464
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
465
CONFARGS += --disable-multilib
468
ifeq ($(DEB_TARGET_ARCH_OS),linux)
469
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
470
CONFARGS += --with-long-double-128
474
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
475
ifneq (,$(filter $(distrelease),etch lenny dapper hardy))
476
CONFARGS += --with-arch-32=i486
477
else ifneq (,$(filter $(distrelease),squeeze wheezy sid jaunty karmic lucid))
478
CONFARGS += --with-arch-32=i586
480
CONFARGS += --with-arch-32=i686
484
ifeq ($(DEB_TARGET_ARCH),amd64)
485
CONFARGS += --with-abi=m64
487
ifeq ($(multilib),yes)
488
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
489
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
490
else ifeq ($(DEB_TARGET_ARCH),x32)
491
CONFARGS += --with-abi=mx32 --with-multilib-list=mx32,m64,m32
495
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
496
CONFARGS += --with-arch=i586
499
ifeq ($(DEB_TARGET_ARCH),lpia)
500
CONFARGS += --with-arch=pentium-m --with-tune=i586
503
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
504
CONFARGS += --with-tune=generic
507
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
508
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
509
ifeq ($(multilib),yes)
510
ifeq ($(biarchn32)-$(biarch64),yes-yes)
511
CONFARGS += --enable-targets=all
512
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
517
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
518
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
519
ifeq ($(multilib),yes)
520
ifeq ($(biarchn32)-$(biarch64),yes-yes)
521
CONFARGS += --enable-targets=all
522
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
527
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
528
ifeq ($(multilib),yes)
529
ifeq ($(biarch64),yes)
530
CONFARGS += --enable-targets=all
535
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
536
CONFARGS += --disable-libstdcxx-pch
539
ifneq (,$(findstring gdc, $(PKGSOURCE)))
540
CONFARGS += --disable-libquadmath
543
ifeq ($(trunk_build),yes)
544
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
545
CONFARGS += --disable-werror
547
CONFARGS += --enable-checking=yes
549
CONFARGS += --enable-checking=release
553
--build=$(DEB_BUILD_GNU_TYPE) \
554
--host=$(DEB_HOST_GNU_TYPE) \
555
--target=$(TARGET_ALIAS)
557
ifeq ($(DEB_CROSS),yes)
559
--program-prefix=$(TARGET_ALIAS)-
560
ifneq ($(with_deps_on_target_arch_pkgs),yes)
562
--includedir=/$(PFL)/include
566
ifeq ($(with_bootstrap),off)
568
else ifeq ($(with_bootstrap),)
569
bootstrap_target = bootstrap-lean
570
# no profiledbootstrap on the following architectures
571
# - m68k: we're happy that it builds at all
572
no_profiled_bs_archs := alpha arm arm64 hppa m68k
573
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
574
bootstrap_target = profiledbootstrap
575
# FIXME: disabled for first uploads
576
bootstrap_target = bootstrap-lean
578
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
579
bootstrap_target = bootstrap-lean
581
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
582
bootstrap_target = bootstrap-lean
585
# disable profiled bootstrap on slow archs, get to testing first ...
586
ifeq ($(distribution),Debian)
587
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
588
bootstrap_target = bootstrap-lean
591
ifeq ($(distribution),Ubuntu)
592
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
593
bootstrap_target = bootstrap-lean
599
# Increase the timeout for one testrun on slow architectures
600
ifeq ($(distribution),Debian)
601
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
603
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
606
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
609
else ifeq ($(distribution),Ubuntu)
610
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
612
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
618
ifneq ($(trunk_build),yes)
619
ifeq ($(with_ssp),yes)
620
ifneq ($(single_package),yes)
621
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
623
# FIXME Ubuntu armel buildd hangs
624
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
627
ifeq ($(distribution),Ubuntu)
628
# the buildds are just slow ... don't check the non-default
629
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
636
ifeq ($(distribution),Ubuntu)
637
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
638
ifeq ($(with_arm_thumb),yes)
639
#DEJAGNU_RUNS += -marm
641
DEJAGNU_RUNS += -mthumb
646
# no b-d on g++-multilib, this is run by the built compiler
647
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
648
$(shell cat build/runcheck$(1).out), \
649
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
650
ifeq ($(biarch32),yes)
651
DEJAGNU_RUNS += $(call abi_run_check,-m32)
653
ifeq ($(biarch64),yes)
654
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
656
ifeq ($(biarchn32),yes)
657
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
659
ifeq ($(biarchx32),yes)
660
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
663
# gdc is not multilib'd
664
ifneq (,$(findstring gdc, $(PKGSOURCE)))
668
ifneq (,$(findstring gcj, $(PKGSOURCE)))
673
ifneq (,$(findstring gnat, $(PKGSOURCE)))
677
ifneq (,$(strip $(value DEJAGNU_RUNS)))
678
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
681
# PF is the installation prefix for the package without the leading slash.
682
# It's "usr" for gcc releases.
684
# use value set in the environment
685
else ifeq ($(trunk_build),yes)
686
PF = usr/lib/gcc-snapshot
687
else ifeq ($(PKGSOURCE),gcc-linaro)
688
PF = usr/lib/gcc-linaro
693
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
694
ifeq ($(DEB_CROSS),yes)
695
ifneq ($(with_deps_on_target_arch_pkgs),yes)
696
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
704
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
705
ifeq ($(DEB_CROSS),yes)
706
ifneq ($(with_deps_on_target_arch_pkgs),yes)
707
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
715
ifeq ($(with_multiarch_lib),yes)
716
ifeq ($(DEB_CROSS),yes)
717
ifneq ($(with_deps_on_target_arch_pkgs),yes)
720
libdir = lib/$(DEB_TARGET_MULTIARCH)
723
libdir = lib/$(DEB_TARGET_MULTIARCH)
728
configured_libdir = lib
730
hppa64libexecdir= $(PF)/lib
732
# /usr/libexec doesn't follow the FHS
733
ifeq ($(single_package),yes)
735
libexecdir = $(PF)/libexec
736
versiondir = $(GCC_VERSION)
738
libexecdir = $(PF)/$(configured_libdir)
739
versiondir = $(BASE_VERSION)
741
buildlibdir = $(builddir)/$(TARGET_ALIAS)
743
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
744
gcc_subdir_name = gcc
745
ifneq ($(single_package),yes)
746
ifeq ($(DEB_CROSS),yes)
747
ifneq ($(with_deps_on_target_arch_pkgs),yes)
748
gcc_subdir_name = gcc-cross
753
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
754
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
761
p_l= $(1)$(cross_lib_arch)
762
p_d= $(1)-dbg$(cross_lib_arch)
766
ifeq ($(DEB_CROSS),yes)
767
ifneq ($(with_deps_on_target_arch_pkgs),yes)
770
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
771
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
772
usr_lib = $(PFL)/lib/sh4-linux-gnu/
775
usr_lib = $(PFL)/$(libdir)
778
usr_lib = $(PFL)/$(libdir)
780
usr_lib32 = $(PFL)/lib32
781
usr_libn32 = $(PFL)/lib32
782
usr_libx32 = $(PFL)/libx32
783
usr_lib64 = $(PFL)/lib64
784
# FIXME: Move to the new location for native builds too
785
ifeq ($(DEB_CROSS),yes)
786
usr_libhf = $(PFL)/libhf
787
usr_libsf = $(PFL)/libsf
789
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
790
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
793
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
794
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
795
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
796
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
797
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
798
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
800
libgcc_dir = $(RPF)/$(libdir)
801
# yes, really; lib32gcc_s ends up in usr
802
libgcc_dir32 = $(PFL)/lib32
803
libgcc_dirn32 = $(RPF)/lib32
804
# libx32gcc_s also ends up in usr
805
libgcc_dirx32 = $(PFL)/libx32
806
libgcc_dir64 = $(RPF)/lib64
807
# FIXME: Move to the new location for native builds too
808
ifeq ($(DEB_CROSS),yes)
809
libgcc_dirhf = $(RPF)/libhf
810
libgcc_dirsf = $(RPF)/libsf
812
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
813
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
816
# install_gcc_lib(lib,soname,flavour,package)
817
define install_gcc_lib
818
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
819
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
821
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
825
checkdirs = $(builddir)
826
ifeq ($(with_separate_libgcj),yes)
827
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
828
ifneq ($(with_standalone_gcj),yes)
829
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
833
ifeq ($(with_separate_go),yes)
834
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
835
checkdirs = $(buildlibdir)/libgo
838
ifeq ($(with_separate_gnat),yes)
839
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
840
checkdirs = $(builddir)/gcc
844
ifneq ($(DEB_CROSS),yes)
845
ifneq ($(single_package),yes)
846
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
848
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
851
ifeq ($(with_deps_on_target_arch_pkgs),yes)
852
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
854
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
858
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
859
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
860
export MULTIARCH_DIRNAME
864
configure: $(configure_dependencies)
866
$(configure_dummy_stamp):
867
touch $(configure_dummy_stamp)
871
: # give information about the build process
872
@echo "------------------------ Build process variables ------------------------"
873
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
874
@echo "Package source: $(PKGSOURCE)"
875
@echo "GCC version: $(GCC_VERSION)"
876
@echo "Base Debian version: $(BASE_VERSION)"
877
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
878
ifeq ($(DEB_CROSS),yes)
879
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
881
@echo "Using shell $(SHELL)"
882
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
883
@echo "CPPFLAGS: $(CPPFLAGS)"
884
@echo "CFLAGS: $(CFLAGS)"
885
@echo "LDFLAGS: $(LDFLAGS)"
886
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
887
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
888
@echo "Install prefix: /$(PF)"
889
ifeq ($(biarchn32)-$(biarch64),yes-yes)
890
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
891
else ifeq ($(biarch64)-$(biarch32),yes-yes)
892
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
893
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
894
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
895
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
896
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
898
ifeq ($(biarch64),yes)
899
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
901
ifeq ($(biarch32),yes)
902
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
904
@echo "Will not build the biarch compilers"
909
ifeq ($(with_cxx),yes)
910
@echo "Will build the C++ compiler"
912
@echo "Will not build the C++ compiler: $(with_cxx)"
914
ifeq ($(with_objc),yes)
915
@echo "Will build the ObjC compiler."
916
ifeq ($(with_objc_gc),yes)
917
@echo "Will build the extra ObjC runtime for garbage collection."
919
@echo "Will not build the extra ObjC runtime for garbage collection."
922
@echo "Will not build the ObjC compiler: $(with_objc)"
924
ifeq ($(with_objcxx),yes)
925
@echo "Will build the Obj-C++ compiler"
927
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
929
ifeq ($(with_fortran),yes)
930
@echo "Will build the Fortran 95 compiler."
932
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
934
ifeq ($(with_java),yes)
935
@echo "Will build the Java compiler."
937
@echo "Will not build the Java compiler: $(with_java)"
939
ifeq ($(with_ada),yes)
940
@echo "Will build the Ada compiler."
941
ifeq ($(with_libgnat),yes)
942
@echo "Will build the shared Ada libraries."
944
@echo "Will not build the shared Ada libraries."
947
@echo "Will not build the Ada compiler: $(with_ada)"
949
ifeq ($(with_go),yes)
950
@echo "Will build the Go compiler."
952
@echo "Will not build the Go compiler: $(with_go)"
955
@echo "Will build the D compiler"
956
ifeq ($(with_libphobos),yes)
957
@echo "Will build the phobos D runtime library."
959
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
962
@echo "Will not build the D compiler: $(with_d)"
964
ifeq ($(with_ssp),yes)
965
@echo "Will build with SSP support."
967
@echo "Will build without SSP support: $(with_ssp)"
969
ifeq ($(with_check),yes)
970
@echo "Will run the testsuite."
972
@echo "Will not run the testsuite: $(with_check)"
974
ifeq ($(with_nls),yes)
975
@echo "Will enable national language support."
977
@echo "Will disable national language support: $(with_nls)"
979
@echo "-----------------------------------------------------------------------------"
981
ifeq ($(with_check),yes)
982
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
985
echo "expect is failing on your system with the above error, which means the GCC"; \
986
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
987
echo "-----------------------------------------------------------------------------"; \
991
rm -f $(configure_stamp) $(build_stamp)
992
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1002
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1003
../src/configure $(subst ___, ,$(CONFARGS))
1005
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1006
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1007
mkdir -p $(builddir)/sys-include; \
1008
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1011
touch $(configure_stamp)
1013
build: $(build_dependencies)
1015
$(build_dummy_stamp):
1016
touch $(build_dummy_stamp)
1018
$(build_locale_stamp):
1019
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1020
: # build locales needed by libstdc++ testsuite
1023
- sh debian/locale-gen
1025
touch $(build_locale_stamp)
1028
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1030
rm -f bootstrap-protocol
1031
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1033
ifeq ($(DEB_CROSS),yes)
1034
: # build cross compiler for $(TARGET_ALIAS)
1039
$(MAKE) -C $(builddir) $(NJOBS) \
1042
$(LDFLAGS_TO_PASS) \
1044
echo $$? > status; \
1045
) 2>&1 | tee bootstrap-protocol
1046
s=`cat status`; rm -f status; test $$s -eq 0
1048
# REVERSE_CROSS build
1049
ifeq ($(REVERSE_CROSS),yes)
1050
: # build cross compiler for $(TARGET_ALIAS)
1055
$(MAKE) -C $(builddir) $(NJOBS) \
1058
$(LDFLAGS_TO_PASS) \
1060
echo $$? > status; \
1061
) 2>&1 | tee bootstrap-protocol
1062
s=`cat status`; rm -f status; test $$s -eq 0
1065
ifeq ($(with_java),yes)
1067
ln -sf /usr/bin/fastjar bin/jar
1068
ifeq ($(with_native_ecj),yes)
1069
: # prepare the standalone ecj jar
1070
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1071
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1073
ifeq ($(with_java_maintainer_mode),yes)
1076
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1079
: # If we don't have gjavah in PATH, try to build it with the old gij
1081
if [ -x /usr/bin/gjavah-4.8 ]; then \
1082
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1083
elif [ -x bin/gjavah ]; then \
1086
mkdir -p $(builddir)/java_hacks; \
1087
cd $(builddir)/java_hacks; \
1088
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1089
mkdir -p gnu/classpath/tools; \
1090
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1091
gnu/classpath/tools/; \
1092
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1093
gnu/classpath/tools/common; \
1095
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1097
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1098
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1099
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1102
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1103
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1104
) > $(PWD)/bin/gjavah; \
1105
chmod +x $(PWD)/bin/gjavah; \
1109
: # build native compiler
1115
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1118
$(STAGE1_CFLAGS_TO_PASS) \
1119
$(LDFLAGS_TO_PASS) \
1121
echo $$? > status; \
1122
) 2>&1 | tee bootstrap-protocol
1123
s=`cat status`; rm -f status; test $$s -eq 0
1126
-chmod 755 $(srcdir)/contrib/warn_summary
1127
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1128
rm -f bootstrap-summary; \
1129
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1130
> bootstrap-summary; \
1133
touch $(build_stamp)
1135
ifeq ($(versioned_packages),yes)
1136
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1139
ifeq ($(DEB_CROSS),yes)
1140
CC_for_hppa64_cross = $(CC)
1142
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1145
$(configure_hppa64_stamp): $(build_stamp)
1147
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1148
rm -rf $(builddir_hppa64)
1149
mkdir $(builddir_hppa64)
1151
cd $(builddir_hppa64) && \
1154
CC="$(CC_for_hppa64_cross)" \
1156
--enable-languages=c \
1158
--libexecdir=/$(hppa64libexecdir) \
1162
--disable-libatomic \
1165
--disable-libmudflap \
1167
--disable-libquadmath \
1169
--with-system-zlib \
1170
--with-as=/usr/bin/hppa64-linux-gnu-as \
1171
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1172
--includedir=/usr/hppa64-linux-gnu/include \
1173
--build=$(DEB_BUILD_GNU_TYPE) \
1174
--host=$(DEB_HOST_GNU_TYPE) \
1175
--target=hppa64-linux-gnu
1176
touch $(configure_hppa64_stamp)
1178
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1182
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1183
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1184
CC="$(CC_for_hppa64_cross)" \
1187
touch $(build_hppa64_stamp)
1189
$(configure_neon_stamp): $(build_stamp)
1191
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1192
rm -rf $(builddir_neon)
1193
mkdir $(builddir_neon)
1195
cd $(builddir_neon) && \
1198
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1200
--disable-bootstrap \
1201
--enable-languages=c,c++,objc,fortran \
1203
--libexecdir=/$(libexecdir) \
1204
--program-suffix=-$(BASE_VERSION) \
1207
--disable-libmudflap \
1208
--with-arch=armv7-a --with-tune=cortex-a8 \
1209
--with-float=$(float_abi) --with-fpu=neon \
1210
--host=arm-linux-gnueabi \
1211
--build=arm-linux-gnueabi \
1212
--target=arm-linux-gnueabi
1213
touch $(configure_neon_stamp)
1215
$(build_neon_stamp): $(configure_neon_stamp)
1219
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1220
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1223
touch $(build_neon_stamp)
1227
$(srcdir)/gcc/doc/cpp.texi \
1228
$(srcdir)/gcc/doc/cppinternals.texi \
1229
$(srcdir)/gcc/doc/gcc.texi \
1230
$(srcdir)/gcc/doc/gccint.texi
1231
ifeq ($(with_fortran),yes)
1232
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1234
ifeq ($(with_java),yes)
1235
MANUALS += $(srcdir)/gcc/java/gcj.texi
1237
ifeq ($(with_ada),yes)
1239
$(builddir)/gcc/doc/gnat_ugn.texi \
1240
$(srcdir)/gcc/ada/gnat_rm.texi \
1241
$(srcdir)/gcc/ada/gnat-style.texi
1243
ifeq ($(with_gomp),yes)
1244
MANUALS += $(srcdir)/libgomp/libgomp.texi
1246
ifeq ($(with_itm),yes)
1247
MANUALS += $(srcdir)/libitm/libitm.texi
1249
ifeq ($(with_qmath),yes)
1250
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1252
ifeq ($(with_go),yes)
1253
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1256
html-docs: $(build_html_stamp)
1257
#$(build_html_stamp): html-texi2html
1258
#$(build_html_stamp): html-makeinfo
1259
$(build_html_stamp): html-makeinfo-nosplit
1262
rm -rf html $(builddir)/gcc/html
1263
mkdir $(builddir)/gcc/html
1264
ln -s $(builddir)/gcc/html html
1265
cd $(builddir)/gcc; \
1266
for manual in $(MANUALS); do \
1267
outname=`basename $${manual} .texi`; \
1268
echo "generating $$outname ..."; \
1269
texi2html -number -split chapter \
1270
-I $(srcdir)/gcc/doc/include \
1271
-I $(srcdir)/gcc/p/doc \
1272
-I $(srcdir)/gcc/p/doc/generated \
1273
-I `dirname $${manual}` \
1274
-I $(builddir)/gcc \
1275
-I $(buildlibdir)/libquadmath \
1283
cd $(builddir)/gcc; \
1284
for manual in $(MANUALS); do \
1285
manual=`find $(srcdir) -name $${file}.texi`; \
1286
outname=`basename $${manual} .texi`; \
1287
echo "generating $$outname ..."; \
1288
if [ "$${manual}" ]; then \
1289
makeinfo --html --number-sections \
1290
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1291
-I $(srcdir)/gcc/p/doc \
1292
-I $(srcdir)/gcc/p/doc/generated \
1293
-I $(builddir)/gcc \
1294
-I $(buildlibdir)/libquadmath \
1300
html-makeinfo-nosplit:
1303
cd $(builddir)/gcc; \
1304
for manual in $(MANUALS); do \
1305
outname=`basename $${manual} .texi`.html; \
1306
echo "generating $$outname ..."; \
1307
makeinfo --html --number-sections --no-split \
1308
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1309
-I $(srcdir)/gcc/p/doc \
1310
-I $(srcdir)/gcc/p/doc/generated \
1311
-I $(builddir)/gcc \
1312
-I $(buildlibdir)/libquadmath \
1313
-o $(PWD)/html/$${outname} \
1317
# start the script only on architectures known to have slow autobuilders ...
1318
logwatch_archs := alpha arm m68k mips mipsel sparc
1319
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1320
start_logwatch = yes
1322
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1323
start_logwatch = yes
1326
stamps/mauve-build: stamps/build
1329
ifeq ($(with_mauve_check),yes)
1330
tar xf $(wildcard /usr/src/mauve*.tar.*)
1335
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1336
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1340
stamps/mauve-check: stamps/build stamps/mauve-build
1341
ifeq ($(with_mauve_check),yes)
1343
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1344
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1345
xvfb-run -s "-extension GLX" java Harness \
1346
-vm $(CURDIR)/$(sdkimg)/bin/java \
1347
-file $(CURDIR)/debian/mauve_tests \
1348
-timeout 30000 2>&1 \
1352
echo "mauve testsuite not run for this build" > mauve/mauve_output
1356
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1357
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1359
rm -f $(builddir)/runcheck*
1361
-chmod 755 $(srcdir)/contrib/test_summary
1363
: # needed for the plugin tests to succeed
1364
ln -sf gcc $(builddir)/prev-gcc
1365
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1367
ifneq ($(with_common_libs),yes)
1368
ifeq ($(with_cxx),yes)
1369
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1371
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1372
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1375
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1376
echo "Running testsuite in $$d ..."; \
1381
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1383
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1384
done 2>&1 | tee test-protocol2
1386
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1387
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1389
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1390
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1391
) > libstdc++-test-summary
1392
echo 'BEGIN installed libstdc++-v3 test-summary'
1393
cat libstdc++-test-summary
1394
echo 'END installed libstdc++-v3 test-summary'
1395
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1400
ifeq ($(start_logwatch),yes)
1401
: # start logwatch script for regular output during test runs
1402
chmod +x debian/logwatch.sh
1403
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1404
-m '\ntestsuite still running ...\n' \
1406
$(builddir)/gcc/testsuite/gcc/gcc.log \
1407
$(builddir)/gcc/testsuite/g++/g++.log \
1408
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1409
$(builddir)/gcc/testsuite/objc/objc.log \
1410
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1411
$(builddir)/gcc/testsuite/gnat/gnat.log \
1412
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1413
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1414
$(builddir)/gcc/p/test/test_log \
1415
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1416
$(buildlibdir)/libjava/testsuite/libjava.log \
1417
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1418
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1419
$(buildlibdir)/libffi/testsuite/libffi.log \
1423
ifeq ($(with_ada),yes)
1424
chmod +x debian/acats-killer.sh
1425
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1426
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1427
$(builddir)/gcc/testsuite/g++.log \
1433
for d in $(checkdirs); do \
1434
echo "Running testsuite in $$d ..."; \
1438
EXTRA_TEST_PFLAGS=-g0 \
1439
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1441
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1442
done 2>&1 | tee test-protocol
1444
-ps aux | fgrep logwatch | fgrep -v fgrep
1445
-if [ -f $(builddir)/logwatch.pid ]; then \
1446
kill -1 `cat $(builddir)/logwatch.pid`; \
1448
kill -9 `cat $(builddir)/logwatch.pid`; \
1449
rm -f $(builddir)/logwatch.pid; \
1451
-ps aux | fgrep logwatch | fgrep -v fgrep
1453
ifeq ($(with_ada),yes)
1454
-if [ -f $(builddir)/acats-killer.pid ]; then \
1455
kill -1 `cat $(builddir)/acats-killer.pid`; \
1457
kill -9 `cat $(builddir)/acats-killer.pid`; \
1458
rm -f $(builddir)/acats-killer.pid; \
1462
: # running the libjava testsuite alone is missing this information
1463
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1465
if [ -x $(srcdir)/contrib/test_summary ]; then \
1466
rm -f test-summary; \
1469
echo '' > ts-include; \
1470
echo '' >> ts-include; \
1471
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1472
echo 'Bootstrap comparison failure:' >> ts-include; \
1473
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1474
echo '' >> ts-include; \
1475
echo '' >> ts-include; \
1477
echo "Build Dependencies:" >> ts-include; \
1478
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1479
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1480
| fgrep -v '<none>' >> ts-include; \
1481
echo '' >> ts-include; \
1482
cat ../$(patch_stamp) >> ts-include; \
1483
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1484
$(srcdir)/contrib/test_summary \
1485
-i ts-include -m "$(S_EMAIL)" \
1486
) > raw-test-summary; \
1487
if [ -n "$(testsuite_tarball)" ]; then \
1488
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1489
echo " Do not interpret the results on its own" >> test-summary; \
1490
echo " but compare them with the results from" >> test-summary; \
1491
echo " the gcc-snapshot package." >> test-summary; \
1493
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1495
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1496
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1497
echo '' >> test-summary; \
1498
cat bootstrap-summary >> test-summary; \
1500
echo 'BEGIN test-summary'; \
1502
echo 'END test-summary'; \
1504
ifeq ($(with_d),yes)
1505
: # the D test failures for the non-default multilibs are known, ignore them
1506
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1507
mv -f test-summary.tmp test-summary
1510
touch $(check_stamp)
1512
$(check_inst_stamp): $(check_stamp)
1513
rm -f test-inst-protocol
1515
ifeq ($(start_logwatch),yes)
1516
: # start logwatch script for regular output during test runs
1517
chmod +x debian/logwatch.sh
1518
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1519
-m '\ntestsuite (3.3) still running ...\n' \
1520
test-inst-protocol \
1521
check-inst/{gcc,g++,g77,objc}.log \
1528
echo "Running testsuite ..."
1532
EXTRA_TEST_PFLAGS=-g0 \
1533
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1534
cd check-inst && $(srcdir)/contrib/test_installed \
1535
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1536
2>&1 | tee test-inst-protocol
1538
-ps aux | fgrep logwatch | fgrep -v fgrep
1539
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1540
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1544
-ps aux | fgrep logwatch | fgrep -v fgrep
1546
-chmod 755 $(srcdir)/contrib/test_summary
1547
if [ -x $(srcdir)/contrib/test_summary ]; then \
1548
rm -f test-inst-summary; \
1551
echo '' > ts-include; \
1552
echo '' >> ts-include; \
1553
echo "Build Dependencies:" >> ts-include; \
1554
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1555
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1556
| fgrep -v '<none>' >> ts-include; \
1557
echo '' >> ts-include; \
1558
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1559
$(srcdir)/contrib/test_summary \
1560
-i ts-include -m "$(S_EMAIL)" \
1561
) > raw-test-inst-summary; \
1562
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1563
>> test-inst-summary; \
1564
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1565
| grep -v EOF >> test-inst-summary; \
1566
echo 'BEGIN test-installed-summary'; \
1567
cat test-inst-summary; \
1568
echo 'END test-installed-summary'; \
1571
chmod 755 debian/reduce-test-diff.awk
1572
if diff -u test-inst-summary test-summary \
1573
| debian/reduce-test-diff.awk > diff-summary; \
1575
mv -f diff-summary testsuite-comparision; \
1578
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1581
) > testsuite-comparision; \
1582
rm -f diff-summary; \
1584
touch $(check_inst_stamp)
1586
clean: debian/control
1589
rm -f *-summary *-protocol testsuite-comparision summary-diff
1590
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1591
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1593
rm -f $(srcdir)/gcc/po/*.gmo
1594
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1595
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1597
[ -f $$f ] || continue; \
1599
| 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$$//'); \
1602
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1603
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1604
rm -f debian/shlibs.local debian/substvars.local
1605
rm -f debian/*.debhelper
1606
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1607
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1608
rm -f debian/lib*gcj-bc.shlibs
1609
rm -rf bin locales share
1613
$(cross_clean) dh_clean
1615
# -----------------------------------------------------------------------------
1616
# some abbrevations for the package names and directories;
1617
# p_XXX is the package name, d_XXX is the package directory
1618
# these macros are only used in the binary-* targets.
1620
ifeq ($(versioned_packages),yes)
1621
pkg_ver := -$(BASE_VERSION)
1624
ifneq ($(DEB_CROSS),yes)
1625
p_base = gcc$(pkg_ver)-base
1626
p_xbase = gcc$(pkg_ver)-base
1627
p_gcc = gcc$(pkg_ver)
1628
p_cpp = cpp$(pkg_ver)
1629
p_cppd = cpp$(pkg_ver)-doc
1630
p_cxx = g++$(pkg_ver)
1631
p_doc = gcc$(pkg_ver)-doc
1632
p_lgcc = libgcc$(GCC_SONAME)
1634
# only triggered if DEB_CROSS set
1635
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1636
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1637
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1639
p_base = gcc$(pkg_ver)-base
1642
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1643
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1644
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1646
p_hppa64 = gcc$(pkg_ver)-hppa64
1649
d_base = debian/$(p_base)
1650
d_xbase = debian/$(p_xbase)
1651
d_gcc = debian/$(p_gcc)
1652
d_cpp = debian/$(p_cpp)
1653
d_cppd = debian/$(p_cppd)
1654
d_cxx = debian/$(p_cxx)
1655
d_doc = debian/$(p_doc)
1656
d_lgcc = debian/$(p_lgcc)
1657
d_hppa64= debian/$(p_hppa64)
1659
d_neon = debian/tmp-neon
1661
common_substvars = \
1662
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1664
ifeq ($(DEB_CROSS),yes)
1665
lib_binaries := indep_binaries
1667
lib_binaries := arch_binaries
1670
# ---------------------------------------------------------------------------
1672
ifeq ($(single_package),yes)
1673
include debian/rules.d/binary-snapshot.mk
1676
ifneq ($(DEB_CROSS),yes)
1677
ifeq ($(with_source),yes)
1678
include debian/rules.d/binary-source.mk
1682
ifneq ($(BACKPORT),true)
1683
ifeq ($(with_gccxbase),yes)
1684
include debian/rules.d/binary-base.mk
1687
ifeq ($(with_gccbase),yes)
1688
include debian/rules.d/binary-base.mk
1691
# always include to get some definitions
1692
include debian/rules.d/binary-libgcc.mk
1694
ifeq ($(with_libqmath),yes)
1695
include debian/rules.d/binary-libquadmath.mk
1698
ifeq ($(with_libgmath),yes)
1699
include debian/rules.d/binary-libgccmath.mk
1702
ifeq ($(with_libgomp),yes)
1703
include debian/rules.d/binary-libgomp.mk
1706
ifeq ($(with_libitm),yes)
1707
include debian/rules.d/binary-libitm.mk
1710
ifeq ($(with_libatomic),yes)
1711
include debian/rules.d/binary-libatomic.mk
1714
ifeq ($(with_libbacktrace),yes)
1715
include debian/rules.d/binary-libbacktrace.mk
1718
ifeq ($(with_cdev),yes)
1719
include debian/rules.d/binary-cpp.mk
1722
ifeq ($(with_fixincl),yes)
1723
include debian/rules.d/binary-fixincl.mk
1726
ifeq ($(with_mudflap),yes)
1727
include debian/rules.d/binary-libmudflap.mk
1730
ifeq ($(with_libssp),yes)
1731
include debian/rules.d/binary-libssp.mk
1734
ifeq ($(with_objcxx),yes)
1735
include debian/rules.d/binary-objcxx.mk
1738
ifeq ($(with_objc),yes)
1739
include debian/rules.d/binary-objc.mk
1740
include debian/rules.d/binary-libobjc.mk
1743
ifeq ($(with_go),yes)
1744
include debian/rules.d/binary-go.mk
1747
# include before cxx
1748
ifeq ($(with_java),yes)
1749
include debian/rules.d/binary-java.mk
1752
ifeq ($(with_cxxdev),yes)
1753
include debian/rules.d/binary-cxx.mk
1755
ifeq ($(with_cxx),yes)
1756
include debian/rules.d/binary-libstdcxx.mk
1759
ifeq ($(with_libasan),yes)
1760
include debian/rules.d/binary-libasan.mk
1763
ifeq ($(with_libtsan),yes)
1764
include debian/rules.d/binary-libtsan.mk
1767
ifeq ($(with_f77),yes)
1768
include debian/rules.d/binary-f77.mk
1771
ifeq ($(with_fortran),yes)
1772
include debian/rules.d/binary-fortran.mk
1775
ifeq ($(with_ada),yes)
1776
include debian/rules.d/binary-ada.mk
1779
ifeq ($(with_d),yes)
1780
include debian/rules.d/binary-d.mk
1783
ifeq ($(with_libnof),yes)
1784
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1785
include debian/rules.d/binary-nof.mk
1789
ifeq ($(with_softfloat),yes)
1790
include debian/rules.d/binary-softfloat.mk
1793
# gcc must be moved/built after g77 and g++
1794
ifeq ($(with_cdev),yes)
1795
include debian/rules.d/binary-gcc.mk
1798
ifeq ($(with_hppa64),yes)
1799
include debian/rules.d/binary-hppa64.mk
1802
ifeq ($(with_neon),yes)
1803
include debian/rules.d/binary-neon.mk
1808
endif # ($(single_package),yes)
1810
# ----------------------------------------------------------------------
1811
install: $(install_dependencies)
1813
$(install_dummy_stamp): $(build_dummy_stamp)
1814
touch $(install_dummy_stamp)
1816
$(install_snap_stamp): $(build_dependencies)
1821
: # Install directories
1825
ifeq ($(with_hppa64),yes)
1828
$(MAKE) -C $(builddir_hppa64) \
1831
$(LDFLAGS_TO_PASS) \
1832
DESTDIR=$(PWD)/$(d) \
1835
ls -l $(d)/$(PF)/bin
1836
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1837
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1839
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1842
for i in ar nm ranlib; do \
1843
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1846
: # remove files not needed from the hppa64 build
1847
rm -rf $(d)/$(PF)/share/info
1848
rm -rf $(d)/$(PF)/share/man
1849
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1850
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1852
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1853
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1855
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1858
README|features.h|syslimits.h|limits.h) ;; \
1859
linux|$(TARGET_ALIAS)) ;; \
1860
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1861
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1866
: # Work around PR lto/41569
1867
ln -sf gcc $(builddir)/prev-gcc
1868
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1870
: # Install everything
1873
$(MAKE) -C $(builddir) \
1875
$(LDFLAGS_TO_PASS) \
1876
DESTDIR=$(PWD)/$(d) \
1877
infodir=/$(PF)/share/info \
1878
mandir=/$(PF)/share/man \
1881
ls -l $(d)/$(PF)/bin
1882
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1883
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1885
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1888
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1891
README|features.h|syslimits.h|limits.h) ;; \
1892
linux|$(TARGET_ALIAS)) ;; \
1893
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1894
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1898
ifneq ($(configured_libdir),$(libdir))
1899
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1900
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1901
$(d)/$(PF)/$(libdir)/. || true; \
1905
# FIXME: libjava/classpath not correctly patched
1906
ifeq ($(with_java),yes)
1907
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1908
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1909
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1910
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1911
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1914
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1916
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1917
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1918
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1919
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1920
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1921
$(srcdir)/libjava/libgcj_bc.c \
1922
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1923
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
1927
if [ -d $(d)/usr/man/man1 ]; then \
1928
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
1931
chmod 755 debian/dh_*
1932
touch $(install_snap_stamp)
1934
$(install_stamp): $(build_stamp)
1937
dh_clean -k -N$(p_hppa64)
1939
if [ -f $(binary_stamp)-hppa64 ]; then \
1940
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
1942
rm -f $(binary_stamp)*
1943
if [ -f saved-stamp-hppa64 ]; then \
1944
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
1947
: # Install directories
1949
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
1950
ifeq ($(biarch32),yes)
1951
mkdir -p $(d)/$(PF)/lib32/debug
1953
ifeq ($(biarch64),yes)
1954
mkdir -p $(d)/$(PF)/lib64/debug
1956
ifeq ($(biarchn32),yes)
1957
mkdir -p $(d)/$(PF)/$(libn32)/debug
1959
ifeq ($(biarchx32),yes)
1960
mkdir -p $(d)/$(PF)/libx32/debug
1963
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
1964
ifneq ($(DEB_TARGET_ARCH),x32)
1965
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
1966
: # (this works when CONFARGS contains '--disable-multilib')
1967
ln -s $(configured_libdir) $(d)/lib64
1968
mkdir -p $(d)/$(PF)/$(configured_libdir)
1969
ln -s $(configured_libdir) $(d)/$(PF)/lib64
1972
ifeq ($(DEB_TARGET_ARCH),x32)
1973
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
1974
ln -s $(configured_libdir) $(d)/libx32
1975
mkdir -p $(d)/$(PF)/$(configured_libdir)
1976
ln -s $(configured_libdir) $(d)/$(PF)/libx32
1979
: # Work around PR lto/41569
1980
ln -sf gcc $(builddir)/prev-gcc
1982
: # Install everything
1985
$(MAKE) -C $(builddir) \
1987
$(LDFLAGS_TO_PASS) \
1988
DESTDIR=$(PWD)/$(d) \
1989
infodir=/$(PF)/share/info \
1990
mandir=/$(PF)/share/man \
1993
ifneq ($(configured_libdir),$(libdir))
1994
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
1995
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1996
$(d)/$(PF)/$(libdir)/. || true; \
2000
ifeq ($(with_libcxxdbg),yes)
2001
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2002
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2003
[ -f $$i ] || continue; \
2004
d=$$(dirname $$i); \
2005
b=$$(basename $$i); \
2006
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2011
# FIXME: libjava/classpath not correctly patched
2012
ifeq ($(with_java),yes)
2013
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2014
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2015
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2016
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2017
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2021
: # remove rpath settings from binaries and shared libs
2022
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2023
$(if $(filter $(with_multiarch_lib),yes), \
2024
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2025
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2026
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2028
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2029
[ -h $$i ] && continue; \
2030
chrpath --delete $$i; \
2031
echo "removed RPATH: $$i"; \
2034
: # remove '*.la' and '*.lai' files, not shipped in any package.
2035
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2037
ifneq ($(with_libgnat),yes)
2038
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2041
ifeq ($(GFDL_INVARIANT_FREE),yes)
2042
for i in gcc gcov; do \
2043
I=`echo $$i | tr a-z A-Z`; \
2044
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2045
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2048
ifeq ($(with_fortran),yes)
2050
I=`echo $$i | tr a-z A-Z`; \
2051
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2052
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2055
ifeq ($(with_java),yes)
2056
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2058
I=`echo $$i | tr a-z A-Z`; \
2059
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2060
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2065
# ifeq ($(with_ada),yes)
2066
# : # rename files (versioned ada binaries)
2068
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2069
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2070
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2072
# for i in $(GNAT_TOOLS); do \
2073
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2077
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2078
ifneq ($(DEB_STAGE),stage1)
2079
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2080
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2081
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2082
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2084
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2085
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2086
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2087
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2092
for i in ar nm ranlib; do \
2093
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2096
chmod 755 debian/dh_*
2098
# tar cf tmp.tar debian/tmp
2100
touch $(install_stamp)
2102
$(install_hppa64_stamp): $(build_hppa64_stamp)
2106
mkdir -p $(d_hppa64)/$(PF)
2109
$(MAKE) -C $(builddir_hppa64) \
2112
$(LDFLAGS_TO_PASS) \
2113
DESTDIR=$(PWD)/$(d_hppa64) \
2116
ifeq ($(versioned_packages),yes)
2117
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp \
2118
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp$(pkg_ver)
2121
ifneq ($(single_package),yes)
2122
: # remove files not needed
2123
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2124
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2125
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2126
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2127
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2129
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2130
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2131
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2134
touch $(install_hppa64_stamp)
2136
$(install_neon_stamp): $(build_neon_stamp)
2140
mkdir -p $(d_neon)/$(PF)
2143
$(MAKE) -C $(builddir_neon) \
2146
$(LDFLAGS_TO_PASS) \
2147
DESTDIR=$(PWD)/$(d_neon) \
2149
touch $(install_neon_stamp)
2151
# ----------------------------------------------------------------------
2152
# Build architecture-dependent files here.
2153
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2154
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2155
ifeq ($(with_check),yes)
2157
# : # Send Email about sucessfull build.
2158
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2161
# ----------------------------------------------------------------------
2162
# Build architecture-independent files here.
2163
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2164
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2167
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2169
binary: binary-indep binary-arch
2170
.PHONY: build clean binary-indep binary-arch binary