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)}'`; \
53
echo "Limiting memory for test runs to $${m}kB"; \
54
if ulimit -m $$m; then \
55
echo " limited to `ulimit -m`kB"; \
63
ifeq ($(locale_data),generate)
64
SET_LOCPATH = LOCPATH=$(PWD)/locales
67
SET_PATH = PATH=$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
68
ifeq ($(trunk_build),yes)
69
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
70
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
72
ifneq (,$(findstring ppc64-linux,$(DEB_TARGET_GNU_TYPE)))
73
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
77
# the recipient for the test summaries. Send with: debian/rules mail-summary
78
S_EMAIL = gcc@packages.debian.org gcc-testresults@gcc.gnu.org
80
# build not yet prepared to take variables from the environment
85
$(foreach v, CPPFLAGS CFLAGS CXXFLAGS FFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v)))))
87
ifeq ($(REVERSE_CROSS),yes)
90
CC = $(if $(filter yes,$(with_ada)),gnatgcc,gcc)
92
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_TARGET_GNU_TYPE))
93
CC_FOR_TARGET = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
95
CC_FOR_TARGET = $(DEB_TARGET_GNU_TYPE)-gcc
98
ifneq ($(derivative),Ubuntu)
99
ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel mips mipsel))
100
STAGE1_CFLAGS = -g -O2
109
# work around PR 57689
110
ifeq ($(DEB_TARGET_ARCH),ia64)
114
ifeq ($(with_ssp_default),yes)
116
ifeq (,$(BOOT_CFLAGS))
120
LIBCXXFLAGS = -g -O2 -fno-implicit-templates
121
# Only use -fno-stack-protector when known to the stage1 compiler.
122
cc-fno-stack-protector := $(shell if $(CC) $(CFLAGS) -fno-stack-protector \
123
-S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
124
then echo "-fno-stack-protector"; fi;)
125
$(foreach var,STAGE1_CFLAGS BOOT_CFLAGS LIBCFLAGS LIBCXXFLAGS,$(eval \
126
$(var) += $(cc-fno-stack-protector)))
129
ifeq ($(DEB_CROSS),yes)
133
ifneq (,$(findstring static,$(DEB_BUILD_OPTIONS)))
137
ifneq (,$(filter $(DEB_TARGET_ARCH),alpha))
138
LDFLAGS += -Wl,--no-relax
142
$(if $(CFLAGS),CFLAGS="$(CFLAGS)") \
143
$(if $(BOOT_CFLAGS),BOOT_CFLAGS="$(BOOT_CFLAGS)") \
144
$(if $(LIBCFLAGS),LIBCFLAGS="$(LIBCFLAGS)") \
145
$(if $(LIBCXXFLAGS),LIBCXXFLAGS="$(LIBCXXFLAGS)")
147
$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)")
148
STAGE1_CFLAGS_TO_PASS = \
149
$(if $(STAGE1_CFLAGS),STAGE1_CFLAGS="$(STAGE1_CFLAGS)")
151
docdir = usr/share/doc
154
--with-pkgversion='$(distribution)$(if $(with_linaro_branch),/Linaro)___$(DEB_VERSION)' \
155
--with-bugurl='file:///usr/share/doc/$(subst gcj,gcc,$(PKGSOURCE))/README.Bugs'
158
--enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \
161
ifeq ($(versioned_packages),yes)
162
CONFARGS += --program-suffix=-$(BASE_VERSION)
167
--disable-decimal-float \
168
--disable-libatomic \
170
--disable-libmudflap \
172
--disable-libquadmath \
173
--disable-libsanitizer \
175
--libexecdir=/$(libexecdir) \
176
--libdir=/$(PF)/$(configured_libdir) \
177
$(if $(with_build_sysroot),--with-build-sysroot=$(with_build_sysroot)) \
178
$(if $(with_sysroot),--with-sysroot=$(with_sysroot))
180
ifeq ($(with_multiarch_lib),yes)
185
ifeq ($(DEB_STAGE),stage1)
198
--enable-linker-build-id \
200
ifneq ($(single_package),yes)
202
--libexecdir=/$(libexecdir) \
203
--without-included-gettext \
204
--enable-threads=posix \
205
--with-gxx-include-dir=/$(cxx_inc_dir) \
206
--libdir=/$(PF)/$(configured_libdir)
209
ifneq ($(with_cpp),yes)
210
CONFARGS += --disable-cpp
213
ifeq ($(with_nls),yes)
214
CONFARGS += --enable-nls
216
CONFARGS += --disable-nls
219
ifeq ($(with_bootstrap),off)
220
CONFARGS += --disable-bootstrap
221
else ifneq ($(with_bootstrap),)
222
CONFARGS += --enable-bootstrap=$(with_bootstrap)
225
ifneq ($(with_sysroot),)
226
CONFARGS += --with-sysroot=$(with_sysroot)
228
ifneq ($(with_build_sysroot),)
229
CONFARGS += --with-build-sysroot=$(with_build_sysroot)
232
ifeq ($(force_gnu_locales),yes)
233
CONFARGS += --enable-clocale=gnu
236
ifeq ($(with_cxx)-$(with_debug),yes-yes)
237
CONFARGS += --enable-libstdcxx-debug
239
CONFARGS += --enable-libstdcxx-time=yes
241
ifeq (,$(filter $(DEB_TARGET_ARCH), hurd-i386 kfreebsd-i386 kfreebsd-amd64))
242
CONFARGS += --enable-gnu-unique-object
245
ifneq ($(with_ssp),yes)
246
CONFARGS += --disable-libssp
249
CONFARGS += --disable-libmudflap
251
ifneq ($(with_gomp),yes)
252
CONFARGS += --disable-libgomp
255
ifneq ($(with_itm),yes)
256
CONFARGS += --disable-libitm
259
ifneq ($(with_atomic),yes)
260
CONFARGS += --disable-libatomic
263
ifneq ($(with_asan),yes)
264
CONFARGS += --disable-libsanitizer
267
ifneq ($(with_qmath),yes)
268
CONFARGS += --disable-libquadmath
271
ifeq ($(with_plugins),yes)
272
CONFARGS += --enable-plugin
275
#ifeq ($(with_gold),yes)
276
# CONFARGS += --enable-gold --enable-ld=default
279
#CONFARGS += --with-plugin-ld=ld.gold
280
#CONFARGS += --with-plugin-ld
284
CONFARGS += --with-system-zlib
286
jvm_name_short = java-1.5.0-gcj-$(BASE_VERSION)$(if $(findstring snap,$(PKGSOURCE)),-snap)
287
jvm_name_long = $(jvm_name_short)-1.5.0.0
289
ifeq ($(with_java),yes)
290
CONFARGS += --disable-browser-plugin
291
ifeq ($(with_java_maintainer_mode),yes)
292
CONFARGS += --enable-java-maintainer-mode
294
ifeq ($(with_java_biarch_awt),yes)
295
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)-default))
297
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)))
299
ifneq (,$(findstring gtk,$(java_awt_peers)))
300
CONFARGS += --enable-gtk-cairo
302
jvm_ext = -$(DEB_TARGET_ARCH)$(if $(filter yes,$(DEB_CROSS)),-cross)
303
jvm_dir = /usr/lib/jvm/$(jvm_name_short)$(jvm_ext)
304
CONFARGS += --with-java-home=$(jvm_dir)/jre
305
CONFARGS += --enable-java-home \
306
--with-jvm-root-dir=$(jvm_dir) \
307
--with-jvm-jar-dir=/usr/lib/jvm-exports/$(jvm_name_short)$(jvm_ext)
308
CONFARGS += --with-arch-directory=$(java_cpu)
309
ifeq (./,$(dir $(ecj_jar)))
310
CONFARGS += --with-ecj-jar=$(jvm_dir)/lib/ecj.jar
312
CONFARGS += --with-ecj-jar=$(ecj_jar)
314
ifneq ($(with_libgcj),yes)
315
CONFARGS += --disable-libgcj
319
ifeq ($(with_gcj),yes)
320
ifeq ($(DEB_HOST_GNU_CPU),m32r)
321
CONFARGS += --enable-libgcj
325
ifeq ($(with_objc)-$(with_objc_gc),yes-yes)
326
CONFARGS += --enable-objc-gc
329
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), i486-linux-gnu i586-linux-gnu i686-linux-gnu))
330
ifeq ($(multilib),yes)
331
ifeq ($(biarch64),yes)
332
CONFARGS += --enable-targets=all
337
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), x86_64-linux-gnu x86_64-linux-gnux32 x86_64-kfreebsd-gnu s390x-linux-gnu sparc64-linux-gnu))
338
ifneq ($(biarch32),yes)
339
CONFARGS += --disable-multilib
343
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), powerpc-linux-gnu powerpc-linux-gnuspe))
344
CONFARGS += --enable-secureplt
345
ifeq ($(biarch64),yes)
346
CONFARGS += --disable-softfloat --with-cpu=default32
347
ifeq ($(multilib),yes)
348
CONFARGS += --disable-softfloat \
349
--enable-targets=powerpc-linux,powerpc64-linux
352
CONFARGS += --disable-multilib
356
ifneq (,$(findstring powerpc64le-linux,$(DEB_TARGET_GNU_TYPE)))
357
CONFARGS += --enable-secureplt
358
CONFARGS += --with-cpu=power7 --with-tune=power8
359
CONFARGS += --disable-multilib
362
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
363
CONFARGS += --enable-secureplt
364
ifeq ($(biarch32),yes)
365
ifeq ($(multilib),yes)
366
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
369
CONFARGS += --disable-multilib
371
ifeq ($(derivative),Ubuntu)
372
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
376
ifeq ($(REVERSE_CROSS),yes)
377
# FIXME: requires isl and cloog headers for the target
378
#CONFARGS += --without-isl
379
# FIXME: build currently fails build the precompiled headers
380
CONFARGS += --disable-libstdcxx-pch
383
ifeq ($(with_multiarch_lib),yes)
384
CONFARGS += --enable-multiarch
387
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
388
CONFARGS += --with-cpu=8548 --enable-e500_double
391
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
392
CONFARGS += --with-float=soft
395
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
396
CONFARGS += --with-fpu=vfp
399
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
400
ifeq ($(multilib),yes)
401
CONFARGS += --enable-multilib
403
CONFARGS += --disable-sjlj-exceptions
404
# FIXME: libjava is not ported for thumb, this hack only works for
405
# separate gcj builds
406
ifneq (,$(filter armhf,$(DEB_TARGET_ARCH)))
407
ifeq ($(distribution),Raspbian)
408
with_arm_arch = armv6
411
ifneq (,$(findstring gcj,$(PKGSOURCE)))
412
with_arm_arch = armv6
414
with_arm_arch = armv7-a
416
with_arm_fpu = vfpv3-d16
420
ifeq ($(derivative),Debian)
421
with_arm_arch = armv4t
422
else ifneq (,$(filter $(distrelease),karmic))
423
with_arm_arch = armv6
424
with_arm_fpu = vfpv3-d16
425
else ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
426
ifneq (,$(findstring gcj,$(PKGSOURCE)))
427
with_arm_arch = armv6
429
with_arm_arch = armv7-a
431
with_arm_fpu = vfpv3-d16
433
with_arm_arch = armv5t # starting with quantal
436
CONFARGS += --with-arch=$(with_arm_arch)
437
ifneq (,$(with_arm_fpu))
438
CONFARGS += --with-fpu=$(with_arm_fpu)
440
CONFARGS += --with-float=$(float_abi)
441
ifeq ($(with_arm_thumb),yes)
442
CONFARGS += --with-mode=thumb
446
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
447
CONFARGS += --disable-werror
449
# FIXME: correct fix-warnings.dpatch
450
ifeq ($(derivative),Ubuntu)
451
CONFARGS += --disable-werror
454
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
455
ifeq ($(biarch64),yes)
456
CONFARGS += --enable-targets=all
460
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
461
ifeq ($(biarch32),yes)
462
CONFARGS += --enable-targets=all
466
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
467
CONFARGS += --with-system-libunwind
470
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
471
ifeq ($(multilib),yes)
472
CONFARGS += --with-multilib-list=m4,m4-nofpu
474
CONFARGS += --with-cpu=sh4
477
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
478
CONFARGS += --disable-multilib
481
ifeq ($(DEB_TARGET_ARCH_OS),linux)
482
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc powerpcspe ppc64 ppc64el s390 s390x sparc sparc64))
483
CONFARGS += --with-long-double-128
487
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
488
ifneq (,$(filter $(derivative),Ubuntu))
489
ifneq (,$(filter $(distrelease),dapper hardy))
490
CONFARGS += --with-arch-32=i486
491
else ifneq (,$(filter $(distrelease),jaunty karmic lucid))
492
CONFARGS += --with-arch-32=i586
494
CONFARGS += --with-arch-32=i686
497
ifneq (,$(filter $(distrelease),etch lenny))
498
CONFARGS += --with-arch-32=i486
500
CONFARGS += --with-arch-32=i586
505
ifeq ($(DEB_TARGET_ARCH),amd64)
506
CONFARGS += --with-abi=m64
508
ifeq ($(DEB_TARGET_ARCH),x32)
509
CONFARGS += --with-abi=mx32
511
ifeq ($(multilib),yes)
512
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
513
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
514
else ifeq ($(DEB_TARGET_ARCH),x32)
515
CONFARGS += --with-multilib-list=mx32,m64,m32
519
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
520
CONFARGS += --with-arch=i586
523
ifeq ($(DEB_TARGET_ARCH),lpia)
524
CONFARGS += --with-arch=pentium-m --with-tune=i586
527
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
528
CONFARGS += --with-tune=generic
531
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
532
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
533
ifeq ($(multilib),yes)
534
ifeq ($(biarchn32)-$(biarch64),yes-yes)
535
CONFARGS += --enable-targets=all
536
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
541
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
542
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
543
ifeq ($(multilib),yes)
544
ifeq ($(biarchn32)-$(biarch64),yes-yes)
545
CONFARGS += --enable-targets=all
546
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
551
#FIXME: howto for mipsn32?
552
ifneq (,$(findstring mips64el-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
553
CONFARGS += --with-mips-plt
554
ifeq ($(multilib),yes)
555
ifeq ($(biarchn32)-$(biarch32),yes-yes)
556
CONFARGS += --enable-targets=all
557
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=loongson3a
558
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
563
ifneq (,$(findstring mips64-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
564
CONFARGS += --with-mips-plt
565
ifeq ($(multilib),yes)
566
ifeq ($(biarchn32)-$(biarch32),yes-yes)
567
CONFARGS += --enable-targets=all
568
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
569
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
574
ifneq (,$(findstring mips64el-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
575
CONFARGS += --with-mips-plt
576
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=loongson3a
577
ifeq ($(multilib),yes)
578
ifeq ($(biarchn32)-$(biarch32),yes-yes)
579
CONFARGS += --enable-targets=all
580
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
585
ifneq (,$(findstring mips64-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
586
CONFARGS += --with-mips-plt
587
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
588
ifeq ($(multilib),yes)
589
ifeq ($(biarchn32)-$(biarch32),yes-yes)
590
CONFARGS += --enable-targets=all
591
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
596
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
597
ifeq ($(multilib),yes)
598
ifeq ($(biarch64),yes)
599
CONFARGS += --enable-targets=all
604
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
605
CONFARGS += --disable-libstdcxx-pch
608
ifneq (,$(findstring gdc, $(PKGSOURCE)))
609
CONFARGS += --disable-libquadmath
612
ifeq ($(trunk_build),yes)
613
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
614
CONFARGS += --disable-werror
616
CONFARGS += --enable-checking=yes
618
CONFARGS += --enable-checking=release
622
--build=$(DEB_BUILD_GNU_TYPE) \
623
--host=$(DEB_HOST_GNU_TYPE) \
624
--target=$(TARGET_ALIAS)
626
ifeq ($(DEB_CROSS),yes)
628
--program-prefix=$(TARGET_ALIAS)-
629
ifneq ($(with_deps_on_target_arch_pkgs),yes)
631
--includedir=/$(PFL)/include
635
ifeq ($(with_bootstrap),off)
637
else ifeq ($(with_bootstrap),)
638
bootstrap_target = bootstrap-lean
639
# no profiledbootstrap on the following architectures
640
# - m68k: we're happy that it builds at all
641
no_profiled_bs_archs := alpha arm arm64 hppa m68k
642
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
643
bootstrap_target = profiledbootstrap
644
# FIXME: disabled for first uploads
645
bootstrap_target = bootstrap-lean
647
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
648
bootstrap_target = bootstrap-lean
650
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
651
bootstrap_target = bootstrap-lean
654
# disable profiled bootstrap on slow archs, get to testing first ...
655
ifeq ($(derivative),Debian)
656
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
657
bootstrap_target = bootstrap-lean
660
ifeq ($(derivative),Ubuntu)
661
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
662
bootstrap_target = bootstrap-lean
668
# Increase the timeout for one testrun on slow architectures
669
ifeq ($(derivative),Debian)
670
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
672
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
675
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
678
else ifeq ($(derivative),Ubuntu)
679
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
681
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
687
ifneq ($(trunk_build),yes)
688
ifeq ($(with_ssp),yes)
689
ifneq ($(single_package),yes)
690
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
692
# FIXME Ubuntu armel buildd hangs
693
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
696
ifeq ($(derivative),Ubuntu)
697
# the buildds are just slow ... don't check the non-default
698
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
705
ifeq ($(derivative),Ubuntu)
706
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
707
ifeq ($(with_arm_thumb),yes)
708
#DEJAGNU_RUNS += -marm
710
DEJAGNU_RUNS += -mthumb
715
# no b-d on g++-multilib, this is run by the built compiler
716
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
717
$(shell cat build/runcheck$(1).out), \
718
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
719
ifeq ($(biarch32),yes)
720
DEJAGNU_RUNS += $(call abi_run_check,-m32)
722
ifeq ($(biarch64),yes)
723
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
725
ifeq ($(biarchn32),yes)
726
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
728
ifeq ($(biarchx32),yes)
729
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
732
# gdc is not multilib'd
733
ifneq (,$(findstring gdc, $(PKGSOURCE)))
737
ifneq (,$(findstring gcj, $(PKGSOURCE)))
742
ifneq (,$(findstring gnat, $(PKGSOURCE)))
746
ifneq (,$(strip $(value DEJAGNU_RUNS)))
747
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
750
# PF is the installation prefix for the package without the leading slash.
751
# It's "usr" for gcc releases.
753
# use value set in the environment
754
else ifeq ($(trunk_build),yes)
755
PF = usr/lib/gcc-snapshot
756
else ifeq ($(PKGSOURCE),gcc-linaro)
757
PF = usr/lib/gcc-linaro
762
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
763
ifeq ($(DEB_CROSS),yes)
764
ifneq ($(with_deps_on_target_arch_pkgs),yes)
765
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
773
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
774
ifeq ($(DEB_CROSS),yes)
775
ifneq ($(with_deps_on_target_arch_pkgs),yes)
776
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
784
ifeq ($(with_multiarch_lib),yes)
785
ifeq ($(DEB_CROSS),yes)
786
ifneq ($(with_deps_on_target_arch_pkgs),yes)
789
libdir = lib/$(DEB_TARGET_MULTIARCH)
792
libdir = lib/$(DEB_TARGET_MULTIARCH)
797
configured_libdir = lib
799
hppa64libexecdir= $(PF)/lib
801
# /usr/libexec doesn't follow the FHS
802
ifeq ($(single_package),yes)
804
libexecdir = $(PF)/libexec
805
versiondir = $(GCC_VERSION)
807
libexecdir = $(PF)/$(configured_libdir)
808
versiondir = $(BASE_VERSION)
810
buildlibdir = $(builddir)/$(TARGET_ALIAS)
812
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
813
gcc_subdir_name = gcc
814
ifneq ($(single_package),yes)
815
ifeq ($(DEB_CROSS),yes)
816
ifneq ($(with_deps_on_target_arch_pkgs),yes)
817
gcc_subdir_name = gcc-cross
822
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
823
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
826
ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
829
lib32 = $(PF)/$(lib32loc)
834
p_l= $(1)$(cross_lib_arch)
835
p_d= $(1)-dbg$(cross_lib_arch)
839
ifeq ($(DEB_CROSS),yes)
840
ifneq ($(with_deps_on_target_arch_pkgs),yes)
843
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
844
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
845
usr_lib = $(PFL)/lib/sh4-linux-gnu/
848
usr_lib = $(PFL)/$(libdir)
851
usr_lib = $(PFL)/$(libdir)
853
usr_lib32 = $(PFL)/$(lib32loc)
854
usr_libn32 = $(PFL)/lib32
855
usr_libx32 = $(PFL)/libx32
856
usr_lib64 = $(PFL)/lib64
857
# FIXME: Move to the new location for native builds too
858
ifeq ($(DEB_CROSS),yes)
859
usr_libhf = $(PFL)/libhf
860
usr_libsf = $(PFL)/libsf
862
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
863
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
866
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
867
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
868
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
869
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
870
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
871
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
873
libgcc_dir = $(RPF)/$(libdir)
874
# yes, really; lib32gcc_s ends up in usr
875
libgcc_dir32 = $(PFL)/$(lib32loc)
876
libgcc_dirn32 = $(RPF)/lib32
877
# libx32gcc_s also ends up in usr
878
libgcc_dirx32 = $(PFL)/libx32
879
libgcc_dir64 = $(RPF)/lib64
880
# FIXME: Move to the new location for native builds too
881
ifeq ($(DEB_CROSS),yes)
882
libgcc_dirhf = $(RPF)/libhf
883
libgcc_dirsf = $(RPF)/libsf
885
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
886
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
889
# install_gcc_lib(lib,soname,flavour,package)
890
define install_gcc_lib
891
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
892
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
894
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
898
checkdirs = $(builddir)
899
ifeq ($(with_separate_libgcj),yes)
900
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
901
ifneq ($(with_standalone_gcj),yes)
902
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
906
ifeq ($(with_separate_go),yes)
907
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
908
checkdirs = $(buildlibdir)/libgo
911
ifeq ($(with_separate_gnat),yes)
912
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
913
checkdirs = $(builddir)/gcc
917
ifneq ($(DEB_CROSS),yes)
918
ifneq ($(single_package),yes)
919
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
921
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
924
ifeq ($(with_deps_on_target_arch_pkgs),yes)
925
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
927
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
931
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
932
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
933
export MULTIARCH_DIRNAME
937
configure: $(configure_dependencies)
939
$(configure_dummy_stamp):
940
touch $(configure_dummy_stamp)
944
: # give information about the build process
945
@echo "------------------------ Build process variables ------------------------"
946
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
947
@echo "Package source: $(PKGSOURCE)"
948
@echo "GCC version: $(GCC_VERSION)"
949
@echo "Base Debian version: $(BASE_VERSION)"
950
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
951
ifeq ($(DEB_CROSS),yes)
952
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
954
@echo "Using shell $(SHELL)"
955
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
956
@echo "CPPFLAGS: $(CPPFLAGS)"
957
@echo "CFLAGS: $(CFLAGS)"
958
@echo "LDFLAGS: $(LDFLAGS)"
959
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
960
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
961
@echo "Install prefix: /$(PF)"
962
ifeq ($(biarchn32)-$(biarch64),yes-yes)
963
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
964
else ifeq ($(biarchn32)-$(biarch32),yes-yes)
965
@echo "Will build the triarch compilers (o32/n32/64, defaulting to 64)"
966
else ifeq ($(biarch64)-$(biarch32),yes-yes)
967
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
968
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
969
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
970
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
971
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
973
ifeq ($(biarch64),yes)
974
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
976
ifeq ($(biarch32),yes)
977
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
979
@echo "Will not build the biarch compilers"
984
ifeq ($(with_cxx),yes)
985
@echo "Will build the C++ compiler"
987
@echo "Will not build the C++ compiler: $(with_cxx)"
989
ifeq ($(with_objc),yes)
990
@echo "Will build the ObjC compiler."
991
ifeq ($(with_objc_gc),yes)
992
@echo "Will build the extra ObjC runtime for garbage collection."
994
@echo "Will not build the extra ObjC runtime for garbage collection."
997
@echo "Will not build the ObjC compiler: $(with_objc)"
999
ifeq ($(with_objcxx),yes)
1000
@echo "Will build the Obj-C++ compiler"
1002
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
1004
ifeq ($(with_fortran),yes)
1005
@echo "Will build the Fortran 95 compiler."
1007
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
1009
ifeq ($(with_java),yes)
1010
@echo "Will build the Java compiler."
1012
@echo "Will not build the Java compiler: $(with_java)"
1014
ifeq ($(with_ada),yes)
1015
@echo "Will build the Ada compiler."
1016
ifeq ($(with_libgnat),yes)
1017
@echo "Will build the shared Ada libraries."
1019
@echo "Will not build the shared Ada libraries."
1022
@echo "Will not build the Ada compiler: $(with_ada)"
1024
ifeq ($(with_go),yes)
1025
@echo "Will build the Go compiler."
1027
@echo "Will not build the Go compiler: $(with_go)"
1029
ifeq ($(with_d),yes)
1030
@echo "Will build the D compiler"
1031
ifeq ($(with_libphobos),yes)
1032
@echo "Will build the phobos D runtime library."
1034
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
1037
@echo "Will not build the D compiler: $(with_d)"
1039
ifeq ($(with_ssp),yes)
1040
@echo "Will build with SSP support."
1042
@echo "Will build without SSP support: $(with_ssp)"
1044
ifeq ($(with_check),yes)
1045
@echo "Will run the testsuite."
1047
@echo "Will not run the testsuite: $(with_check)"
1049
ifeq ($(with_nls),yes)
1050
@echo "Will enable national language support."
1052
@echo "Will disable national language support: $(with_nls)"
1054
@echo "-----------------------------------------------------------------------------"
1056
ifeq ($(with_check),yes)
1057
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
1060
echo "expect is failing on your system with the above error, which means the GCC"; \
1061
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
1062
echo "-----------------------------------------------------------------------------"; \
1066
rm -f $(configure_stamp) $(build_stamp)
1067
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1077
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1078
../src/configure $(subst ___, ,$(CONFARGS))
1080
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1081
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1082
mkdir -p $(builddir)/sys-include; \
1083
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1086
touch $(configure_stamp)
1088
build: $(build_dependencies)
1090
$(build_dummy_stamp):
1091
touch $(build_dummy_stamp)
1093
$(build_locale_stamp):
1094
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1095
: # build locales needed by libstdc++ testsuite
1098
- sh debian/locale-gen
1100
touch $(build_locale_stamp)
1103
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1105
rm -f bootstrap-protocol
1106
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1108
ifeq ($(DEB_CROSS),yes)
1109
: # build cross compiler for $(TARGET_ALIAS)
1114
$(MAKE) -C $(builddir) $(NJOBS) \
1117
$(LDFLAGS_TO_PASS) \
1119
echo $$? > status; \
1120
) 2>&1 | tee bootstrap-protocol
1121
s=`cat status`; rm -f status; test $$s -eq 0
1123
# REVERSE_CROSS build
1124
ifeq ($(REVERSE_CROSS),yes)
1125
: # build cross compiler for $(TARGET_ALIAS)
1130
$(MAKE) -C $(builddir) $(NJOBS) \
1133
$(LDFLAGS_TO_PASS) \
1135
echo $$? > status; \
1136
) 2>&1 | tee bootstrap-protocol
1137
s=`cat status`; rm -f status; test $$s -eq 0
1140
ifeq ($(with_java),yes)
1142
ln -sf /usr/bin/fastjar bin/jar
1143
ifeq ($(with_native_ecj),yes)
1144
: # prepare the standalone ecj jar
1145
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1146
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1148
ifeq ($(with_java_maintainer_mode),yes)
1151
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1154
: # If we don't have gjavah in PATH, try to build it with the old gij
1156
if [ -x /usr/bin/gjavah-4.8 ]; then \
1157
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1158
elif [ -x bin/gjavah ]; then \
1161
mkdir -p $(builddir)/java_hacks; \
1162
cd $(builddir)/java_hacks; \
1163
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1164
mkdir -p gnu/classpath/tools; \
1165
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1166
gnu/classpath/tools/; \
1167
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1168
gnu/classpath/tools/common; \
1170
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1172
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1173
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1174
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1177
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1178
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1179
) > $(PWD)/bin/gjavah; \
1180
chmod +x $(PWD)/bin/gjavah; \
1184
: # build native compiler
1190
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1193
$(STAGE1_CFLAGS_TO_PASS) \
1194
$(LDFLAGS_TO_PASS) \
1196
echo $$? > status; \
1197
) 2>&1 | tee bootstrap-protocol
1198
s=`cat status`; rm -f status; test $$s -eq 0
1201
-chmod 755 $(srcdir)/contrib/warn_summary
1202
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1203
rm -f bootstrap-summary; \
1204
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1205
> bootstrap-summary; \
1208
touch $(build_stamp)
1210
ifeq ($(versioned_packages),yes)
1211
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1214
ifeq ($(DEB_CROSS),yes)
1215
CC_for_hppa64_cross = $(CC)
1217
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1220
$(configure_hppa64_stamp): $(build_stamp)
1222
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1223
rm -rf $(builddir_hppa64)
1224
mkdir $(builddir_hppa64)
1226
cd $(builddir_hppa64) && \
1229
CC="$(CC_for_hppa64_cross)" \
1231
--enable-languages=c \
1233
--libexecdir=/$(hppa64libexecdir) \
1237
--disable-libatomic \
1240
--disable-libmudflap \
1242
--disable-libquadmath \
1244
--with-system-zlib \
1245
--with-as=/usr/bin/hppa64-linux-gnu-as \
1246
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1247
--includedir=/usr/hppa64-linux-gnu/include \
1248
--build=$(DEB_BUILD_GNU_TYPE) \
1249
--host=$(DEB_HOST_GNU_TYPE) \
1250
--target=hppa64-linux-gnu
1251
touch $(configure_hppa64_stamp)
1253
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1257
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1258
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1259
CC="$(CC_for_hppa64_cross)" \
1262
touch $(build_hppa64_stamp)
1264
$(configure_neon_stamp): $(build_stamp)
1266
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1267
rm -rf $(builddir_neon)
1268
mkdir $(builddir_neon)
1270
cd $(builddir_neon) && \
1273
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1275
--disable-bootstrap \
1276
--enable-languages=c,c++,objc,fortran \
1278
--libexecdir=/$(libexecdir) \
1279
--program-suffix=-$(BASE_VERSION) \
1282
--disable-libmudflap \
1283
--with-arch=armv7-a --with-tune=cortex-a8 \
1284
--with-float=$(float_abi) --with-fpu=neon \
1285
--host=arm-linux-gnueabi \
1286
--build=arm-linux-gnueabi \
1287
--target=arm-linux-gnueabi
1288
touch $(configure_neon_stamp)
1290
$(build_neon_stamp): $(configure_neon_stamp)
1294
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1295
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1298
touch $(build_neon_stamp)
1302
$(srcdir)/gcc/doc/cpp.texi \
1303
$(srcdir)/gcc/doc/cppinternals.texi \
1304
$(srcdir)/gcc/doc/gcc.texi \
1305
$(srcdir)/gcc/doc/gccint.texi
1306
ifeq ($(with_fortran),yes)
1307
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1309
ifeq ($(with_java),yes)
1310
MANUALS += $(srcdir)/gcc/java/gcj.texi
1312
ifeq ($(with_ada),yes)
1314
$(builddir)/gcc/doc/gnat_ugn.texi \
1315
$(srcdir)/gcc/ada/gnat_rm.texi \
1316
$(srcdir)/gcc/ada/gnat-style.texi
1318
ifeq ($(with_gomp),yes)
1319
MANUALS += $(srcdir)/libgomp/libgomp.texi
1321
ifeq ($(with_itm),yes)
1322
MANUALS += $(srcdir)/libitm/libitm.texi
1324
ifeq ($(with_qmath),yes)
1325
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1327
ifeq ($(with_go),yes)
1328
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1331
html-docs: $(build_html_stamp)
1332
#$(build_html_stamp): html-texi2html
1333
#$(build_html_stamp): html-makeinfo
1334
$(build_html_stamp): html-makeinfo-nosplit
1337
rm -rf html $(builddir)/gcc/html
1338
mkdir $(builddir)/gcc/html
1339
ln -s $(builddir)/gcc/html html
1340
cd $(builddir)/gcc; \
1341
for manual in $(MANUALS); do \
1342
outname=`basename $${manual} .texi`; \
1343
echo "generating $$outname ..."; \
1344
texi2html -number -split chapter \
1345
-I $(srcdir)/gcc/doc/include \
1346
-I $(srcdir)/gcc/p/doc \
1347
-I $(srcdir)/gcc/p/doc/generated \
1348
-I `dirname $${manual}` \
1349
-I $(builddir)/gcc \
1350
-I $(buildlibdir)/libquadmath \
1358
cd $(builddir)/gcc; \
1359
for manual in $(MANUALS); do \
1360
manual=`find $(srcdir) -name $${file}.texi`; \
1361
outname=`basename $${manual} .texi`; \
1362
echo "generating $$outname ..."; \
1363
if [ "$${manual}" ]; then \
1364
makeinfo --html --number-sections \
1365
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1366
-I $(srcdir)/gcc/p/doc \
1367
-I $(srcdir)/gcc/p/doc/generated \
1368
-I $(builddir)/gcc \
1369
-I $(buildlibdir)/libquadmath \
1375
html-makeinfo-nosplit:
1378
cd $(builddir)/gcc; \
1379
for manual in $(MANUALS); do \
1380
outname=`basename $${manual} .texi`.html; \
1381
echo "generating $$outname ..."; \
1382
makeinfo --html --number-sections --no-split \
1383
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1384
-I $(srcdir)/gcc/p/doc \
1385
-I $(srcdir)/gcc/p/doc/generated \
1386
-I $(builddir)/gcc \
1387
-I $(buildlibdir)/libquadmath \
1388
-o $(PWD)/html/$${outname} \
1392
# start the script only on architectures known to have slow autobuilders ...
1393
logwatch_archs := alpha arm m68k mips mipsel sparc
1394
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1395
start_logwatch = yes
1397
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1398
start_logwatch = yes
1401
stamps/mauve-build: stamps/build
1404
ifeq ($(with_mauve_check),yes)
1405
tar xf $(wildcard /usr/src/mauve*.tar.*)
1410
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1411
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1415
stamps/mauve-check: stamps/build stamps/mauve-build
1416
ifeq ($(with_mauve_check),yes)
1418
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1419
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1420
xvfb-run -s "-extension GLX" java Harness \
1421
-vm $(CURDIR)/$(sdkimg)/bin/java \
1422
-file $(CURDIR)/debian/mauve_tests \
1423
-timeout 30000 2>&1 \
1427
echo "mauve testsuite not run for this build" > mauve/mauve_output
1431
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1432
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1434
rm -f $(builddir)/runcheck*
1436
-chmod 755 $(srcdir)/contrib/test_summary
1438
: # needed for the plugin tests to succeed
1439
ln -sf gcc $(builddir)/prev-gcc
1440
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1443
ifneq ($(with_common_libs),yes)
1444
ifeq ($(with_cxx),yes)
1445
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1447
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1448
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1451
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1452
echo "Running testsuite in $$d ..."; \
1457
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1459
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1460
done 2>&1 | tee test-protocol2
1462
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1463
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1465
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1466
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1467
) > libstdc++-test-summary
1468
echo 'BEGIN installed libstdc++-v3 test-summary'
1469
cat libstdc++-test-summary
1470
echo 'END installed libstdc++-v3 test-summary'
1471
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1477
ifeq ($(start_logwatch),yes)
1478
: # start logwatch script for regular output during test runs
1479
chmod +x debian/logwatch.sh
1480
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1481
-m '\ntestsuite still running ...\n' \
1483
$(builddir)/gcc/testsuite/gcc/gcc.log \
1484
$(builddir)/gcc/testsuite/g++/g++.log \
1485
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1486
$(builddir)/gcc/testsuite/objc/objc.log \
1487
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1488
$(builddir)/gcc/testsuite/gnat/gnat.log \
1489
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1490
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1491
$(builddir)/gcc/p/test/test_log \
1492
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1493
$(buildlibdir)/libjava/testsuite/libjava.log \
1494
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1495
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1496
$(buildlibdir)/libffi/testsuite/libffi.log \
1500
ifeq ($(with_ada),yes)
1501
chmod +x debian/acats-killer.sh
1502
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1503
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1504
$(builddir)/gcc/testsuite/g++.log \
1510
for d in $(checkdirs); do \
1511
echo "Running testsuite in $$d ..."; \
1515
EXTRA_TEST_PFLAGS=-g0 \
1516
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1518
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1519
done 2>&1 | tee test-protocol
1521
-ps aux | fgrep logwatch | fgrep -v fgrep
1522
-if [ -f $(builddir)/logwatch.pid ]; then \
1523
kill -1 `cat $(builddir)/logwatch.pid`; \
1525
kill -9 `cat $(builddir)/logwatch.pid`; \
1526
rm -f $(builddir)/logwatch.pid; \
1528
-ps aux | fgrep logwatch | fgrep -v fgrep
1530
ifeq ($(with_ada),yes)
1531
-if [ -f $(builddir)/acats-killer.pid ]; then \
1532
kill -1 `cat $(builddir)/acats-killer.pid`; \
1534
kill -9 `cat $(builddir)/acats-killer.pid`; \
1535
rm -f $(builddir)/acats-killer.pid; \
1539
: # running the libjava testsuite alone is missing this information
1540
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1542
if [ -x $(srcdir)/contrib/test_summary ]; then \
1543
rm -f test-summary; \
1546
echo '' > ts-include; \
1547
echo '' >> ts-include; \
1548
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1549
echo 'Bootstrap comparison failure:' >> ts-include; \
1550
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1551
echo '' >> ts-include; \
1552
echo '' >> ts-include; \
1554
echo "Build Dependencies:" >> ts-include; \
1555
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1556
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1557
| fgrep -v '<none>' >> ts-include; \
1558
echo '' >> ts-include; \
1559
cat ../$(patch_stamp) >> ts-include; \
1560
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1561
$(srcdir)/contrib/test_summary \
1562
-i ts-include -m "$(S_EMAIL)" \
1563
) > raw-test-summary; \
1564
if [ -n "$(testsuite_tarball)" ]; then \
1565
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1566
echo " Do not interpret the results on its own" >> test-summary; \
1567
echo " but compare them with the results from" >> test-summary; \
1568
echo " the gcc-snapshot package." >> test-summary; \
1570
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1572
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1573
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1574
echo '' >> test-summary; \
1575
cat bootstrap-summary >> test-summary; \
1577
echo 'BEGIN test-summary'; \
1579
echo 'END test-summary'; \
1581
ifeq ($(with_d),yes)
1582
: # the D test failures for the non-default multilibs are known, ignore them
1583
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1584
mv -f test-summary.tmp test-summary
1587
touch $(check_stamp)
1589
$(check_inst_stamp): $(check_stamp)
1590
rm -f test-inst-protocol
1592
ifeq ($(start_logwatch),yes)
1593
: # start logwatch script for regular output during test runs
1594
chmod +x debian/logwatch.sh
1595
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1596
-m '\ntestsuite (3.3) still running ...\n' \
1597
test-inst-protocol \
1598
check-inst/{gcc,g++,g77,objc}.log \
1605
echo "Running testsuite ..."
1609
EXTRA_TEST_PFLAGS=-g0 \
1610
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1611
cd check-inst && $(srcdir)/contrib/test_installed \
1612
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1613
2>&1 | tee test-inst-protocol
1615
-ps aux | fgrep logwatch | fgrep -v fgrep
1616
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1617
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1621
-ps aux | fgrep logwatch | fgrep -v fgrep
1623
-chmod 755 $(srcdir)/contrib/test_summary
1624
if [ -x $(srcdir)/contrib/test_summary ]; then \
1625
rm -f test-inst-summary; \
1628
echo '' > ts-include; \
1629
echo '' >> ts-include; \
1630
echo "Build Dependencies:" >> ts-include; \
1631
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1632
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1633
| fgrep -v '<none>' >> ts-include; \
1634
echo '' >> ts-include; \
1635
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1636
$(srcdir)/contrib/test_summary \
1637
-i ts-include -m "$(S_EMAIL)" \
1638
) > raw-test-inst-summary; \
1639
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1640
>> test-inst-summary; \
1641
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1642
| grep -v EOF >> test-inst-summary; \
1643
echo 'BEGIN test-installed-summary'; \
1644
cat test-inst-summary; \
1645
echo 'END test-installed-summary'; \
1648
chmod 755 debian/reduce-test-diff.awk
1649
if diff -u test-inst-summary test-summary \
1650
| debian/reduce-test-diff.awk > diff-summary; \
1652
mv -f diff-summary testsuite-comparision; \
1655
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1658
) > testsuite-comparision; \
1659
rm -f diff-summary; \
1661
touch $(check_inst_stamp)
1663
clean: debian/control
1666
rm -f *-summary *-protocol testsuite-comparision summary-diff
1667
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1668
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1670
rm -f $(srcdir)/gcc/po/*.gmo
1671
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1672
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1674
[ -f $$f ] || continue; \
1676
| sed 's/BV/$(BASE_VERSION)/;s/CXX/$(CXX_SONAME)/;s/LGCJ/$(PKG_LIBGCJ_EXT)/;s/GCJ/$(PKG_GCJ_EXT)/;s/LC/$(GCC_SONAME)/;s/-CRB/$(cross_bin_arch)/;s/\.in$$//'); \
1679
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1680
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1681
rm -f debian/shlibs.local debian/substvars.local
1682
rm -f debian/*.debhelper
1683
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1684
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1685
rm -f debian/lib*gcj-bc.shlibs
1686
rm -rf bin locales share
1690
$(cross_clean) dh_clean
1692
# -----------------------------------------------------------------------------
1693
# some abbrevations for the package names and directories;
1694
# p_XXX is the package name, d_XXX is the package directory
1695
# these macros are only used in the binary-* targets.
1697
ifeq ($(versioned_packages),yes)
1698
pkg_ver := -$(BASE_VERSION)
1701
ifneq ($(DEB_CROSS),yes)
1702
p_base = gcc$(pkg_ver)-base
1703
p_xbase = gcc$(pkg_ver)-base
1704
p_gcc = gcc$(pkg_ver)
1705
p_cpp = cpp$(pkg_ver)
1706
p_cppd = cpp$(pkg_ver)-doc
1707
p_cxx = g++$(pkg_ver)
1708
p_doc = gcc$(pkg_ver)-doc
1709
p_lgcc = libgcc$(GCC_SONAME)
1711
# only triggered if DEB_CROSS set
1712
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1713
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1714
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1716
p_base = gcc$(pkg_ver)-base
1719
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1720
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1721
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1723
p_hppa64 = gcc$(pkg_ver)-hppa64
1726
d_base = debian/$(p_base)
1727
d_xbase = debian/$(p_xbase)
1728
d_gcc = debian/$(p_gcc)
1729
d_cpp = debian/$(p_cpp)
1730
d_cppd = debian/$(p_cppd)
1731
d_cxx = debian/$(p_cxx)
1732
d_doc = debian/$(p_doc)
1733
d_lgcc = debian/$(p_lgcc)
1734
d_hppa64= debian/$(p_hppa64)
1736
d_neon = debian/tmp-neon
1738
common_substvars = \
1739
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1741
ifeq ($(DEB_CROSS),yes)
1742
lib_binaries := indep_binaries
1744
lib_binaries := arch_binaries
1747
# ---------------------------------------------------------------------------
1749
ifeq ($(single_package),yes)
1750
include debian/rules.d/binary-snapshot.mk
1753
ifneq ($(DEB_CROSS),yes)
1754
ifeq ($(with_source),yes)
1755
include debian/rules.d/binary-source.mk
1759
ifneq ($(BACKPORT),true)
1760
ifeq ($(with_gccxbase),yes)
1761
include debian/rules.d/binary-base.mk
1764
ifeq ($(with_gccbase),yes)
1765
include debian/rules.d/binary-base.mk
1768
# always include to get some definitions
1769
include debian/rules.d/binary-libgcc.mk
1771
ifeq ($(with_libqmath),yes)
1772
include debian/rules.d/binary-libquadmath.mk
1775
ifeq ($(with_libgmath),yes)
1776
include debian/rules.d/binary-libgccmath.mk
1779
ifeq ($(with_libgomp),yes)
1780
include debian/rules.d/binary-libgomp.mk
1783
ifeq ($(with_libitm),yes)
1784
include debian/rules.d/binary-libitm.mk
1787
ifeq ($(with_libatomic),yes)
1788
include debian/rules.d/binary-libatomic.mk
1791
ifeq ($(with_libbacktrace),yes)
1792
include debian/rules.d/binary-libbacktrace.mk
1795
ifeq ($(with_cdev),yes)
1796
include debian/rules.d/binary-cpp.mk
1799
ifeq ($(with_fixincl),yes)
1800
include debian/rules.d/binary-fixincl.mk
1803
ifeq ($(with_libssp),yes)
1804
include debian/rules.d/binary-libssp.mk
1807
ifeq ($(with_objcxx),yes)
1808
include debian/rules.d/binary-objcxx.mk
1811
ifeq ($(with_objc),yes)
1812
include debian/rules.d/binary-objc.mk
1813
include debian/rules.d/binary-libobjc.mk
1816
ifeq ($(with_go),yes)
1817
include debian/rules.d/binary-go.mk
1820
# include before cxx
1821
ifeq ($(with_java),yes)
1822
include debian/rules.d/binary-java.mk
1825
ifeq ($(with_cxxdev),yes)
1826
include debian/rules.d/binary-cxx.mk
1828
ifeq ($(with_cxx),yes)
1829
include debian/rules.d/binary-libstdcxx.mk
1832
ifeq ($(with_libasan),yes)
1833
include debian/rules.d/binary-libasan.mk
1836
ifeq ($(with_libtsan),yes)
1837
include debian/rules.d/binary-libtsan.mk
1840
ifeq ($(with_f77),yes)
1841
include debian/rules.d/binary-f77.mk
1844
ifeq ($(with_fortran),yes)
1845
include debian/rules.d/binary-fortran.mk
1848
ifeq ($(with_ada),yes)
1849
include debian/rules.d/binary-ada.mk
1852
ifeq ($(with_d),yes)
1853
include debian/rules.d/binary-d.mk
1856
ifeq ($(with_libnof),yes)
1857
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1858
include debian/rules.d/binary-nof.mk
1862
ifeq ($(with_softfloat),yes)
1863
include debian/rules.d/binary-softfloat.mk
1866
# gcc must be moved/built after g77 and g++
1867
ifeq ($(with_cdev),yes)
1868
include debian/rules.d/binary-gcc.mk
1871
ifeq ($(with_hppa64),yes)
1872
include debian/rules.d/binary-hppa64.mk
1875
ifeq ($(with_neon),yes)
1876
include debian/rules.d/binary-neon.mk
1881
endif # ($(single_package),yes)
1883
# ----------------------------------------------------------------------
1884
install: $(install_dependencies)
1886
$(install_dummy_stamp): $(build_dummy_stamp)
1887
touch $(install_dummy_stamp)
1889
$(install_snap_stamp): $(build_dependencies)
1894
: # Install directories
1898
ifeq ($(with_hppa64),yes)
1901
$(MAKE) -C $(builddir_hppa64) \
1904
$(LDFLAGS_TO_PASS) \
1905
DESTDIR=$(PWD)/$(d) \
1908
ls -l $(d)/$(PF)/bin
1909
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1910
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1912
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1915
for i in ar nm ranlib; do \
1916
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1919
: # remove files not needed from the hppa64 build
1920
rm -rf $(d)/$(PF)/share/info
1921
rm -rf $(d)/$(PF)/share/man
1922
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1923
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1925
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1926
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1928
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1931
README|features.h|syslimits.h|limits.h) ;; \
1932
linux|$(TARGET_ALIAS)) ;; \
1933
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1934
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1939
: # Work around PR lto/41569
1940
ln -sf gcc $(builddir)/prev-gcc
1941
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1943
: # Install everything
1946
$(MAKE) -C $(builddir) \
1948
$(LDFLAGS_TO_PASS) \
1949
DESTDIR=$(PWD)/$(d) \
1950
infodir=/$(PF)/share/info \
1951
mandir=/$(PF)/share/man \
1954
ls -l $(d)/$(PF)/bin
1955
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1956
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1958
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1961
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1964
README|features.h|syslimits.h|limits.h) ;; \
1965
linux|$(TARGET_ALIAS)) ;; \
1966
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1967
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1971
ifneq ($(configured_libdir),$(libdir))
1972
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1973
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1974
$(d)/$(PF)/$(libdir)/. || true; \
1975
mv $(d)/$(PF)/libo32/$$i \
1976
$(d)/$(PF)/lib/. || true; \
1980
# FIXME: libjava/classpath not correctly patched
1981
ifeq ($(with_java),yes)
1982
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1983
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1984
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1985
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1986
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1989
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1991
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1992
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1993
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1994
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1995
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1996
$(srcdir)/libjava/libgcj_bc.c \
1997
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1998
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
2002
if [ -d $(d)/usr/man/man1 ]; then \
2003
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
2006
chmod 755 debian/dh_*
2007
touch $(install_snap_stamp)
2009
$(install_stamp): $(build_stamp)
2012
dh_clean -k -N$(p_hppa64)
2014
if [ -f $(binary_stamp)-hppa64 ]; then \
2015
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
2017
rm -f $(binary_stamp)*
2018
if [ -f saved-stamp-hppa64 ]; then \
2019
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
2022
: # Install directories
2024
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
2025
ifeq ($(biarch32),yes)
2026
mkdir -p $(d)/$(PF)/$(lib32loc)/debug
2028
ifeq ($(biarch64),yes)
2029
mkdir -p $(d)/$(PF)/lib64/debug
2031
ifeq ($(biarchn32),yes)
2032
mkdir -p $(d)/$(PF)/$(libn32)/debug
2034
ifeq ($(biarchx32),yes)
2035
mkdir -p $(d)/$(PF)/libx32/debug
2038
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
2039
ifneq ($(DEB_TARGET_ARCH),x32)
2040
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
2041
: # (this works when CONFARGS contains '--disable-multilib')
2042
ln -s $(configured_libdir) $(d)/lib64
2043
mkdir -p $(d)/$(PF)/$(configured_libdir)
2044
ln -s $(configured_libdir) $(d)/$(PF)/lib64
2047
ifeq ($(DEB_TARGET_ARCH),x32)
2048
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
2049
ln -s $(configured_libdir) $(d)/libx32
2050
mkdir -p $(d)/$(PF)/$(configured_libdir)
2051
ln -s $(configured_libdir) $(d)/$(PF)/libx32
2054
: # Work around PR lto/41569
2055
ln -sf gcc $(builddir)/prev-gcc
2057
: # Install everything
2060
$(MAKE) -C $(builddir) \
2062
$(LDFLAGS_TO_PASS) \
2063
DESTDIR=$(PWD)/$(d) \
2064
infodir=/$(PF)/share/info \
2065
mandir=/$(PF)/share/man \
2068
ifneq ($(configured_libdir),$(libdir))
2069
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
2070
mv $(d)/$(PF)/$(configured_libdir)/$$i \
2071
$(d)/$(PF)/$(libdir)/. || true; \
2072
mv $(d)/$(PF)/libo32/$$i \
2073
$(d)/$(PF)/lib/. || true; \
2077
ifeq ($(with_libcxxdbg),yes)
2078
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2079
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2080
[ -f $$i ] || continue; \
2081
d=$$(dirname $$i); \
2082
b=$$(basename $$i); \
2083
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2088
# FIXME: libjava/classpath not correctly patched
2089
ifeq ($(with_java),yes)
2090
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2091
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2092
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2093
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2094
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2098
: # remove rpath settings from binaries and shared libs
2099
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2100
$(if $(filter $(with_multiarch_lib),yes), \
2101
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2102
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2103
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2105
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2106
[ -h $$i ] && continue; \
2107
chrpath --delete $$i; \
2108
echo "removed RPATH: $$i"; \
2111
: # remove '*.la' and '*.lai' files, not shipped in any package.
2112
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2114
ifneq ($(with_libgnat),yes)
2115
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2118
ifeq ($(GFDL_INVARIANT_FREE),yes)
2119
for i in gcc gcov; do \
2120
I=`echo $$i | tr a-z A-Z`; \
2121
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2122
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2125
ifeq ($(with_fortran),yes)
2127
I=`echo $$i | tr a-z A-Z`; \
2128
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2129
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2132
ifeq ($(with_java),yes)
2133
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2135
I=`echo $$i | tr a-z A-Z`; \
2136
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2137
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2142
# ifeq ($(with_ada),yes)
2143
# : # rename files (versioned ada binaries)
2145
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2146
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2147
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2149
# for i in $(GNAT_TOOLS); do \
2150
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2154
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2155
ifneq ($(DEB_STAGE),stage1)
2156
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2157
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2158
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2159
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2161
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2162
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2163
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2164
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2169
for i in ar nm ranlib; do \
2170
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2173
chmod 755 debian/dh_*
2175
# tar cf tmp.tar debian/tmp
2177
touch $(install_stamp)
2179
$(install_hppa64_stamp): $(build_hppa64_stamp)
2183
mkdir -p $(d_hppa64)/$(PF)
2186
$(MAKE) -C $(builddir_hppa64) \
2189
$(LDFLAGS_TO_PASS) \
2190
DESTDIR=$(PWD)/$(d_hppa64) \
2193
ifeq ($(versioned_packages),yes)
2194
for i in cpp gcc-ar gcc-nm gcc-ranlib; do \
2195
mv -f $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i \
2196
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i$(pkg_ver); \
2200
ifneq ($(single_package),yes)
2201
: # remove files not needed
2202
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2203
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2204
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2205
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2206
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2208
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2209
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2210
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2213
touch $(install_hppa64_stamp)
2215
$(install_neon_stamp): $(build_neon_stamp)
2219
mkdir -p $(d_neon)/$(PF)
2222
$(MAKE) -C $(builddir_neon) \
2225
$(LDFLAGS_TO_PASS) \
2226
DESTDIR=$(PWD)/$(d_neon) \
2228
touch $(install_neon_stamp)
2230
# ----------------------------------------------------------------------
2231
# Build architecture-dependent files here.
2232
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2233
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2234
ifeq ($(with_check),yes)
2236
# : # Send Email about sucessfull build.
2237
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2240
# ----------------------------------------------------------------------
2241
# Build architecture-independent files here.
2242
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2243
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2246
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2248
binary: binary-indep binary-arch
2249
.PHONY: build clean binary-indep binary-arch binary