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
# the buildds are just slow ... don't check the non-default
690
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),armel sh4 mips))
693
ifneq ($(single_package),yes)
694
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
697
# FIXME Ubuntu armel buildd hangs
698
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
701
ifeq ($(derivative),Ubuntu)
702
# the buildds are just slow ... don't check the non-default
703
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 sparc))
710
ifeq ($(derivative),Ubuntu)
711
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
712
ifeq ($(with_arm_thumb),yes)
713
#DEJAGNU_RUNS += -marm
715
DEJAGNU_RUNS += -mthumb
720
# no b-d on g++-multilib, this is run by the built compiler
721
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
722
$(shell cat build/runcheck$(1).out), \
723
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
724
ifeq ($(biarch32),yes)
725
DEJAGNU_RUNS += $(call abi_run_check,-m32)
727
ifeq ($(biarch64),yes)
728
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
730
ifeq ($(biarchn32),yes)
731
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
733
ifeq ($(biarchx32),yes)
734
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
737
# gdc is not multilib'd
738
ifneq (,$(findstring gdc, $(PKGSOURCE)))
742
ifneq (,$(findstring gcj, $(PKGSOURCE)))
747
ifneq (,$(findstring gnat, $(PKGSOURCE)))
751
ifneq (,$(strip $(value DEJAGNU_RUNS)))
752
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
755
# PF is the installation prefix for the package without the leading slash.
756
# It's "usr" for gcc releases.
758
# use value set in the environment
759
else ifeq ($(trunk_build),yes)
760
PF = usr/lib/gcc-snapshot
761
else ifeq ($(PKGSOURCE),gcc-linaro)
762
PF = usr/lib/gcc-linaro
767
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
768
ifeq ($(DEB_CROSS),yes)
769
ifneq ($(with_deps_on_target_arch_pkgs),yes)
770
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
778
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
779
ifeq ($(DEB_CROSS),yes)
780
ifneq ($(with_deps_on_target_arch_pkgs),yes)
781
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
789
ifeq ($(with_multiarch_lib),yes)
790
ifeq ($(DEB_CROSS),yes)
791
ifneq ($(with_deps_on_target_arch_pkgs),yes)
794
libdir = lib/$(DEB_TARGET_MULTIARCH)
797
libdir = lib/$(DEB_TARGET_MULTIARCH)
802
configured_libdir = lib
804
hppa64libexecdir= $(PF)/lib
806
# /usr/libexec doesn't follow the FHS
807
ifeq ($(single_package),yes)
809
libexecdir = $(PF)/libexec
810
versiondir = $(GCC_VERSION)
812
libexecdir = $(PF)/$(configured_libdir)
813
versiondir = $(BASE_VERSION)
815
buildlibdir = $(builddir)/$(TARGET_ALIAS)
817
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
818
gcc_subdir_name = gcc
819
ifneq ($(single_package),yes)
820
ifeq ($(DEB_CROSS),yes)
821
ifneq ($(with_deps_on_target_arch_pkgs),yes)
822
gcc_subdir_name = gcc-cross
827
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
828
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
831
ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
834
lib32 = $(PF)/$(lib32loc)
839
p_l= $(1)$(cross_lib_arch)
840
p_d= $(1)-dbg$(cross_lib_arch)
844
ifeq ($(DEB_CROSS),yes)
845
ifneq ($(with_deps_on_target_arch_pkgs),yes)
848
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
849
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
850
usr_lib = $(PFL)/lib/sh4-linux-gnu/
853
usr_lib = $(PFL)/$(libdir)
856
usr_lib = $(PFL)/$(libdir)
858
usr_lib32 = $(PFL)/$(lib32loc)
859
usr_libn32 = $(PFL)/lib32
860
usr_libx32 = $(PFL)/libx32
861
usr_lib64 = $(PFL)/lib64
862
# FIXME: Move to the new location for native builds too
863
ifeq ($(DEB_CROSS),yes)
864
usr_libhf = $(PFL)/libhf
865
usr_libsf = $(PFL)/libsf
867
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
868
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
871
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
872
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
873
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
874
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
875
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
876
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
878
libgcc_dir = $(RPF)/$(libdir)
879
# yes, really; lib32gcc_s ends up in usr
880
libgcc_dir32 = $(PFL)/$(lib32loc)
881
libgcc_dirn32 = $(RPF)/lib32
882
# libx32gcc_s also ends up in usr
883
libgcc_dirx32 = $(PFL)/libx32
884
libgcc_dir64 = $(RPF)/lib64
885
# FIXME: Move to the new location for native builds too
886
ifeq ($(DEB_CROSS),yes)
887
libgcc_dirhf = $(RPF)/libhf
888
libgcc_dirsf = $(RPF)/libsf
890
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
891
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
894
# install_gcc_lib(lib,soname,flavour,package)
895
define install_gcc_lib
896
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
897
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
899
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
903
checkdirs = $(builddir)
904
ifeq ($(with_separate_libgcj),yes)
905
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
906
ifneq ($(with_standalone_gcj),yes)
907
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
911
ifeq ($(with_separate_go),yes)
912
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
913
checkdirs = $(buildlibdir)/libgo
916
ifeq ($(with_separate_gnat),yes)
917
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
918
checkdirs = $(builddir)/gcc
922
ifneq ($(DEB_CROSS),yes)
923
ifneq ($(single_package),yes)
924
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
926
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
929
ifeq ($(with_deps_on_target_arch_pkgs),yes)
930
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
932
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
936
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
937
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
938
export MULTIARCH_DIRNAME
942
configure: $(configure_dependencies)
944
$(configure_dummy_stamp):
945
touch $(configure_dummy_stamp)
949
: # give information about the build process
950
@echo "------------------------ Build process variables ------------------------"
951
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
952
@echo "Package source: $(PKGSOURCE)"
953
@echo "GCC version: $(GCC_VERSION)"
954
@echo "Base Debian version: $(BASE_VERSION)"
955
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
956
ifeq ($(DEB_CROSS),yes)
957
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
959
@echo "Using shell $(SHELL)"
960
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
961
@echo "CPPFLAGS: $(CPPFLAGS)"
962
@echo "CFLAGS: $(CFLAGS)"
963
@echo "LDFLAGS: $(LDFLAGS)"
964
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
965
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
966
@echo "Install prefix: /$(PF)"
967
ifeq ($(biarchn32)-$(biarch64),yes-yes)
968
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
969
else ifeq ($(biarchn32)-$(biarch32),yes-yes)
970
@echo "Will build the triarch compilers (o32/n32/64, defaulting to 64)"
971
else ifeq ($(biarch64)-$(biarch32),yes-yes)
972
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
973
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
974
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
975
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
976
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
978
ifeq ($(biarch64),yes)
979
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
981
ifeq ($(biarch32),yes)
982
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
984
@echo "Will not build the biarch compilers"
989
ifeq ($(with_cxx),yes)
990
@echo "Will build the C++ compiler"
992
@echo "Will not build the C++ compiler: $(with_cxx)"
994
ifeq ($(with_objc),yes)
995
@echo "Will build the ObjC compiler."
996
ifeq ($(with_objc_gc),yes)
997
@echo "Will build the extra ObjC runtime for garbage collection."
999
@echo "Will not build the extra ObjC runtime for garbage collection."
1002
@echo "Will not build the ObjC compiler: $(with_objc)"
1004
ifeq ($(with_objcxx),yes)
1005
@echo "Will build the Obj-C++ compiler"
1007
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
1009
ifeq ($(with_fortran),yes)
1010
@echo "Will build the Fortran 95 compiler."
1012
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
1014
ifeq ($(with_java),yes)
1015
@echo "Will build the Java compiler."
1017
@echo "Will not build the Java compiler: $(with_java)"
1019
ifeq ($(with_ada),yes)
1020
@echo "Will build the Ada compiler."
1021
ifeq ($(with_libgnat),yes)
1022
@echo "Will build the shared Ada libraries."
1024
@echo "Will not build the shared Ada libraries."
1027
@echo "Will not build the Ada compiler: $(with_ada)"
1029
ifeq ($(with_go),yes)
1030
@echo "Will build the Go compiler."
1032
@echo "Will not build the Go compiler: $(with_go)"
1034
ifeq ($(with_d),yes)
1035
@echo "Will build the D compiler"
1036
ifeq ($(with_libphobos),yes)
1037
@echo "Will build the phobos D runtime library."
1039
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
1042
@echo "Will not build the D compiler: $(with_d)"
1044
ifeq ($(with_ssp),yes)
1045
@echo "Will build with SSP support."
1047
@echo "Will build without SSP support: $(with_ssp)"
1049
ifeq ($(with_check),yes)
1050
@echo "Will run the testsuite."
1052
@echo "Will not run the testsuite: $(with_check)"
1054
ifeq ($(with_nls),yes)
1055
@echo "Will enable national language support."
1057
@echo "Will disable national language support: $(with_nls)"
1059
@echo "-----------------------------------------------------------------------------"
1061
ifeq ($(with_check),yes)
1062
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
1065
echo "expect is failing on your system with the above error, which means the GCC"; \
1066
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
1067
echo "-----------------------------------------------------------------------------"; \
1071
rm -f $(configure_stamp) $(build_stamp)
1072
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1082
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1083
../src/configure $(subst ___, ,$(CONFARGS))
1085
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1086
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1087
mkdir -p $(builddir)/sys-include; \
1088
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1091
touch $(configure_stamp)
1093
build: $(build_dependencies)
1095
$(build_dummy_stamp):
1096
touch $(build_dummy_stamp)
1098
$(build_locale_stamp):
1099
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1100
: # build locales needed by libstdc++ testsuite
1103
- sh debian/locale-gen
1105
touch $(build_locale_stamp)
1108
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1110
rm -f bootstrap-protocol
1111
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1113
ifeq ($(DEB_CROSS),yes)
1114
: # build cross compiler for $(TARGET_ALIAS)
1119
$(MAKE) -C $(builddir) $(NJOBS) \
1122
$(LDFLAGS_TO_PASS) \
1124
echo $$? > status; \
1125
) 2>&1 | tee bootstrap-protocol
1126
s=`cat status`; rm -f status; test $$s -eq 0
1128
# REVERSE_CROSS build
1129
ifeq ($(REVERSE_CROSS),yes)
1130
: # build cross compiler for $(TARGET_ALIAS)
1135
$(MAKE) -C $(builddir) $(NJOBS) \
1138
$(LDFLAGS_TO_PASS) \
1140
echo $$? > status; \
1141
) 2>&1 | tee bootstrap-protocol
1142
s=`cat status`; rm -f status; test $$s -eq 0
1145
ifeq ($(with_java),yes)
1147
ln -sf /usr/bin/fastjar bin/jar
1148
ifeq ($(with_native_ecj),yes)
1149
: # prepare the standalone ecj jar
1150
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1151
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1153
ifeq ($(with_java_maintainer_mode),yes)
1156
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1159
: # If we don't have gjavah in PATH, try to build it with the old gij
1161
if [ -x /usr/bin/gjavah-4.8 ]; then \
1162
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1163
elif [ -x bin/gjavah ]; then \
1166
mkdir -p $(builddir)/java_hacks; \
1167
cd $(builddir)/java_hacks; \
1168
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1169
mkdir -p gnu/classpath/tools; \
1170
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1171
gnu/classpath/tools/; \
1172
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1173
gnu/classpath/tools/common; \
1175
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1177
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1178
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1179
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1182
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1183
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1184
) > $(PWD)/bin/gjavah; \
1185
chmod +x $(PWD)/bin/gjavah; \
1189
: # build native compiler
1195
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1198
$(STAGE1_CFLAGS_TO_PASS) \
1199
$(LDFLAGS_TO_PASS) \
1201
echo $$? > status; \
1202
) 2>&1 | tee bootstrap-protocol
1203
s=`cat status`; rm -f status; test $$s -eq 0
1206
-chmod 755 $(srcdir)/contrib/warn_summary
1207
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1208
rm -f bootstrap-summary; \
1209
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1210
> bootstrap-summary; \
1213
touch $(build_stamp)
1215
ifeq ($(versioned_packages),yes)
1216
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1219
ifeq ($(DEB_CROSS),yes)
1220
CC_for_hppa64_cross = $(CC)
1222
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1225
$(configure_hppa64_stamp): $(build_stamp)
1227
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1228
rm -rf $(builddir_hppa64)
1229
mkdir $(builddir_hppa64)
1231
cd $(builddir_hppa64) && \
1234
CC="$(CC_for_hppa64_cross)" \
1236
--enable-languages=c \
1238
--libexecdir=/$(hppa64libexecdir) \
1242
--disable-libatomic \
1245
--disable-libmudflap \
1247
--disable-libquadmath \
1249
--with-system-zlib \
1250
--with-as=/usr/bin/hppa64-linux-gnu-as \
1251
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1252
--includedir=/usr/hppa64-linux-gnu/include \
1253
--build=$(DEB_BUILD_GNU_TYPE) \
1254
--host=$(DEB_HOST_GNU_TYPE) \
1255
--target=hppa64-linux-gnu
1256
touch $(configure_hppa64_stamp)
1258
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1262
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1263
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1264
CC="$(CC_for_hppa64_cross)" \
1267
touch $(build_hppa64_stamp)
1269
$(configure_neon_stamp): $(build_stamp)
1271
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1272
rm -rf $(builddir_neon)
1273
mkdir $(builddir_neon)
1275
cd $(builddir_neon) && \
1278
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1280
--disable-bootstrap \
1281
--enable-languages=c,c++,objc,fortran \
1283
--libexecdir=/$(libexecdir) \
1284
--program-suffix=-$(BASE_VERSION) \
1287
--disable-libmudflap \
1288
--with-arch=armv7-a --with-tune=cortex-a8 \
1289
--with-float=$(float_abi) --with-fpu=neon \
1290
--host=arm-linux-gnueabi \
1291
--build=arm-linux-gnueabi \
1292
--target=arm-linux-gnueabi
1293
touch $(configure_neon_stamp)
1295
$(build_neon_stamp): $(configure_neon_stamp)
1299
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1300
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1303
touch $(build_neon_stamp)
1307
$(srcdir)/gcc/doc/cpp.texi \
1308
$(srcdir)/gcc/doc/cppinternals.texi \
1309
$(srcdir)/gcc/doc/gcc.texi \
1310
$(srcdir)/gcc/doc/gccint.texi
1311
ifeq ($(with_fortran),yes)
1312
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1314
ifeq ($(with_java),yes)
1315
MANUALS += $(srcdir)/gcc/java/gcj.texi
1317
ifeq ($(with_ada),yes)
1319
$(builddir)/gcc/doc/gnat_ugn.texi \
1320
$(srcdir)/gcc/ada/gnat_rm.texi \
1321
$(srcdir)/gcc/ada/gnat-style.texi
1323
ifeq ($(with_gomp),yes)
1324
MANUALS += $(srcdir)/libgomp/libgomp.texi
1326
ifeq ($(with_itm),yes)
1327
MANUALS += $(srcdir)/libitm/libitm.texi
1329
ifeq ($(with_qmath),yes)
1330
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1332
ifeq ($(with_go),yes)
1333
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1336
html-docs: $(build_html_stamp)
1337
#$(build_html_stamp): html-texi2html
1338
#$(build_html_stamp): html-makeinfo
1339
$(build_html_stamp): html-makeinfo-nosplit
1342
rm -rf html $(builddir)/gcc/html
1343
mkdir $(builddir)/gcc/html
1344
ln -s $(builddir)/gcc/html html
1345
cd $(builddir)/gcc; \
1346
for manual in $(MANUALS); do \
1347
outname=`basename $${manual} .texi`; \
1348
echo "generating $$outname ..."; \
1349
texi2html -number -split chapter \
1350
-I $(srcdir)/gcc/doc/include \
1351
-I $(srcdir)/gcc/p/doc \
1352
-I $(srcdir)/gcc/p/doc/generated \
1353
-I `dirname $${manual}` \
1354
-I $(builddir)/gcc \
1355
-I $(buildlibdir)/libquadmath \
1363
cd $(builddir)/gcc; \
1364
for manual in $(MANUALS); do \
1365
manual=`find $(srcdir) -name $${file}.texi`; \
1366
outname=`basename $${manual} .texi`; \
1367
echo "generating $$outname ..."; \
1368
if [ "$${manual}" ]; then \
1369
makeinfo --html --number-sections \
1370
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1371
-I $(srcdir)/gcc/p/doc \
1372
-I $(srcdir)/gcc/p/doc/generated \
1373
-I $(builddir)/gcc \
1374
-I $(buildlibdir)/libquadmath \
1380
html-makeinfo-nosplit:
1383
cd $(builddir)/gcc; \
1384
for manual in $(MANUALS); do \
1385
outname=`basename $${manual} .texi`.html; \
1386
echo "generating $$outname ..."; \
1387
makeinfo --html --number-sections --no-split \
1388
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1389
-I $(srcdir)/gcc/p/doc \
1390
-I $(srcdir)/gcc/p/doc/generated \
1391
-I $(builddir)/gcc \
1392
-I $(buildlibdir)/libquadmath \
1393
-o $(PWD)/html/$${outname} \
1397
# start the script only on architectures known to have slow autobuilders ...
1398
logwatch_archs := alpha arm m68k mips mipsel sparc
1399
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1400
start_logwatch = yes
1402
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1403
start_logwatch = yes
1406
stamps/mauve-build: stamps/build
1409
ifeq ($(with_mauve_check),yes)
1410
tar xf $(wildcard /usr/src/mauve*.tar.*)
1415
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1416
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1420
stamps/mauve-check: stamps/build stamps/mauve-build
1421
ifeq ($(with_mauve_check),yes)
1423
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1424
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1425
xvfb-run -s "-extension GLX" java Harness \
1426
-vm $(CURDIR)/$(sdkimg)/bin/java \
1427
-file $(CURDIR)/debian/mauve_tests \
1428
-timeout 30000 2>&1 \
1432
echo "mauve testsuite not run for this build" > mauve/mauve_output
1436
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1437
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1439
rm -f $(builddir)/runcheck*
1441
-chmod 755 $(srcdir)/contrib/test_summary
1443
: # needed for the plugin tests to succeed
1444
ln -sf gcc $(builddir)/prev-gcc
1445
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1448
ifneq ($(with_common_libs),yes)
1449
ifeq ($(with_cxx),yes)
1450
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1452
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1453
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1456
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1457
echo "Running testsuite in $$d ..."; \
1462
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1464
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1465
done 2>&1 | tee test-protocol2
1467
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1468
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1470
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1471
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1472
) > libstdc++-test-summary
1473
echo 'BEGIN installed libstdc++-v3 test-summary'
1474
cat libstdc++-test-summary
1475
echo 'END installed libstdc++-v3 test-summary'
1476
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1482
ifeq ($(start_logwatch),yes)
1483
: # start logwatch script for regular output during test runs
1484
chmod +x debian/logwatch.sh
1485
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1486
-m '\ntestsuite still running ...\n' \
1488
$(builddir)/gcc/testsuite/gcc/gcc.log \
1489
$(builddir)/gcc/testsuite/g++/g++.log \
1490
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1491
$(builddir)/gcc/testsuite/objc/objc.log \
1492
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1493
$(builddir)/gcc/testsuite/gnat/gnat.log \
1494
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1495
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1496
$(builddir)/gcc/p/test/test_log \
1497
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1498
$(buildlibdir)/libjava/testsuite/libjava.log \
1499
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1500
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1501
$(buildlibdir)/libffi/testsuite/libffi.log \
1505
ifeq ($(with_ada),yes)
1506
chmod +x debian/acats-killer.sh
1507
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1508
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1509
$(builddir)/gcc/testsuite/g++.log \
1515
for d in $(checkdirs); do \
1516
echo "Running testsuite in $$d ..."; \
1520
EXTRA_TEST_PFLAGS=-g0 \
1521
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1523
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1524
done 2>&1 | tee test-protocol
1526
-ps aux | fgrep logwatch | fgrep -v fgrep
1527
-if [ -f $(builddir)/logwatch.pid ]; then \
1528
kill -1 `cat $(builddir)/logwatch.pid`; \
1530
kill -9 `cat $(builddir)/logwatch.pid`; \
1531
rm -f $(builddir)/logwatch.pid; \
1533
-ps aux | fgrep logwatch | fgrep -v fgrep
1535
ifeq ($(with_ada),yes)
1536
-if [ -f $(builddir)/acats-killer.pid ]; then \
1537
kill -1 `cat $(builddir)/acats-killer.pid`; \
1539
kill -9 `cat $(builddir)/acats-killer.pid`; \
1540
rm -f $(builddir)/acats-killer.pid; \
1544
: # running the libjava testsuite alone is missing this information
1545
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1547
if [ -x $(srcdir)/contrib/test_summary ]; then \
1548
rm -f test-summary; \
1551
echo '' > ts-include; \
1552
echo '' >> ts-include; \
1553
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1554
echo 'Bootstrap comparison failure:' >> ts-include; \
1555
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1556
echo '' >> ts-include; \
1557
echo '' >> ts-include; \
1559
echo "Build Dependencies:" >> ts-include; \
1560
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1561
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1562
| fgrep -v '<none>' >> ts-include; \
1563
echo '' >> ts-include; \
1564
cat ../$(patch_stamp) >> ts-include; \
1565
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1566
$(srcdir)/contrib/test_summary \
1567
-i ts-include -m "$(S_EMAIL)" \
1568
) > raw-test-summary; \
1569
if [ -n "$(testsuite_tarball)" ]; then \
1570
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1571
echo " Do not interpret the results on its own" >> test-summary; \
1572
echo " but compare them with the results from" >> test-summary; \
1573
echo " the gcc-snapshot package." >> test-summary; \
1575
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1577
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1578
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1579
echo '' >> test-summary; \
1580
cat bootstrap-summary >> test-summary; \
1582
echo 'BEGIN test-summary'; \
1584
echo 'END test-summary'; \
1586
ifeq ($(with_d),yes)
1587
: # the D test failures for the non-default multilibs are known, ignore them
1588
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1589
mv -f test-summary.tmp test-summary
1592
touch $(check_stamp)
1594
$(check_inst_stamp): $(check_stamp)
1595
rm -f test-inst-protocol
1597
ifeq ($(start_logwatch),yes)
1598
: # start logwatch script for regular output during test runs
1599
chmod +x debian/logwatch.sh
1600
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1601
-m '\ntestsuite (3.3) still running ...\n' \
1602
test-inst-protocol \
1603
check-inst/{gcc,g++,g77,objc}.log \
1610
echo "Running testsuite ..."
1614
EXTRA_TEST_PFLAGS=-g0 \
1615
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1616
cd check-inst && $(srcdir)/contrib/test_installed \
1617
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1618
2>&1 | tee test-inst-protocol
1620
-ps aux | fgrep logwatch | fgrep -v fgrep
1621
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1622
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1626
-ps aux | fgrep logwatch | fgrep -v fgrep
1628
-chmod 755 $(srcdir)/contrib/test_summary
1629
if [ -x $(srcdir)/contrib/test_summary ]; then \
1630
rm -f test-inst-summary; \
1633
echo '' > ts-include; \
1634
echo '' >> ts-include; \
1635
echo "Build Dependencies:" >> ts-include; \
1636
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1637
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1638
| fgrep -v '<none>' >> ts-include; \
1639
echo '' >> ts-include; \
1640
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1641
$(srcdir)/contrib/test_summary \
1642
-i ts-include -m "$(S_EMAIL)" \
1643
) > raw-test-inst-summary; \
1644
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1645
>> test-inst-summary; \
1646
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1647
| grep -v EOF >> test-inst-summary; \
1648
echo 'BEGIN test-installed-summary'; \
1649
cat test-inst-summary; \
1650
echo 'END test-installed-summary'; \
1653
chmod 755 debian/reduce-test-diff.awk
1654
if diff -u test-inst-summary test-summary \
1655
| debian/reduce-test-diff.awk > diff-summary; \
1657
mv -f diff-summary testsuite-comparision; \
1660
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1663
) > testsuite-comparision; \
1664
rm -f diff-summary; \
1666
touch $(check_inst_stamp)
1668
clean: debian/control
1671
rm -f *-summary *-protocol testsuite-comparision summary-diff
1672
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1673
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1675
rm -f $(srcdir)/gcc/po/*.gmo
1676
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1677
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1679
[ -f $$f ] || continue; \
1681
| 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$$//'); \
1684
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1685
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1686
rm -f debian/shlibs.local debian/substvars.local
1687
rm -f debian/*.debhelper
1688
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1689
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1690
rm -f debian/lib*gcj-bc.shlibs
1691
rm -rf bin locales share
1695
$(cross_clean) dh_clean
1697
# -----------------------------------------------------------------------------
1698
# some abbrevations for the package names and directories;
1699
# p_XXX is the package name, d_XXX is the package directory
1700
# these macros are only used in the binary-* targets.
1702
ifeq ($(versioned_packages),yes)
1703
pkg_ver := -$(BASE_VERSION)
1706
ifneq ($(DEB_CROSS),yes)
1707
p_base = gcc$(pkg_ver)-base
1708
p_xbase = gcc$(pkg_ver)-base
1709
p_gcc = gcc$(pkg_ver)
1710
p_cpp = cpp$(pkg_ver)
1711
p_cppd = cpp$(pkg_ver)-doc
1712
p_cxx = g++$(pkg_ver)
1713
p_doc = gcc$(pkg_ver)-doc
1714
p_lgcc = libgcc$(GCC_SONAME)
1716
# only triggered if DEB_CROSS set
1717
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1718
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1719
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1721
p_base = gcc$(pkg_ver)-base
1724
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1725
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1726
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1728
p_hppa64 = gcc$(pkg_ver)-hppa64
1731
d_base = debian/$(p_base)
1732
d_xbase = debian/$(p_xbase)
1733
d_gcc = debian/$(p_gcc)
1734
d_cpp = debian/$(p_cpp)
1735
d_cppd = debian/$(p_cppd)
1736
d_cxx = debian/$(p_cxx)
1737
d_doc = debian/$(p_doc)
1738
d_lgcc = debian/$(p_lgcc)
1739
d_hppa64= debian/$(p_hppa64)
1741
d_neon = debian/tmp-neon
1743
common_substvars = \
1744
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1746
ifeq ($(DEB_CROSS),yes)
1747
lib_binaries := indep_binaries
1749
lib_binaries := arch_binaries
1752
# ---------------------------------------------------------------------------
1754
ifeq ($(single_package),yes)
1755
include debian/rules.d/binary-snapshot.mk
1758
ifneq ($(DEB_CROSS),yes)
1759
ifeq ($(with_source),yes)
1760
include debian/rules.d/binary-source.mk
1764
ifneq ($(BACKPORT),true)
1765
ifeq ($(with_gccxbase),yes)
1766
include debian/rules.d/binary-base.mk
1769
ifeq ($(with_gccbase),yes)
1770
include debian/rules.d/binary-base.mk
1773
# always include to get some definitions
1774
include debian/rules.d/binary-libgcc.mk
1776
ifeq ($(with_libqmath),yes)
1777
include debian/rules.d/binary-libquadmath.mk
1780
ifeq ($(with_libgmath),yes)
1781
include debian/rules.d/binary-libgccmath.mk
1784
ifeq ($(with_libgomp),yes)
1785
include debian/rules.d/binary-libgomp.mk
1788
ifeq ($(with_libitm),yes)
1789
include debian/rules.d/binary-libitm.mk
1792
ifeq ($(with_libatomic),yes)
1793
include debian/rules.d/binary-libatomic.mk
1796
ifeq ($(with_libbacktrace),yes)
1797
include debian/rules.d/binary-libbacktrace.mk
1800
ifeq ($(with_cdev),yes)
1801
include debian/rules.d/binary-cpp.mk
1804
ifeq ($(with_fixincl),yes)
1805
include debian/rules.d/binary-fixincl.mk
1808
ifeq ($(with_libssp),yes)
1809
include debian/rules.d/binary-libssp.mk
1812
ifeq ($(with_objcxx),yes)
1813
include debian/rules.d/binary-objcxx.mk
1816
ifeq ($(with_objc),yes)
1817
include debian/rules.d/binary-objc.mk
1818
include debian/rules.d/binary-libobjc.mk
1821
ifeq ($(with_go),yes)
1822
include debian/rules.d/binary-go.mk
1825
# include before cxx
1826
ifeq ($(with_java),yes)
1827
include debian/rules.d/binary-java.mk
1830
ifeq ($(with_cxxdev),yes)
1831
include debian/rules.d/binary-cxx.mk
1833
ifeq ($(with_cxx),yes)
1834
include debian/rules.d/binary-libstdcxx.mk
1837
ifeq ($(with_libasan),yes)
1838
include debian/rules.d/binary-libasan.mk
1841
ifeq ($(with_libtsan),yes)
1842
include debian/rules.d/binary-libtsan.mk
1845
ifeq ($(with_f77),yes)
1846
include debian/rules.d/binary-f77.mk
1849
ifeq ($(with_fortran),yes)
1850
include debian/rules.d/binary-fortran.mk
1853
ifeq ($(with_ada),yes)
1854
include debian/rules.d/binary-ada.mk
1857
ifeq ($(with_d),yes)
1858
include debian/rules.d/binary-d.mk
1861
ifeq ($(with_libnof),yes)
1862
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1863
include debian/rules.d/binary-nof.mk
1867
ifeq ($(with_softfloat),yes)
1868
include debian/rules.d/binary-softfloat.mk
1871
# gcc must be moved/built after g77 and g++
1872
ifeq ($(with_cdev),yes)
1873
include debian/rules.d/binary-gcc.mk
1876
ifeq ($(with_hppa64),yes)
1877
include debian/rules.d/binary-hppa64.mk
1880
ifeq ($(with_neon),yes)
1881
include debian/rules.d/binary-neon.mk
1886
endif # ($(single_package),yes)
1888
# ----------------------------------------------------------------------
1889
install: $(install_dependencies)
1891
$(install_dummy_stamp): $(build_dummy_stamp)
1892
touch $(install_dummy_stamp)
1894
$(install_snap_stamp): $(build_dependencies)
1899
: # Install directories
1903
ifeq ($(with_hppa64),yes)
1906
$(MAKE) -C $(builddir_hppa64) \
1909
$(LDFLAGS_TO_PASS) \
1910
DESTDIR=$(PWD)/$(d) \
1913
ls -l $(d)/$(PF)/bin
1914
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1915
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1917
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1920
for i in ar nm ranlib; do \
1921
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1924
: # remove files not needed from the hppa64 build
1925
rm -rf $(d)/$(PF)/share/info
1926
rm -rf $(d)/$(PF)/share/man
1927
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1928
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1930
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1931
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1933
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1936
README|features.h|syslimits.h|limits.h) ;; \
1937
linux|$(TARGET_ALIAS)) ;; \
1938
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1939
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1944
: # Work around PR lto/41569
1945
ln -sf gcc $(builddir)/prev-gcc
1946
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1948
: # Install everything
1951
$(MAKE) -C $(builddir) \
1953
$(LDFLAGS_TO_PASS) \
1954
DESTDIR=$(PWD)/$(d) \
1955
infodir=/$(PF)/share/info \
1956
mandir=/$(PF)/share/man \
1959
ls -l $(d)/$(PF)/bin
1960
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1961
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1963
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1966
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1969
README|features.h|syslimits.h|limits.h) ;; \
1970
linux|$(TARGET_ALIAS)) ;; \
1971
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1972
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1976
ifneq ($(configured_libdir),$(libdir))
1977
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1978
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1979
$(d)/$(PF)/$(libdir)/. || true; \
1980
mv $(d)/$(PF)/libo32/$$i \
1981
$(d)/$(PF)/lib/. || true; \
1985
# FIXME: libjava/classpath not correctly patched
1986
ifeq ($(with_java),yes)
1987
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1988
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1989
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1990
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1991
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1994
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1996
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1997
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1998
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1999
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
2000
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
2001
$(srcdir)/libjava/libgcj_bc.c \
2002
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
2003
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
2007
if [ -d $(d)/usr/man/man1 ]; then \
2008
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
2011
chmod 755 debian/dh_*
2012
touch $(install_snap_stamp)
2014
$(install_stamp): $(build_stamp)
2017
dh_clean -k -N$(p_hppa64)
2019
if [ -f $(binary_stamp)-hppa64 ]; then \
2020
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
2022
rm -f $(binary_stamp)*
2023
if [ -f saved-stamp-hppa64 ]; then \
2024
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
2027
: # Install directories
2029
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
2030
ifeq ($(biarch32),yes)
2031
mkdir -p $(d)/$(PF)/$(lib32loc)/debug
2033
ifeq ($(biarch64),yes)
2034
mkdir -p $(d)/$(PF)/lib64/debug
2036
ifeq ($(biarchn32),yes)
2037
mkdir -p $(d)/$(PF)/$(libn32)/debug
2039
ifeq ($(biarchx32),yes)
2040
mkdir -p $(d)/$(PF)/libx32/debug
2043
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
2044
ifneq ($(DEB_TARGET_ARCH),x32)
2045
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
2046
: # (this works when CONFARGS contains '--disable-multilib')
2047
ln -s $(configured_libdir) $(d)/lib64
2048
mkdir -p $(d)/$(PF)/$(configured_libdir)
2049
ln -s $(configured_libdir) $(d)/$(PF)/lib64
2052
ifeq ($(DEB_TARGET_ARCH),x32)
2053
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
2054
ln -s $(configured_libdir) $(d)/libx32
2055
mkdir -p $(d)/$(PF)/$(configured_libdir)
2056
ln -s $(configured_libdir) $(d)/$(PF)/libx32
2059
: # Work around PR lto/41569
2060
ln -sf gcc $(builddir)/prev-gcc
2062
: # Install everything
2065
$(MAKE) -C $(builddir) \
2067
$(LDFLAGS_TO_PASS) \
2068
DESTDIR=$(PWD)/$(d) \
2069
infodir=/$(PF)/share/info \
2070
mandir=/$(PF)/share/man \
2073
ifneq ($(configured_libdir),$(libdir))
2074
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
2075
mv $(d)/$(PF)/$(configured_libdir)/$$i \
2076
$(d)/$(PF)/$(libdir)/. || true; \
2077
mv $(d)/$(PF)/libo32/$$i \
2078
$(d)/$(PF)/lib/. || true; \
2082
ifeq ($(with_libcxxdbg),yes)
2083
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2084
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2085
[ -f $$i ] || continue; \
2086
d=$$(dirname $$i); \
2087
b=$$(basename $$i); \
2088
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2093
# FIXME: libjava/classpath not correctly patched
2094
ifeq ($(with_java),yes)
2095
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2096
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2097
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2098
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2099
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2103
: # remove rpath settings from binaries and shared libs
2104
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2105
$(if $(filter $(with_multiarch_lib),yes), \
2106
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2107
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2108
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2110
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2111
[ -h $$i ] && continue; \
2112
chrpath --delete $$i; \
2113
echo "removed RPATH: $$i"; \
2116
: # remove '*.la' and '*.lai' files, not shipped in any package.
2117
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2119
ifneq ($(with_libgnat),yes)
2120
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2123
ifeq ($(GFDL_INVARIANT_FREE),yes)
2124
for i in gcc gcov; do \
2125
I=`echo $$i | tr a-z A-Z`; \
2126
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2127
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2130
ifeq ($(with_fortran),yes)
2132
I=`echo $$i | tr a-z A-Z`; \
2133
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2134
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2137
ifeq ($(with_java),yes)
2138
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2140
I=`echo $$i | tr a-z A-Z`; \
2141
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2142
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2147
# ifeq ($(with_ada),yes)
2148
# : # rename files (versioned ada binaries)
2150
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2151
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2152
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2154
# for i in $(GNAT_TOOLS); do \
2155
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2159
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2160
ifneq ($(DEB_STAGE),stage1)
2161
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2162
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2163
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2164
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2166
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2167
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2168
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2169
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2174
for i in ar nm ranlib; do \
2175
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2178
chmod 755 debian/dh_*
2180
# tar cf tmp.tar debian/tmp
2182
touch $(install_stamp)
2184
$(install_hppa64_stamp): $(build_hppa64_stamp)
2188
mkdir -p $(d_hppa64)/$(PF)
2191
$(MAKE) -C $(builddir_hppa64) \
2194
$(LDFLAGS_TO_PASS) \
2195
DESTDIR=$(PWD)/$(d_hppa64) \
2198
ifeq ($(versioned_packages),yes)
2199
for i in cpp gcc-ar gcc-nm gcc-ranlib; do \
2200
mv -f $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i \
2201
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i$(pkg_ver); \
2205
ifneq ($(single_package),yes)
2206
: # remove files not needed
2207
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2208
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2209
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2210
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2211
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2213
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2214
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2215
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2218
touch $(install_hppa64_stamp)
2220
$(install_neon_stamp): $(build_neon_stamp)
2224
mkdir -p $(d_neon)/$(PF)
2227
$(MAKE) -C $(builddir_neon) \
2230
$(LDFLAGS_TO_PASS) \
2231
DESTDIR=$(PWD)/$(d_neon) \
2233
touch $(install_neon_stamp)
2235
# ----------------------------------------------------------------------
2236
# Build architecture-dependent files here.
2237
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2238
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2239
ifeq ($(with_check),yes)
2241
# : # Send Email about sucessfull build.
2242
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2245
# ----------------------------------------------------------------------
2246
# Build architecture-independent files here.
2247
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2248
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2251
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2253
binary: binary-indep binary-arch
2254
.PHONY: build clean binary-indep binary-arch binary