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
CONFARGS += --with-cpu=sh4 --with-multilib-list=m4,m4-nofpu
474
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
475
CONFARGS += --disable-multilib
478
ifeq ($(DEB_TARGET_ARCH_OS),linux)
479
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc powerpcspe ppc64 ppc64el s390 s390x sparc sparc64))
480
CONFARGS += --with-long-double-128
484
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
485
ifneq (,$(filter $(derivative),Ubuntu))
486
ifneq (,$(filter $(distrelease),dapper hardy))
487
CONFARGS += --with-arch-32=i486
488
else ifneq (,$(filter $(distrelease),jaunty karmic lucid))
489
CONFARGS += --with-arch-32=i586
491
CONFARGS += --with-arch-32=i686
494
ifneq (,$(filter $(distrelease),etch lenny))
495
CONFARGS += --with-arch-32=i486
497
CONFARGS += --with-arch-32=i586
502
ifeq ($(DEB_TARGET_ARCH),amd64)
503
CONFARGS += --with-abi=m64
505
ifeq ($(DEB_TARGET_ARCH),x32)
506
CONFARGS += --with-abi=mx32
508
ifeq ($(multilib),yes)
509
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
510
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
511
else ifeq ($(DEB_TARGET_ARCH),x32)
512
CONFARGS += --with-multilib-list=mx32,m64,m32
516
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
517
CONFARGS += --with-arch=i586
520
ifeq ($(DEB_TARGET_ARCH),lpia)
521
CONFARGS += --with-arch=pentium-m --with-tune=i586
524
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
525
CONFARGS += --with-tune=generic
528
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
529
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
530
ifeq ($(multilib),yes)
531
ifeq ($(biarchn32)-$(biarch64),yes-yes)
532
CONFARGS += --enable-targets=all
533
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
538
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
539
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
540
ifeq ($(multilib),yes)
541
ifeq ($(biarchn32)-$(biarch64),yes-yes)
542
CONFARGS += --enable-targets=all
543
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
548
#FIXME: howto for mipsn32?
549
ifneq (,$(findstring mips64el-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
550
CONFARGS += --with-mips-plt
551
ifeq ($(multilib),yes)
552
ifeq ($(biarchn32)-$(biarch32),yes-yes)
553
CONFARGS += --enable-targets=all
554
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=loongson3a
555
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
560
ifneq (,$(findstring mips64-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
561
CONFARGS += --with-mips-plt
562
ifeq ($(multilib),yes)
563
ifeq ($(biarchn32)-$(biarch32),yes-yes)
564
CONFARGS += --enable-targets=all
565
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
566
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
571
ifneq (,$(findstring mips64el-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
572
CONFARGS += --with-mips-plt
573
CONFARGS += --with-arch-64=mips64 --with-tune-64=mips64r2
574
ifeq ($(multilib),yes)
575
ifeq ($(biarchn32)-$(biarch32),yes-yes)
576
CONFARGS += --enable-targets=all
577
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
582
ifneq (,$(findstring mips64-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
583
CONFARGS += --with-mips-plt
584
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
585
ifeq ($(multilib),yes)
586
ifeq ($(biarchn32)-$(biarch32),yes-yes)
587
CONFARGS += --enable-targets=all
588
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
593
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
594
ifeq ($(multilib),yes)
595
ifeq ($(biarch64),yes)
596
CONFARGS += --enable-targets=all
601
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
602
CONFARGS += --disable-libstdcxx-pch
605
ifneq (,$(findstring gdc, $(PKGSOURCE)))
606
CONFARGS += --disable-libquadmath
609
ifeq ($(trunk_build),yes)
610
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
611
CONFARGS += --disable-werror
613
CONFARGS += --enable-checking=yes
615
CONFARGS += --enable-checking=release
619
--build=$(DEB_BUILD_GNU_TYPE) \
620
--host=$(DEB_HOST_GNU_TYPE) \
621
--target=$(TARGET_ALIAS)
623
ifeq ($(DEB_CROSS),yes)
625
--program-prefix=$(TARGET_ALIAS)-
626
ifneq ($(with_deps_on_target_arch_pkgs),yes)
628
--includedir=/$(PFL)/include
632
ifeq ($(with_bootstrap),off)
634
else ifeq ($(with_bootstrap),)
635
bootstrap_target = bootstrap-lean
636
# no profiledbootstrap on the following architectures
637
# - m68k: we're happy that it builds at all
638
no_profiled_bs_archs := alpha arm arm64 hppa m68k
639
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
640
bootstrap_target = profiledbootstrap
641
# FIXME: disabled for first uploads
642
bootstrap_target = bootstrap-lean
644
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
645
bootstrap_target = bootstrap-lean
647
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
648
bootstrap_target = bootstrap-lean
651
# disable profiled bootstrap on slow archs, get to testing first ...
652
ifeq ($(derivative),Debian)
653
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
654
bootstrap_target = bootstrap-lean
657
ifeq ($(derivative),Ubuntu)
658
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
659
bootstrap_target = bootstrap-lean
665
# Increase the timeout for one testrun on slow architectures
666
ifeq ($(derivative),Debian)
667
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
669
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
672
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
675
else ifeq ($(derivative),Ubuntu)
676
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
678
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
684
ifneq ($(trunk_build),yes)
685
ifeq ($(with_ssp),yes)
686
# the buildds are just slow ... don't check the non-default
687
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),sh4 mips))
689
else ifneq (,$(filter $(DEB_TARGET_ARCH),armel))
692
ifneq ($(single_package),yes)
693
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
696
ifeq ($(derivative),Ubuntu)
697
# the buildds are just slow ... don't check the non-default
698
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 sparc))
701
# FIXME Ubuntu armel buildd hangs
702
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
709
ifeq ($(derivative),Ubuntu)
710
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
711
ifeq ($(with_arm_thumb),yes)
712
#DEJAGNU_RUNS += -marm
714
DEJAGNU_RUNS += -mthumb
719
# no b-d on g++-multilib, this is run by the built compiler
720
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
721
$(shell cat build/runcheck$(1).out), \
722
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
723
ifeq ($(biarch32),yes)
724
DEJAGNU_RUNS += $(call abi_run_check,-m32)
726
ifeq ($(biarch64),yes)
727
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
729
ifeq ($(biarchn32),yes)
730
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
732
ifeq ($(biarchx32),yes)
733
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
736
# gdc is not multilib'd
737
ifneq (,$(findstring gdc, $(PKGSOURCE)))
741
ifneq (,$(findstring gcj, $(PKGSOURCE)))
746
ifneq (,$(findstring gnat, $(PKGSOURCE)))
750
ifneq (,$(strip $(value DEJAGNU_RUNS)))
751
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
754
# PF is the installation prefix for the package without the leading slash.
755
# It's "usr" for gcc releases.
757
# use value set in the environment
758
else ifeq ($(trunk_build),yes)
759
PF = usr/lib/gcc-snapshot
760
else ifeq ($(PKGSOURCE),gcc-linaro)
761
PF = usr/lib/gcc-linaro
766
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
767
ifeq ($(DEB_CROSS),yes)
768
ifneq ($(with_deps_on_target_arch_pkgs),yes)
769
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
777
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
778
ifeq ($(DEB_CROSS),yes)
779
ifneq ($(with_deps_on_target_arch_pkgs),yes)
780
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
788
ifeq ($(with_multiarch_lib),yes)
789
ifeq ($(DEB_CROSS),yes)
790
ifneq ($(with_deps_on_target_arch_pkgs),yes)
793
libdir = lib/$(DEB_TARGET_MULTIARCH)
796
libdir = lib/$(DEB_TARGET_MULTIARCH)
801
configured_libdir = lib
803
hppa64libexecdir= $(PF)/lib
805
# /usr/libexec doesn't follow the FHS
806
ifeq ($(single_package),yes)
808
libexecdir = $(PF)/libexec
809
versiondir = $(GCC_VERSION)
811
libexecdir = $(PF)/$(configured_libdir)
812
versiondir = $(BASE_VERSION)
814
buildlibdir = $(builddir)/$(TARGET_ALIAS)
816
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
817
gcc_subdir_name = gcc
818
ifneq ($(single_package),yes)
819
ifeq ($(DEB_CROSS),yes)
820
ifneq ($(with_deps_on_target_arch_pkgs),yes)
821
gcc_subdir_name = gcc-cross
826
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
827
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
830
ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
833
lib32 = $(PF)/$(lib32loc)
838
p_l= $(1)$(cross_lib_arch)
839
p_d= $(1)-dbg$(cross_lib_arch)
843
ifeq ($(DEB_CROSS),yes)
844
ifneq ($(with_deps_on_target_arch_pkgs),yes)
847
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
848
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
849
usr_lib = $(PFL)/lib/sh4-linux-gnu/
852
usr_lib = $(PFL)/$(libdir)
855
usr_lib = $(PFL)/$(libdir)
857
usr_lib32 = $(PFL)/$(lib32loc)
858
usr_libn32 = $(PFL)/lib32
859
usr_libx32 = $(PFL)/libx32
860
usr_lib64 = $(PFL)/lib64
861
# FIXME: Move to the new location for native builds too
862
ifeq ($(DEB_CROSS),yes)
863
usr_libhf = $(PFL)/libhf
864
usr_libsf = $(PFL)/libsf
866
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
867
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
870
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
871
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
872
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
873
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
874
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
875
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
877
libgcc_dir = $(RPF)/$(libdir)
878
# yes, really; lib32gcc_s ends up in usr
879
libgcc_dir32 = $(PFL)/$(lib32loc)
880
libgcc_dirn32 = $(RPF)/lib32
881
# libx32gcc_s also ends up in usr
882
libgcc_dirx32 = $(PFL)/libx32
883
libgcc_dir64 = $(RPF)/lib64
884
# FIXME: Move to the new location for native builds too
885
ifeq ($(DEB_CROSS),yes)
886
libgcc_dirhf = $(RPF)/libhf
887
libgcc_dirsf = $(RPF)/libsf
889
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
890
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
893
# install_gcc_lib(lib,soname,flavour,package)
894
define install_gcc_lib
895
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
896
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
898
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
902
checkdirs = $(builddir)
903
ifeq ($(with_separate_libgcj),yes)
904
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
905
ifneq ($(with_standalone_gcj),yes)
906
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
910
ifeq ($(with_separate_go),yes)
911
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
912
checkdirs = $(buildlibdir)/libgo
915
ifeq ($(with_separate_gnat),yes)
916
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
917
checkdirs = $(builddir)/gcc
921
ifneq ($(DEB_CROSS),yes)
922
ifneq ($(single_package),yes)
923
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
925
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
928
ifeq ($(with_deps_on_target_arch_pkgs),yes)
929
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
931
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
935
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
936
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
937
export MULTIARCH_DIRNAME
941
configure: $(configure_dependencies)
943
$(configure_dummy_stamp):
944
touch $(configure_dummy_stamp)
948
: # give information about the build process
949
@echo "------------------------ Build process variables ------------------------"
950
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
951
@echo "Package source: $(PKGSOURCE)"
952
@echo "GCC version: $(GCC_VERSION)"
953
@echo "Base Debian version: $(BASE_VERSION)"
954
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
955
ifeq ($(DEB_CROSS),yes)
956
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
958
@echo "Using shell $(SHELL)"
959
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
960
@echo "CPPFLAGS: $(CPPFLAGS)"
961
@echo "CFLAGS: $(CFLAGS)"
962
@echo "LDFLAGS: $(LDFLAGS)"
963
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
964
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
965
@echo "Install prefix: /$(PF)"
966
ifeq ($(biarchn32)-$(biarch64),yes-yes)
967
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
968
else ifeq ($(biarchn32)-$(biarch32),yes-yes)
969
@echo "Will build the triarch compilers (o32/n32/64, defaulting to 64)"
970
else ifeq ($(biarch64)-$(biarch32),yes-yes)
971
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
972
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
973
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
974
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
975
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
977
ifeq ($(biarch64),yes)
978
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
980
ifeq ($(biarch32),yes)
981
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
983
@echo "Will not build the biarch compilers"
988
ifeq ($(with_cxx),yes)
989
@echo "Will build the C++ compiler"
991
@echo "Will not build the C++ compiler: $(with_cxx)"
993
ifeq ($(with_objc),yes)
994
@echo "Will build the ObjC compiler."
995
ifeq ($(with_objc_gc),yes)
996
@echo "Will build the extra ObjC runtime for garbage collection."
998
@echo "Will not build the extra ObjC runtime for garbage collection."
1001
@echo "Will not build the ObjC compiler: $(with_objc)"
1003
ifeq ($(with_objcxx),yes)
1004
@echo "Will build the Obj-C++ compiler"
1006
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
1008
ifeq ($(with_fortran),yes)
1009
@echo "Will build the Fortran 95 compiler."
1011
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
1013
ifeq ($(with_java),yes)
1014
@echo "Will build the Java compiler."
1016
@echo "Will not build the Java compiler: $(with_java)"
1018
ifeq ($(with_ada),yes)
1019
@echo "Will build the Ada compiler."
1020
ifeq ($(with_libgnat),yes)
1021
@echo "Will build the shared Ada libraries."
1023
@echo "Will not build the shared Ada libraries."
1026
@echo "Will not build the Ada compiler: $(with_ada)"
1028
ifeq ($(with_go),yes)
1029
@echo "Will build the Go compiler."
1031
@echo "Will not build the Go compiler: $(with_go)"
1033
ifeq ($(with_d),yes)
1034
@echo "Will build the D compiler"
1035
ifeq ($(with_libphobos),yes)
1036
@echo "Will build the phobos D runtime library."
1038
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
1041
@echo "Will not build the D compiler: $(with_d)"
1043
ifeq ($(with_ssp),yes)
1044
@echo "Will build with SSP support."
1046
@echo "Will build without SSP support: $(with_ssp)"
1048
ifeq ($(with_check),yes)
1049
@echo "Will run the testsuite."
1051
@echo "Will not run the testsuite: $(with_check)"
1053
ifeq ($(with_nls),yes)
1054
@echo "Will enable national language support."
1056
@echo "Will disable national language support: $(with_nls)"
1058
@echo "-----------------------------------------------------------------------------"
1060
ifeq ($(with_check),yes)
1061
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
1064
echo "expect is failing on your system with the above error, which means the GCC"; \
1065
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
1066
echo "-----------------------------------------------------------------------------"; \
1070
rm -f $(configure_stamp) $(build_stamp)
1071
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1081
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1082
../src/configure $(subst ___, ,$(CONFARGS))
1084
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1085
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1086
mkdir -p $(builddir)/sys-include; \
1087
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1090
touch $(configure_stamp)
1092
build: $(build_dependencies)
1094
$(build_dummy_stamp):
1095
touch $(build_dummy_stamp)
1097
$(build_locale_stamp):
1098
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1099
: # build locales needed by libstdc++ testsuite
1102
- sh debian/locale-gen
1104
touch $(build_locale_stamp)
1107
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1109
rm -f bootstrap-protocol
1110
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1112
ifeq ($(DEB_CROSS),yes)
1113
: # build cross compiler for $(TARGET_ALIAS)
1118
$(MAKE) -C $(builddir) $(NJOBS) \
1121
$(LDFLAGS_TO_PASS) \
1123
echo $$? > status; \
1124
) 2>&1 | tee bootstrap-protocol
1125
s=`cat status`; rm -f status; test $$s -eq 0
1127
# REVERSE_CROSS build
1128
ifeq ($(REVERSE_CROSS),yes)
1129
: # build cross compiler for $(TARGET_ALIAS)
1134
$(MAKE) -C $(builddir) $(NJOBS) \
1137
$(LDFLAGS_TO_PASS) \
1139
echo $$? > status; \
1140
) 2>&1 | tee bootstrap-protocol
1141
s=`cat status`; rm -f status; test $$s -eq 0
1144
ifeq ($(with_java),yes)
1146
ln -sf /usr/bin/fastjar bin/jar
1147
ifeq ($(with_native_ecj),yes)
1148
: # prepare the standalone ecj jar
1149
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1150
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1152
ifeq ($(with_java_maintainer_mode),yes)
1155
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1158
: # If we don't have gjavah in PATH, try to build it with the old gij
1160
if [ -x /usr/bin/gjavah-4.8 ]; then \
1161
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1162
elif [ -x bin/gjavah ]; then \
1165
mkdir -p $(builddir)/java_hacks; \
1166
cd $(builddir)/java_hacks; \
1167
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1168
mkdir -p gnu/classpath/tools; \
1169
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1170
gnu/classpath/tools/; \
1171
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1172
gnu/classpath/tools/common; \
1174
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1176
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1177
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1178
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1181
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1182
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1183
) > $(PWD)/bin/gjavah; \
1184
chmod +x $(PWD)/bin/gjavah; \
1188
: # build native compiler
1194
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1197
$(STAGE1_CFLAGS_TO_PASS) \
1198
$(LDFLAGS_TO_PASS) \
1200
echo $$? > status; \
1201
) 2>&1 | tee bootstrap-protocol
1202
s=`cat status`; rm -f status; test $$s -eq 0
1205
-chmod 755 $(srcdir)/contrib/warn_summary
1206
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1207
rm -f bootstrap-summary; \
1208
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1209
> bootstrap-summary; \
1212
touch $(build_stamp)
1214
ifeq ($(versioned_packages),yes)
1215
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1218
ifeq ($(DEB_CROSS),yes)
1219
CC_for_hppa64_cross = $(CC)
1221
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1224
$(configure_hppa64_stamp): $(build_stamp)
1226
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1227
rm -rf $(builddir_hppa64)
1228
mkdir $(builddir_hppa64)
1230
cd $(builddir_hppa64) && \
1233
CC="$(CC_for_hppa64_cross)" \
1235
--enable-languages=c \
1237
--libexecdir=/$(hppa64libexecdir) \
1241
--disable-libatomic \
1244
--disable-libmudflap \
1246
--disable-libquadmath \
1248
--with-system-zlib \
1249
--with-as=/usr/bin/hppa64-linux-gnu-as \
1250
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1251
--includedir=/usr/hppa64-linux-gnu/include \
1252
--build=$(DEB_BUILD_GNU_TYPE) \
1253
--host=$(DEB_HOST_GNU_TYPE) \
1254
--target=hppa64-linux-gnu
1255
touch $(configure_hppa64_stamp)
1257
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1261
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1262
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1263
CC="$(CC_for_hppa64_cross)" \
1266
touch $(build_hppa64_stamp)
1268
$(configure_neon_stamp): $(build_stamp)
1270
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1271
rm -rf $(builddir_neon)
1272
mkdir $(builddir_neon)
1274
cd $(builddir_neon) && \
1277
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1279
--disable-bootstrap \
1280
--enable-languages=c,c++,objc,fortran \
1282
--libexecdir=/$(libexecdir) \
1283
--program-suffix=-$(BASE_VERSION) \
1286
--disable-libmudflap \
1287
--with-arch=armv7-a --with-tune=cortex-a8 \
1288
--with-float=$(float_abi) --with-fpu=neon \
1289
--host=arm-linux-gnueabi \
1290
--build=arm-linux-gnueabi \
1291
--target=arm-linux-gnueabi
1292
touch $(configure_neon_stamp)
1294
$(build_neon_stamp): $(configure_neon_stamp)
1298
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1299
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1302
touch $(build_neon_stamp)
1306
$(srcdir)/gcc/doc/cpp.texi \
1307
$(srcdir)/gcc/doc/cppinternals.texi \
1308
$(srcdir)/gcc/doc/gcc.texi \
1309
$(srcdir)/gcc/doc/gccint.texi
1310
ifeq ($(with_fortran),yes)
1311
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1313
ifeq ($(with_java),yes)
1314
MANUALS += $(srcdir)/gcc/java/gcj.texi
1316
ifeq ($(with_ada),yes)
1318
$(builddir)/gcc/doc/gnat_ugn.texi \
1319
$(srcdir)/gcc/ada/gnat_rm.texi \
1320
$(srcdir)/gcc/ada/gnat-style.texi
1322
ifeq ($(with_gomp),yes)
1323
MANUALS += $(srcdir)/libgomp/libgomp.texi
1325
ifeq ($(with_itm),yes)
1326
MANUALS += $(srcdir)/libitm/libitm.texi
1328
ifeq ($(with_qmath),yes)
1329
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1331
ifeq ($(with_go),yes)
1332
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1335
html-docs: $(build_html_stamp)
1336
#$(build_html_stamp): html-texi2html
1337
#$(build_html_stamp): html-makeinfo
1338
$(build_html_stamp): html-makeinfo-nosplit
1341
rm -rf html $(builddir)/gcc/html
1342
mkdir $(builddir)/gcc/html
1343
ln -s $(builddir)/gcc/html html
1344
cd $(builddir)/gcc; \
1345
for manual in $(MANUALS); do \
1346
outname=`basename $${manual} .texi`; \
1347
echo "generating $$outname ..."; \
1348
texi2html -number -split chapter \
1349
-I $(srcdir)/gcc/doc/include \
1350
-I $(srcdir)/gcc/p/doc \
1351
-I $(srcdir)/gcc/p/doc/generated \
1352
-I `dirname $${manual}` \
1353
-I $(builddir)/gcc \
1354
-I $(buildlibdir)/libquadmath \
1362
cd $(builddir)/gcc; \
1363
for manual in $(MANUALS); do \
1364
manual=`find $(srcdir) -name $${file}.texi`; \
1365
outname=`basename $${manual} .texi`; \
1366
echo "generating $$outname ..."; \
1367
if [ "$${manual}" ]; then \
1368
makeinfo --html --number-sections \
1369
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1370
-I $(srcdir)/gcc/p/doc \
1371
-I $(srcdir)/gcc/p/doc/generated \
1372
-I $(builddir)/gcc \
1373
-I $(buildlibdir)/libquadmath \
1379
html-makeinfo-nosplit:
1382
cd $(builddir)/gcc; \
1383
for manual in $(MANUALS); do \
1384
outname=`basename $${manual} .texi`.html; \
1385
echo "generating $$outname ..."; \
1386
makeinfo --html --number-sections --no-split \
1387
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1388
-I $(srcdir)/gcc/p/doc \
1389
-I $(srcdir)/gcc/p/doc/generated \
1390
-I $(builddir)/gcc \
1391
-I $(buildlibdir)/libquadmath \
1392
-o $(PWD)/html/$${outname} \
1396
# start the script only on architectures known to have slow autobuilders ...
1397
logwatch_archs := alpha arm m68k mips mipsel sparc
1398
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1399
start_logwatch = yes
1401
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1402
start_logwatch = yes
1405
stamps/mauve-build: stamps/build
1408
ifeq ($(with_mauve_check),yes)
1409
tar xf $(wildcard /usr/src/mauve*.tar.*)
1414
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1415
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1419
stamps/mauve-check: stamps/build stamps/mauve-build
1420
ifeq ($(with_mauve_check),yes)
1422
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1423
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1424
xvfb-run -s "-extension GLX" java Harness \
1425
-vm $(CURDIR)/$(sdkimg)/bin/java \
1426
-file $(CURDIR)/debian/mauve_tests \
1427
-timeout 30000 2>&1 \
1431
echo "mauve testsuite not run for this build" > mauve/mauve_output
1435
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1436
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1438
rm -f $(builddir)/runcheck*
1440
-chmod 755 $(srcdir)/contrib/test_summary
1442
: # needed for the plugin tests to succeed
1443
ln -sf gcc $(builddir)/prev-gcc
1444
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1447
ifneq ($(with_common_libs),yes)
1448
ifeq ($(with_cxx),yes)
1449
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1451
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1452
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1455
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1456
echo "Running testsuite in $$d ..."; \
1461
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1463
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1464
done 2>&1 | tee test-protocol2
1466
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1467
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1469
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1470
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1471
) > libstdc++-test-summary
1472
echo 'BEGIN installed libstdc++-v3 test-summary'
1473
cat libstdc++-test-summary
1474
echo 'END installed libstdc++-v3 test-summary'
1475
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1481
ifeq ($(start_logwatch),yes)
1482
: # start logwatch script for regular output during test runs
1483
chmod +x debian/logwatch.sh
1484
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1485
-m '\ntestsuite still running ...\n' \
1487
$(builddir)/gcc/testsuite/gcc/gcc.log \
1488
$(builddir)/gcc/testsuite/g++/g++.log \
1489
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1490
$(builddir)/gcc/testsuite/objc/objc.log \
1491
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1492
$(builddir)/gcc/testsuite/gnat/gnat.log \
1493
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1494
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1495
$(builddir)/gcc/p/test/test_log \
1496
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1497
$(buildlibdir)/libjava/testsuite/libjava.log \
1498
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1499
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1500
$(buildlibdir)/libffi/testsuite/libffi.log \
1504
ifeq ($(with_ada),yes)
1505
chmod +x debian/acats-killer.sh
1506
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1507
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1508
$(builddir)/gcc/testsuite/g++.log \
1514
for d in $(checkdirs); do \
1515
echo "Running testsuite in $$d ..."; \
1519
EXTRA_TEST_PFLAGS=-g0 \
1520
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1522
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1523
done 2>&1 | tee test-protocol
1525
-ps aux | fgrep logwatch | fgrep -v fgrep
1526
-if [ -f $(builddir)/logwatch.pid ]; then \
1527
kill -1 `cat $(builddir)/logwatch.pid`; \
1529
kill -9 `cat $(builddir)/logwatch.pid`; \
1530
rm -f $(builddir)/logwatch.pid; \
1532
-ps aux | fgrep logwatch | fgrep -v fgrep
1534
ifeq ($(with_ada),yes)
1535
-if [ -f $(builddir)/acats-killer.pid ]; then \
1536
kill -1 `cat $(builddir)/acats-killer.pid`; \
1538
kill -9 `cat $(builddir)/acats-killer.pid`; \
1539
rm -f $(builddir)/acats-killer.pid; \
1543
: # running the libjava testsuite alone is missing this information
1544
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1546
if [ -x $(srcdir)/contrib/test_summary ]; then \
1547
rm -f test-summary; \
1550
echo '' > ts-include; \
1551
echo '' >> ts-include; \
1552
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1553
echo 'Bootstrap comparison failure:' >> ts-include; \
1554
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1555
echo '' >> ts-include; \
1556
echo '' >> ts-include; \
1558
echo "Build Dependencies:" >> ts-include; \
1559
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1560
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1561
| fgrep -v '<none>' >> ts-include; \
1562
echo '' >> ts-include; \
1563
cat ../$(patch_stamp) >> ts-include; \
1564
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1565
$(srcdir)/contrib/test_summary \
1566
-i ts-include -m "$(S_EMAIL)" \
1567
) > raw-test-summary; \
1568
if [ -n "$(testsuite_tarball)" ]; then \
1569
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1570
echo " Do not interpret the results on its own" >> test-summary; \
1571
echo " but compare them with the results from" >> test-summary; \
1572
echo " the gcc-snapshot package." >> test-summary; \
1574
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1576
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1577
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1578
echo '' >> test-summary; \
1579
cat bootstrap-summary >> test-summary; \
1581
echo 'BEGIN test-summary'; \
1583
echo 'END test-summary'; \
1585
ifeq ($(with_d),yes)
1586
: # the D test failures for the non-default multilibs are known, ignore them
1587
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1588
mv -f test-summary.tmp test-summary
1591
touch $(check_stamp)
1593
$(check_inst_stamp): $(check_stamp)
1594
rm -f test-inst-protocol
1596
ifeq ($(start_logwatch),yes)
1597
: # start logwatch script for regular output during test runs
1598
chmod +x debian/logwatch.sh
1599
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1600
-m '\ntestsuite (3.3) still running ...\n' \
1601
test-inst-protocol \
1602
check-inst/{gcc,g++,g77,objc}.log \
1609
echo "Running testsuite ..."
1613
EXTRA_TEST_PFLAGS=-g0 \
1614
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1615
cd check-inst && $(srcdir)/contrib/test_installed \
1616
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1617
2>&1 | tee test-inst-protocol
1619
-ps aux | fgrep logwatch | fgrep -v fgrep
1620
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1621
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1625
-ps aux | fgrep logwatch | fgrep -v fgrep
1627
-chmod 755 $(srcdir)/contrib/test_summary
1628
if [ -x $(srcdir)/contrib/test_summary ]; then \
1629
rm -f test-inst-summary; \
1632
echo '' > ts-include; \
1633
echo '' >> ts-include; \
1634
echo "Build Dependencies:" >> ts-include; \
1635
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1636
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1637
| fgrep -v '<none>' >> ts-include; \
1638
echo '' >> ts-include; \
1639
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1640
$(srcdir)/contrib/test_summary \
1641
-i ts-include -m "$(S_EMAIL)" \
1642
) > raw-test-inst-summary; \
1643
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1644
>> test-inst-summary; \
1645
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1646
| grep -v EOF >> test-inst-summary; \
1647
echo 'BEGIN test-installed-summary'; \
1648
cat test-inst-summary; \
1649
echo 'END test-installed-summary'; \
1652
chmod 755 debian/reduce-test-diff.awk
1653
if diff -u test-inst-summary test-summary \
1654
| debian/reduce-test-diff.awk > diff-summary; \
1656
mv -f diff-summary testsuite-comparision; \
1659
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1662
) > testsuite-comparision; \
1663
rm -f diff-summary; \
1665
touch $(check_inst_stamp)
1667
clean: debian/control
1670
rm -f *-summary *-protocol testsuite-comparision summary-diff
1671
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1672
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1674
rm -f $(srcdir)/gcc/po/*.gmo
1675
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1676
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1678
[ -f $$f ] || continue; \
1680
| 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$$//'); \
1683
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1684
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1685
rm -f debian/shlibs.local debian/substvars.local
1686
rm -f debian/*.debhelper
1687
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1688
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1689
rm -f debian/lib*gcj-bc.shlibs
1690
rm -rf bin locales share
1694
$(cross_clean) dh_clean
1696
# -----------------------------------------------------------------------------
1697
# some abbrevations for the package names and directories;
1698
# p_XXX is the package name, d_XXX is the package directory
1699
# these macros are only used in the binary-* targets.
1701
ifeq ($(versioned_packages),yes)
1702
pkg_ver := -$(BASE_VERSION)
1705
ifneq ($(DEB_CROSS),yes)
1706
p_base = gcc$(pkg_ver)-base
1707
p_xbase = gcc$(pkg_ver)-base
1708
p_gcc = gcc$(pkg_ver)
1709
p_cpp = cpp$(pkg_ver)
1710
p_cppd = cpp$(pkg_ver)-doc
1711
p_cxx = g++$(pkg_ver)
1712
p_doc = gcc$(pkg_ver)-doc
1713
p_lgcc = libgcc$(GCC_SONAME)
1715
# only triggered if DEB_CROSS set
1716
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1717
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1718
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1720
p_base = gcc$(pkg_ver)-base
1723
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1724
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1725
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1727
p_hppa64 = gcc$(pkg_ver)-hppa64
1730
d_base = debian/$(p_base)
1731
d_xbase = debian/$(p_xbase)
1732
d_gcc = debian/$(p_gcc)
1733
d_cpp = debian/$(p_cpp)
1734
d_cppd = debian/$(p_cppd)
1735
d_cxx = debian/$(p_cxx)
1736
d_doc = debian/$(p_doc)
1737
d_lgcc = debian/$(p_lgcc)
1738
d_hppa64= debian/$(p_hppa64)
1740
d_neon = debian/tmp-neon
1742
common_substvars = \
1743
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1745
ifeq ($(DEB_CROSS),yes)
1746
lib_binaries := indep_binaries
1748
lib_binaries := arch_binaries
1751
# ---------------------------------------------------------------------------
1753
ifeq ($(single_package),yes)
1754
include debian/rules.d/binary-snapshot.mk
1757
ifneq ($(DEB_CROSS),yes)
1758
ifeq ($(with_source),yes)
1759
include debian/rules.d/binary-source.mk
1763
ifneq ($(BACKPORT),true)
1764
ifeq ($(with_gccxbase),yes)
1765
include debian/rules.d/binary-base.mk
1768
ifeq ($(with_gccbase),yes)
1769
include debian/rules.d/binary-base.mk
1772
# always include to get some definitions
1773
include debian/rules.d/binary-libgcc.mk
1775
ifeq ($(with_libqmath),yes)
1776
include debian/rules.d/binary-libquadmath.mk
1779
ifeq ($(with_libgmath),yes)
1780
include debian/rules.d/binary-libgccmath.mk
1783
ifeq ($(with_libgomp),yes)
1784
include debian/rules.d/binary-libgomp.mk
1787
ifeq ($(with_libitm),yes)
1788
include debian/rules.d/binary-libitm.mk
1791
ifeq ($(with_libatomic),yes)
1792
include debian/rules.d/binary-libatomic.mk
1795
ifeq ($(with_libbacktrace),yes)
1796
include debian/rules.d/binary-libbacktrace.mk
1799
ifeq ($(with_cdev),yes)
1800
include debian/rules.d/binary-cpp.mk
1803
ifeq ($(with_fixincl),yes)
1804
include debian/rules.d/binary-fixincl.mk
1807
ifeq ($(with_libssp),yes)
1808
include debian/rules.d/binary-libssp.mk
1811
ifeq ($(with_objcxx),yes)
1812
include debian/rules.d/binary-objcxx.mk
1815
ifeq ($(with_objc),yes)
1816
include debian/rules.d/binary-objc.mk
1817
include debian/rules.d/binary-libobjc.mk
1820
ifeq ($(with_go),yes)
1821
include debian/rules.d/binary-go.mk
1824
# include before cxx
1825
ifeq ($(with_java),yes)
1826
include debian/rules.d/binary-java.mk
1829
ifeq ($(with_cxxdev),yes)
1830
include debian/rules.d/binary-cxx.mk
1832
ifeq ($(with_cxx),yes)
1833
include debian/rules.d/binary-libstdcxx.mk
1836
ifeq ($(with_libasan),yes)
1837
include debian/rules.d/binary-libasan.mk
1840
ifeq ($(with_libtsan),yes)
1841
include debian/rules.d/binary-libtsan.mk
1844
ifeq ($(with_f77),yes)
1845
include debian/rules.d/binary-f77.mk
1848
ifeq ($(with_fortran),yes)
1849
include debian/rules.d/binary-fortran.mk
1852
ifeq ($(with_ada),yes)
1853
include debian/rules.d/binary-ada.mk
1856
ifeq ($(with_d),yes)
1857
include debian/rules.d/binary-d.mk
1860
ifeq ($(with_libnof),yes)
1861
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1862
include debian/rules.d/binary-nof.mk
1866
ifeq ($(with_softfloat),yes)
1867
include debian/rules.d/binary-softfloat.mk
1870
# gcc must be moved/built after g77 and g++
1871
ifeq ($(with_cdev),yes)
1872
include debian/rules.d/binary-gcc.mk
1875
ifeq ($(with_hppa64),yes)
1876
include debian/rules.d/binary-hppa64.mk
1879
ifeq ($(with_neon),yes)
1880
include debian/rules.d/binary-neon.mk
1885
endif # ($(single_package),yes)
1887
# ----------------------------------------------------------------------
1888
install: $(install_dependencies)
1890
$(install_dummy_stamp): $(build_dummy_stamp)
1891
touch $(install_dummy_stamp)
1893
$(install_snap_stamp): $(build_dependencies)
1898
: # Install directories
1902
ifeq ($(with_hppa64),yes)
1905
$(MAKE) -C $(builddir_hppa64) \
1908
$(LDFLAGS_TO_PASS) \
1909
DESTDIR=$(PWD)/$(d) \
1912
ls -l $(d)/$(PF)/bin
1913
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1914
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1916
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1919
for i in ar nm ranlib; do \
1920
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1923
: # remove files not needed from the hppa64 build
1924
rm -rf $(d)/$(PF)/share/info
1925
rm -rf $(d)/$(PF)/share/man
1926
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1927
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1929
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1930
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1932
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1935
README|features.h|syslimits.h|limits.h) ;; \
1936
linux|$(TARGET_ALIAS)) ;; \
1937
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1938
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1943
: # Work around PR lto/41569
1944
ln -sf gcc $(builddir)/prev-gcc
1945
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1947
: # Install everything
1950
$(MAKE) -C $(builddir) \
1952
$(LDFLAGS_TO_PASS) \
1953
DESTDIR=$(PWD)/$(d) \
1954
infodir=/$(PF)/share/info \
1955
mandir=/$(PF)/share/man \
1958
ls -l $(d)/$(PF)/bin
1959
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1960
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1962
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1965
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1968
README|features.h|syslimits.h|limits.h) ;; \
1969
linux|$(TARGET_ALIAS)) ;; \
1970
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1971
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1975
ifneq ($(configured_libdir),$(libdir))
1976
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1977
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1978
$(d)/$(PF)/$(libdir)/. || true; \
1979
mv $(d)/$(PF)/libo32/$$i \
1980
$(d)/$(PF)/lib/. || true; \
1984
# FIXME: libjava/classpath not correctly patched
1985
ifeq ($(with_java),yes)
1986
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1987
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1988
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1989
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1990
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1993
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1995
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1996
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1997
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1998
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1999
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
2000
$(srcdir)/libjava/libgcj_bc.c \
2001
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
2002
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
2006
if [ -d $(d)/usr/man/man1 ]; then \
2007
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
2010
chmod 755 debian/dh_*
2011
touch $(install_snap_stamp)
2013
$(install_stamp): $(build_stamp)
2016
dh_clean -k -N$(p_hppa64)
2018
if [ -f $(binary_stamp)-hppa64 ]; then \
2019
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
2021
rm -f $(binary_stamp)*
2022
if [ -f saved-stamp-hppa64 ]; then \
2023
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
2026
: # Install directories
2028
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
2029
ifeq ($(biarch32),yes)
2030
mkdir -p $(d)/$(PF)/$(lib32loc)/debug
2032
ifeq ($(biarch64),yes)
2033
mkdir -p $(d)/$(PF)/lib64/debug
2035
ifeq ($(biarchn32),yes)
2036
mkdir -p $(d)/$(PF)/$(libn32)/debug
2038
ifeq ($(biarchx32),yes)
2039
mkdir -p $(d)/$(PF)/libx32/debug
2042
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
2043
ifneq ($(DEB_TARGET_ARCH),x32)
2044
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
2045
: # (this works when CONFARGS contains '--disable-multilib')
2046
ln -s $(configured_libdir) $(d)/lib64
2047
mkdir -p $(d)/$(PF)/$(configured_libdir)
2048
ln -s $(configured_libdir) $(d)/$(PF)/lib64
2051
ifeq ($(DEB_TARGET_ARCH),x32)
2052
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
2053
ln -s $(configured_libdir) $(d)/libx32
2054
mkdir -p $(d)/$(PF)/$(configured_libdir)
2055
ln -s $(configured_libdir) $(d)/$(PF)/libx32
2058
: # Work around PR lto/41569
2059
ln -sf gcc $(builddir)/prev-gcc
2061
: # Install everything
2064
$(MAKE) -C $(builddir) \
2066
$(LDFLAGS_TO_PASS) \
2067
DESTDIR=$(PWD)/$(d) \
2068
infodir=/$(PF)/share/info \
2069
mandir=/$(PF)/share/man \
2072
ifneq ($(configured_libdir),$(libdir))
2073
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
2074
mv $(d)/$(PF)/$(configured_libdir)/$$i \
2075
$(d)/$(PF)/$(libdir)/. || true; \
2076
mv $(d)/$(PF)/libo32/$$i \
2077
$(d)/$(PF)/lib/. || true; \
2081
ifeq ($(with_libcxxdbg),yes)
2082
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2083
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2084
[ -f $$i ] || continue; \
2085
d=$$(dirname $$i); \
2086
b=$$(basename $$i); \
2087
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2092
# FIXME: libjava/classpath not correctly patched
2093
ifeq ($(with_java),yes)
2094
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2095
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2096
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2097
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2098
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2102
: # remove rpath settings from binaries and shared libs
2103
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2104
$(if $(filter $(with_multiarch_lib),yes), \
2105
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2106
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2107
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2109
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2110
[ -h $$i ] && continue; \
2111
chrpath --delete $$i; \
2112
echo "removed RPATH: $$i"; \
2115
: # remove '*.la' and '*.lai' files, not shipped in any package.
2116
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2118
ifneq ($(with_libgnat),yes)
2119
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2122
ifeq ($(GFDL_INVARIANT_FREE),yes)
2123
for i in gcc gcov; do \
2124
I=`echo $$i | tr a-z A-Z`; \
2125
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2126
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2129
ifeq ($(with_fortran),yes)
2131
I=`echo $$i | tr a-z A-Z`; \
2132
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2133
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2136
ifeq ($(with_java),yes)
2137
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2139
I=`echo $$i | tr a-z A-Z`; \
2140
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2141
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2146
# ifeq ($(with_ada),yes)
2147
# : # rename files (versioned ada binaries)
2149
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2150
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2151
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2153
# for i in $(GNAT_TOOLS); do \
2154
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2158
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2159
ifneq ($(DEB_STAGE),stage1)
2160
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2161
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2162
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2163
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2165
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2166
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2167
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2168
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2173
for i in ar nm ranlib; do \
2174
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2177
chmod 755 debian/dh_*
2179
# tar cf tmp.tar debian/tmp
2181
touch $(install_stamp)
2183
$(install_hppa64_stamp): $(build_hppa64_stamp)
2187
mkdir -p $(d_hppa64)/$(PF)
2190
$(MAKE) -C $(builddir_hppa64) \
2193
$(LDFLAGS_TO_PASS) \
2194
DESTDIR=$(PWD)/$(d_hppa64) \
2197
ifeq ($(versioned_packages),yes)
2198
for i in cpp gcc-ar gcc-nm gcc-ranlib; do \
2199
mv -f $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i \
2200
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i$(pkg_ver); \
2204
ifneq ($(single_package),yes)
2205
: # remove files not needed
2206
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2207
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2208
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2209
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2210
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2212
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2213
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2214
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2217
touch $(install_hppa64_stamp)
2219
$(install_neon_stamp): $(build_neon_stamp)
2223
mkdir -p $(d_neon)/$(PF)
2226
$(MAKE) -C $(builddir_neon) \
2229
$(LDFLAGS_TO_PASS) \
2230
DESTDIR=$(PWD)/$(d_neon) \
2232
touch $(install_neon_stamp)
2234
# ----------------------------------------------------------------------
2235
# Build architecture-dependent files here.
2236
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2237
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2238
ifeq ($(with_check),yes)
2240
# : # Send Email about sucessfull build.
2241
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2244
# ----------------------------------------------------------------------
2245
# Build architecture-independent files here.
2246
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2247
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2250
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2252
binary: binary-indep binary-arch
2253
.PHONY: build clean binary-indep binary-arch binary