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),sh4 mips))
692
else ifneq (,$(filter $(DEB_TARGET_ARCH),armel))
695
ifneq ($(single_package),yes)
696
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
699
ifeq ($(derivative),Ubuntu)
700
# the buildds are just slow ... don't check the non-default
701
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 sparc))
704
# FIXME Ubuntu armel buildd hangs
705
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
712
ifeq ($(derivative),Ubuntu)
713
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
714
ifeq ($(with_arm_thumb),yes)
715
#DEJAGNU_RUNS += -marm
717
DEJAGNU_RUNS += -mthumb
722
# no b-d on g++-multilib, this is run by the built compiler
723
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
724
$(shell cat build/runcheck$(1).out), \
725
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
726
ifeq ($(biarch32),yes)
727
DEJAGNU_RUNS += $(call abi_run_check,-m32)
729
ifeq ($(biarch64),yes)
730
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
732
ifeq ($(biarchn32),yes)
733
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
735
ifeq ($(biarchx32),yes)
736
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
739
# gdc is not multilib'd
740
ifneq (,$(findstring gdc, $(PKGSOURCE)))
744
ifneq (,$(findstring gcj, $(PKGSOURCE)))
749
ifneq (,$(findstring gnat, $(PKGSOURCE)))
753
ifneq (,$(strip $(value DEJAGNU_RUNS)))
754
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
757
# PF is the installation prefix for the package without the leading slash.
758
# It's "usr" for gcc releases.
760
# use value set in the environment
761
else ifeq ($(trunk_build),yes)
762
PF = usr/lib/gcc-snapshot
763
else ifeq ($(PKGSOURCE),gcc-linaro)
764
PF = usr/lib/gcc-linaro
769
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
770
ifeq ($(DEB_CROSS),yes)
771
ifneq ($(with_deps_on_target_arch_pkgs),yes)
772
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
780
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
781
ifeq ($(DEB_CROSS),yes)
782
ifneq ($(with_deps_on_target_arch_pkgs),yes)
783
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
791
ifeq ($(with_multiarch_lib),yes)
792
ifeq ($(DEB_CROSS),yes)
793
ifneq ($(with_deps_on_target_arch_pkgs),yes)
796
libdir = lib/$(DEB_TARGET_MULTIARCH)
799
libdir = lib/$(DEB_TARGET_MULTIARCH)
804
configured_libdir = lib
806
hppa64libexecdir= $(PF)/lib
808
# /usr/libexec doesn't follow the FHS
809
ifeq ($(single_package),yes)
811
libexecdir = $(PF)/libexec
812
versiondir = $(GCC_VERSION)
814
libexecdir = $(PF)/$(configured_libdir)
815
versiondir = $(BASE_VERSION)
817
buildlibdir = $(builddir)/$(TARGET_ALIAS)
819
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
820
gcc_subdir_name = gcc
821
ifneq ($(single_package),yes)
822
ifeq ($(DEB_CROSS),yes)
823
ifneq ($(with_deps_on_target_arch_pkgs),yes)
824
gcc_subdir_name = gcc-cross
829
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
830
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
833
ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
836
lib32 = $(PF)/$(lib32loc)
841
p_l= $(1)$(cross_lib_arch)
842
p_d= $(1)-dbg$(cross_lib_arch)
846
ifeq ($(DEB_CROSS),yes)
847
ifneq ($(with_deps_on_target_arch_pkgs),yes)
850
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
851
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
852
usr_lib = $(PFL)/lib/sh4-linux-gnu/
855
usr_lib = $(PFL)/$(libdir)
858
usr_lib = $(PFL)/$(libdir)
860
usr_lib32 = $(PFL)/$(lib32loc)
861
usr_libn32 = $(PFL)/lib32
862
usr_libx32 = $(PFL)/libx32
863
usr_lib64 = $(PFL)/lib64
864
# FIXME: Move to the new location for native builds too
865
ifeq ($(DEB_CROSS),yes)
866
usr_libhf = $(PFL)/libhf
867
usr_libsf = $(PFL)/libsf
869
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
870
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
873
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
874
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
875
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
876
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
877
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
878
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
880
libgcc_dir = $(RPF)/$(libdir)
881
# yes, really; lib32gcc_s ends up in usr
882
libgcc_dir32 = $(PFL)/$(lib32loc)
883
libgcc_dirn32 = $(RPF)/lib32
884
# libx32gcc_s also ends up in usr
885
libgcc_dirx32 = $(PFL)/libx32
886
libgcc_dir64 = $(RPF)/lib64
887
# FIXME: Move to the new location for native builds too
888
ifeq ($(DEB_CROSS),yes)
889
libgcc_dirhf = $(RPF)/libhf
890
libgcc_dirsf = $(RPF)/libsf
892
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
893
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
896
# install_gcc_lib(lib,soname,flavour,package)
897
define install_gcc_lib
898
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
899
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
901
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
905
checkdirs = $(builddir)
906
ifeq ($(with_separate_libgcj),yes)
907
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
908
ifneq ($(with_standalone_gcj),yes)
909
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
913
ifeq ($(with_separate_go),yes)
914
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
915
checkdirs = $(buildlibdir)/libgo
918
ifeq ($(with_separate_gnat),yes)
919
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
920
checkdirs = $(builddir)/gcc
924
ifneq ($(DEB_CROSS),yes)
925
ifneq ($(single_package),yes)
926
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
928
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
931
ifeq ($(with_deps_on_target_arch_pkgs),yes)
932
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
934
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
938
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
939
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
940
export MULTIARCH_DIRNAME
944
configure: $(configure_dependencies)
946
$(configure_dummy_stamp):
947
touch $(configure_dummy_stamp)
951
: # give information about the build process
952
@echo "------------------------ Build process variables ------------------------"
953
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
954
@echo "Package source: $(PKGSOURCE)"
955
@echo "GCC version: $(GCC_VERSION)"
956
@echo "Base Debian version: $(BASE_VERSION)"
957
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
958
ifeq ($(DEB_CROSS),yes)
959
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
961
@echo "Using shell $(SHELL)"
962
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
963
@echo "CPPFLAGS: $(CPPFLAGS)"
964
@echo "CFLAGS: $(CFLAGS)"
965
@echo "LDFLAGS: $(LDFLAGS)"
966
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
967
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
968
@echo "Install prefix: /$(PF)"
969
ifeq ($(biarchn32)-$(biarch64),yes-yes)
970
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
971
else ifeq ($(biarchn32)-$(biarch32),yes-yes)
972
@echo "Will build the triarch compilers (o32/n32/64, defaulting to 64)"
973
else ifeq ($(biarch64)-$(biarch32),yes-yes)
974
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
975
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
976
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
977
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
978
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
980
ifeq ($(biarch64),yes)
981
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
983
ifeq ($(biarch32),yes)
984
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
986
@echo "Will not build the biarch compilers"
991
ifeq ($(with_cxx),yes)
992
@echo "Will build the C++ compiler"
994
@echo "Will not build the C++ compiler: $(with_cxx)"
996
ifeq ($(with_objc),yes)
997
@echo "Will build the ObjC compiler."
998
ifeq ($(with_objc_gc),yes)
999
@echo "Will build the extra ObjC runtime for garbage collection."
1001
@echo "Will not build the extra ObjC runtime for garbage collection."
1004
@echo "Will not build the ObjC compiler: $(with_objc)"
1006
ifeq ($(with_objcxx),yes)
1007
@echo "Will build the Obj-C++ compiler"
1009
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
1011
ifeq ($(with_fortran),yes)
1012
@echo "Will build the Fortran 95 compiler."
1014
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
1016
ifeq ($(with_java),yes)
1017
@echo "Will build the Java compiler."
1019
@echo "Will not build the Java compiler: $(with_java)"
1021
ifeq ($(with_ada),yes)
1022
@echo "Will build the Ada compiler."
1023
ifeq ($(with_libgnat),yes)
1024
@echo "Will build the shared Ada libraries."
1026
@echo "Will not build the shared Ada libraries."
1029
@echo "Will not build the Ada compiler: $(with_ada)"
1031
ifeq ($(with_go),yes)
1032
@echo "Will build the Go compiler."
1034
@echo "Will not build the Go compiler: $(with_go)"
1036
ifeq ($(with_d),yes)
1037
@echo "Will build the D compiler"
1038
ifeq ($(with_libphobos),yes)
1039
@echo "Will build the phobos D runtime library."
1041
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
1044
@echo "Will not build the D compiler: $(with_d)"
1046
ifeq ($(with_ssp),yes)
1047
@echo "Will build with SSP support."
1049
@echo "Will build without SSP support: $(with_ssp)"
1051
ifeq ($(with_check),yes)
1052
@echo "Will run the testsuite."
1054
@echo "Will not run the testsuite: $(with_check)"
1056
ifeq ($(with_nls),yes)
1057
@echo "Will enable national language support."
1059
@echo "Will disable national language support: $(with_nls)"
1061
@echo "-----------------------------------------------------------------------------"
1063
ifeq ($(with_check),yes)
1064
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
1067
echo "expect is failing on your system with the above error, which means the GCC"; \
1068
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
1069
echo "-----------------------------------------------------------------------------"; \
1073
rm -f $(configure_stamp) $(build_stamp)
1074
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1084
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1085
../src/configure $(subst ___, ,$(CONFARGS))
1087
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1088
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1089
mkdir -p $(builddir)/sys-include; \
1090
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1093
touch $(configure_stamp)
1095
build: $(build_dependencies)
1097
$(build_dummy_stamp):
1098
touch $(build_dummy_stamp)
1100
$(build_locale_stamp):
1101
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1102
: # build locales needed by libstdc++ testsuite
1105
- sh debian/locale-gen
1107
touch $(build_locale_stamp)
1110
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1112
rm -f bootstrap-protocol
1113
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1115
ifeq ($(DEB_CROSS),yes)
1116
: # build cross compiler for $(TARGET_ALIAS)
1121
$(MAKE) -C $(builddir) $(NJOBS) \
1124
$(LDFLAGS_TO_PASS) \
1126
echo $$? > status; \
1127
) 2>&1 | tee bootstrap-protocol
1128
s=`cat status`; rm -f status; test $$s -eq 0
1130
# REVERSE_CROSS build
1131
ifeq ($(REVERSE_CROSS),yes)
1132
: # build cross compiler for $(TARGET_ALIAS)
1137
$(MAKE) -C $(builddir) $(NJOBS) \
1140
$(LDFLAGS_TO_PASS) \
1142
echo $$? > status; \
1143
) 2>&1 | tee bootstrap-protocol
1144
s=`cat status`; rm -f status; test $$s -eq 0
1147
ifeq ($(with_java),yes)
1149
ln -sf /usr/bin/fastjar bin/jar
1150
ifeq ($(with_native_ecj),yes)
1151
: # prepare the standalone ecj jar
1152
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1153
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1155
ifeq ($(with_java_maintainer_mode),yes)
1158
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1161
: # If we don't have gjavah in PATH, try to build it with the old gij
1163
if [ -x /usr/bin/gjavah-4.8 ]; then \
1164
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1165
elif [ -x bin/gjavah ]; then \
1168
mkdir -p $(builddir)/java_hacks; \
1169
cd $(builddir)/java_hacks; \
1170
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1171
mkdir -p gnu/classpath/tools; \
1172
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1173
gnu/classpath/tools/; \
1174
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1175
gnu/classpath/tools/common; \
1177
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1179
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1180
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1181
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1184
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1185
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1186
) > $(PWD)/bin/gjavah; \
1187
chmod +x $(PWD)/bin/gjavah; \
1191
: # build native compiler
1197
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1200
$(STAGE1_CFLAGS_TO_PASS) \
1201
$(LDFLAGS_TO_PASS) \
1203
echo $$? > status; \
1204
) 2>&1 | tee bootstrap-protocol
1205
s=`cat status`; rm -f status; test $$s -eq 0
1208
-chmod 755 $(srcdir)/contrib/warn_summary
1209
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1210
rm -f bootstrap-summary; \
1211
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1212
> bootstrap-summary; \
1215
touch $(build_stamp)
1217
ifeq ($(versioned_packages),yes)
1218
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1221
ifeq ($(DEB_CROSS),yes)
1222
CC_for_hppa64_cross = $(CC)
1224
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1227
$(configure_hppa64_stamp): $(build_stamp)
1229
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1230
rm -rf $(builddir_hppa64)
1231
mkdir $(builddir_hppa64)
1233
cd $(builddir_hppa64) && \
1236
CC="$(CC_for_hppa64_cross)" \
1238
--enable-languages=c \
1240
--libexecdir=/$(hppa64libexecdir) \
1244
--disable-libatomic \
1247
--disable-libmudflap \
1249
--disable-libquadmath \
1251
--with-system-zlib \
1252
--with-as=/usr/bin/hppa64-linux-gnu-as \
1253
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1254
--includedir=/usr/hppa64-linux-gnu/include \
1255
--build=$(DEB_BUILD_GNU_TYPE) \
1256
--host=$(DEB_HOST_GNU_TYPE) \
1257
--target=hppa64-linux-gnu
1258
touch $(configure_hppa64_stamp)
1260
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1264
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1265
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1266
CC="$(CC_for_hppa64_cross)" \
1269
touch $(build_hppa64_stamp)
1271
$(configure_neon_stamp): $(build_stamp)
1273
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1274
rm -rf $(builddir_neon)
1275
mkdir $(builddir_neon)
1277
cd $(builddir_neon) && \
1280
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1282
--disable-bootstrap \
1283
--enable-languages=c,c++,objc,fortran \
1285
--libexecdir=/$(libexecdir) \
1286
--program-suffix=-$(BASE_VERSION) \
1289
--disable-libmudflap \
1290
--with-arch=armv7-a --with-tune=cortex-a8 \
1291
--with-float=$(float_abi) --with-fpu=neon \
1292
--host=arm-linux-gnueabi \
1293
--build=arm-linux-gnueabi \
1294
--target=arm-linux-gnueabi
1295
touch $(configure_neon_stamp)
1297
$(build_neon_stamp): $(configure_neon_stamp)
1301
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1302
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1305
touch $(build_neon_stamp)
1309
$(srcdir)/gcc/doc/cpp.texi \
1310
$(srcdir)/gcc/doc/cppinternals.texi \
1311
$(srcdir)/gcc/doc/gcc.texi \
1312
$(srcdir)/gcc/doc/gccint.texi
1313
ifeq ($(with_fortran),yes)
1314
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1316
ifeq ($(with_java),yes)
1317
MANUALS += $(srcdir)/gcc/java/gcj.texi
1319
ifeq ($(with_ada),yes)
1321
$(builddir)/gcc/doc/gnat_ugn.texi \
1322
$(srcdir)/gcc/ada/gnat_rm.texi \
1323
$(srcdir)/gcc/ada/gnat-style.texi
1325
ifeq ($(with_gomp),yes)
1326
MANUALS += $(srcdir)/libgomp/libgomp.texi
1328
ifeq ($(with_itm),yes)
1329
MANUALS += $(srcdir)/libitm/libitm.texi
1331
ifeq ($(with_qmath),yes)
1332
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1334
ifeq ($(with_go),yes)
1335
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1338
html-docs: $(build_html_stamp)
1339
#$(build_html_stamp): html-texi2html
1340
#$(build_html_stamp): html-makeinfo
1341
$(build_html_stamp): html-makeinfo-nosplit
1344
rm -rf html $(builddir)/gcc/html
1345
mkdir $(builddir)/gcc/html
1346
ln -s $(builddir)/gcc/html html
1347
cd $(builddir)/gcc; \
1348
for manual in $(MANUALS); do \
1349
outname=`basename $${manual} .texi`; \
1350
echo "generating $$outname ..."; \
1351
texi2html -number -split chapter \
1352
-I $(srcdir)/gcc/doc/include \
1353
-I $(srcdir)/gcc/p/doc \
1354
-I $(srcdir)/gcc/p/doc/generated \
1355
-I `dirname $${manual}` \
1356
-I $(builddir)/gcc \
1357
-I $(buildlibdir)/libquadmath \
1365
cd $(builddir)/gcc; \
1366
for manual in $(MANUALS); do \
1367
manual=`find $(srcdir) -name $${file}.texi`; \
1368
outname=`basename $${manual} .texi`; \
1369
echo "generating $$outname ..."; \
1370
if [ "$${manual}" ]; then \
1371
makeinfo --html --number-sections \
1372
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1373
-I $(srcdir)/gcc/p/doc \
1374
-I $(srcdir)/gcc/p/doc/generated \
1375
-I $(builddir)/gcc \
1376
-I $(buildlibdir)/libquadmath \
1382
html-makeinfo-nosplit:
1385
cd $(builddir)/gcc; \
1386
for manual in $(MANUALS); do \
1387
outname=`basename $${manual} .texi`.html; \
1388
echo "generating $$outname ..."; \
1389
makeinfo --html --number-sections --no-split \
1390
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1391
-I $(srcdir)/gcc/p/doc \
1392
-I $(srcdir)/gcc/p/doc/generated \
1393
-I $(builddir)/gcc \
1394
-I $(buildlibdir)/libquadmath \
1395
-o $(PWD)/html/$${outname} \
1399
# start the script only on architectures known to have slow autobuilders ...
1400
logwatch_archs := alpha arm m68k mips mipsel sparc
1401
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1402
start_logwatch = yes
1404
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1405
start_logwatch = yes
1408
stamps/mauve-build: stamps/build
1411
ifeq ($(with_mauve_check),yes)
1412
tar xf $(wildcard /usr/src/mauve*.tar.*)
1417
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1418
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1422
stamps/mauve-check: stamps/build stamps/mauve-build
1423
ifeq ($(with_mauve_check),yes)
1425
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1426
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1427
xvfb-run -s "-extension GLX" java Harness \
1428
-vm $(CURDIR)/$(sdkimg)/bin/java \
1429
-file $(CURDIR)/debian/mauve_tests \
1430
-timeout 30000 2>&1 \
1434
echo "mauve testsuite not run for this build" > mauve/mauve_output
1438
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1439
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1441
rm -f $(builddir)/runcheck*
1443
-chmod 755 $(srcdir)/contrib/test_summary
1445
: # needed for the plugin tests to succeed
1446
ln -sf gcc $(builddir)/prev-gcc
1447
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1450
ifneq ($(with_common_libs),yes)
1451
ifeq ($(with_cxx),yes)
1452
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1454
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1455
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1458
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1459
echo "Running testsuite in $$d ..."; \
1464
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1466
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1467
done 2>&1 | tee test-protocol2
1469
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1470
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1472
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1473
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1474
) > libstdc++-test-summary
1475
echo 'BEGIN installed libstdc++-v3 test-summary'
1476
cat libstdc++-test-summary
1477
echo 'END installed libstdc++-v3 test-summary'
1478
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1484
ifeq ($(start_logwatch),yes)
1485
: # start logwatch script for regular output during test runs
1486
chmod +x debian/logwatch.sh
1487
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1488
-m '\ntestsuite still running ...\n' \
1490
$(builddir)/gcc/testsuite/gcc/gcc.log \
1491
$(builddir)/gcc/testsuite/g++/g++.log \
1492
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1493
$(builddir)/gcc/testsuite/objc/objc.log \
1494
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1495
$(builddir)/gcc/testsuite/gnat/gnat.log \
1496
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1497
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1498
$(builddir)/gcc/p/test/test_log \
1499
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1500
$(buildlibdir)/libjava/testsuite/libjava.log \
1501
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1502
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1503
$(buildlibdir)/libffi/testsuite/libffi.log \
1507
ifeq ($(with_ada),yes)
1508
chmod +x debian/acats-killer.sh
1509
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1510
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1511
$(builddir)/gcc/testsuite/g++.log \
1517
for d in $(checkdirs); do \
1518
echo "Running testsuite in $$d ..."; \
1522
EXTRA_TEST_PFLAGS=-g0 \
1523
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1525
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1526
done 2>&1 | tee test-protocol
1528
-ps aux | fgrep logwatch | fgrep -v fgrep
1529
-if [ -f $(builddir)/logwatch.pid ]; then \
1530
kill -1 `cat $(builddir)/logwatch.pid`; \
1532
kill -9 `cat $(builddir)/logwatch.pid`; \
1533
rm -f $(builddir)/logwatch.pid; \
1535
-ps aux | fgrep logwatch | fgrep -v fgrep
1537
ifeq ($(with_ada),yes)
1538
-if [ -f $(builddir)/acats-killer.pid ]; then \
1539
kill -1 `cat $(builddir)/acats-killer.pid`; \
1541
kill -9 `cat $(builddir)/acats-killer.pid`; \
1542
rm -f $(builddir)/acats-killer.pid; \
1546
: # running the libjava testsuite alone is missing this information
1547
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1549
if [ -x $(srcdir)/contrib/test_summary ]; then \
1550
rm -f test-summary; \
1553
echo '' > ts-include; \
1554
echo '' >> ts-include; \
1555
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1556
echo 'Bootstrap comparison failure:' >> ts-include; \
1557
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1558
echo '' >> ts-include; \
1559
echo '' >> ts-include; \
1561
echo "Build Dependencies:" >> ts-include; \
1562
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1563
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1564
| fgrep -v '<none>' >> ts-include; \
1565
echo '' >> ts-include; \
1566
cat ../$(patch_stamp) >> ts-include; \
1567
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1568
$(srcdir)/contrib/test_summary \
1569
-i ts-include -m "$(S_EMAIL)" \
1570
) > raw-test-summary; \
1571
if [ -n "$(testsuite_tarball)" ]; then \
1572
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1573
echo " Do not interpret the results on its own" >> test-summary; \
1574
echo " but compare them with the results from" >> test-summary; \
1575
echo " the gcc-snapshot package." >> test-summary; \
1577
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1579
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1580
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1581
echo '' >> test-summary; \
1582
cat bootstrap-summary >> test-summary; \
1584
echo 'BEGIN test-summary'; \
1586
echo 'END test-summary'; \
1588
ifeq ($(with_d),yes)
1589
: # the D test failures for the non-default multilibs are known, ignore them
1590
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1591
mv -f test-summary.tmp test-summary
1594
touch $(check_stamp)
1596
$(check_inst_stamp): $(check_stamp)
1597
rm -f test-inst-protocol
1599
ifeq ($(start_logwatch),yes)
1600
: # start logwatch script for regular output during test runs
1601
chmod +x debian/logwatch.sh
1602
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1603
-m '\ntestsuite (3.3) still running ...\n' \
1604
test-inst-protocol \
1605
check-inst/{gcc,g++,g77,objc}.log \
1612
echo "Running testsuite ..."
1616
EXTRA_TEST_PFLAGS=-g0 \
1617
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1618
cd check-inst && $(srcdir)/contrib/test_installed \
1619
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1620
2>&1 | tee test-inst-protocol
1622
-ps aux | fgrep logwatch | fgrep -v fgrep
1623
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1624
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1628
-ps aux | fgrep logwatch | fgrep -v fgrep
1630
-chmod 755 $(srcdir)/contrib/test_summary
1631
if [ -x $(srcdir)/contrib/test_summary ]; then \
1632
rm -f test-inst-summary; \
1635
echo '' > ts-include; \
1636
echo '' >> ts-include; \
1637
echo "Build Dependencies:" >> ts-include; \
1638
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1639
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1640
| fgrep -v '<none>' >> ts-include; \
1641
echo '' >> ts-include; \
1642
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1643
$(srcdir)/contrib/test_summary \
1644
-i ts-include -m "$(S_EMAIL)" \
1645
) > raw-test-inst-summary; \
1646
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1647
>> test-inst-summary; \
1648
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1649
| grep -v EOF >> test-inst-summary; \
1650
echo 'BEGIN test-installed-summary'; \
1651
cat test-inst-summary; \
1652
echo 'END test-installed-summary'; \
1655
chmod 755 debian/reduce-test-diff.awk
1656
if diff -u test-inst-summary test-summary \
1657
| debian/reduce-test-diff.awk > diff-summary; \
1659
mv -f diff-summary testsuite-comparision; \
1662
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1665
) > testsuite-comparision; \
1666
rm -f diff-summary; \
1668
touch $(check_inst_stamp)
1670
clean: debian/control
1673
rm -f *-summary *-protocol testsuite-comparision summary-diff
1674
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1675
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1677
rm -f $(srcdir)/gcc/po/*.gmo
1678
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1679
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1681
[ -f $$f ] || continue; \
1683
| 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$$//'); \
1686
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1687
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1688
rm -f debian/shlibs.local debian/substvars.local
1689
rm -f debian/*.debhelper
1690
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1691
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1692
rm -f debian/lib*gcj-bc.shlibs
1693
rm -rf bin locales share
1697
$(cross_clean) dh_clean
1699
# -----------------------------------------------------------------------------
1700
# some abbrevations for the package names and directories;
1701
# p_XXX is the package name, d_XXX is the package directory
1702
# these macros are only used in the binary-* targets.
1704
ifeq ($(versioned_packages),yes)
1705
pkg_ver := -$(BASE_VERSION)
1708
ifneq ($(DEB_CROSS),yes)
1709
p_base = gcc$(pkg_ver)-base
1710
p_xbase = gcc$(pkg_ver)-base
1711
p_gcc = gcc$(pkg_ver)
1712
p_cpp = cpp$(pkg_ver)
1713
p_cppd = cpp$(pkg_ver)-doc
1714
p_cxx = g++$(pkg_ver)
1715
p_doc = gcc$(pkg_ver)-doc
1716
p_lgcc = libgcc$(GCC_SONAME)
1718
# only triggered if DEB_CROSS set
1719
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1720
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1721
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1723
p_base = gcc$(pkg_ver)-base
1726
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1727
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1728
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1730
p_hppa64 = gcc$(pkg_ver)-hppa64
1733
d_base = debian/$(p_base)
1734
d_xbase = debian/$(p_xbase)
1735
d_gcc = debian/$(p_gcc)
1736
d_cpp = debian/$(p_cpp)
1737
d_cppd = debian/$(p_cppd)
1738
d_cxx = debian/$(p_cxx)
1739
d_doc = debian/$(p_doc)
1740
d_lgcc = debian/$(p_lgcc)
1741
d_hppa64= debian/$(p_hppa64)
1743
d_neon = debian/tmp-neon
1745
common_substvars = \
1746
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1748
ifeq ($(DEB_CROSS),yes)
1749
lib_binaries := indep_binaries
1751
lib_binaries := arch_binaries
1754
# ---------------------------------------------------------------------------
1756
ifeq ($(single_package),yes)
1757
include debian/rules.d/binary-snapshot.mk
1760
ifneq ($(DEB_CROSS),yes)
1761
ifeq ($(with_source),yes)
1762
include debian/rules.d/binary-source.mk
1766
ifneq ($(BACKPORT),true)
1767
ifeq ($(with_gccxbase),yes)
1768
include debian/rules.d/binary-base.mk
1771
ifeq ($(with_gccbase),yes)
1772
include debian/rules.d/binary-base.mk
1775
# always include to get some definitions
1776
include debian/rules.d/binary-libgcc.mk
1778
ifeq ($(with_libqmath),yes)
1779
include debian/rules.d/binary-libquadmath.mk
1782
ifeq ($(with_libgmath),yes)
1783
include debian/rules.d/binary-libgccmath.mk
1786
ifeq ($(with_libgomp),yes)
1787
include debian/rules.d/binary-libgomp.mk
1790
ifeq ($(with_libitm),yes)
1791
include debian/rules.d/binary-libitm.mk
1794
ifeq ($(with_libatomic),yes)
1795
include debian/rules.d/binary-libatomic.mk
1798
ifeq ($(with_libbacktrace),yes)
1799
include debian/rules.d/binary-libbacktrace.mk
1802
ifeq ($(with_cdev),yes)
1803
include debian/rules.d/binary-cpp.mk
1806
ifeq ($(with_fixincl),yes)
1807
include debian/rules.d/binary-fixincl.mk
1810
ifeq ($(with_libssp),yes)
1811
include debian/rules.d/binary-libssp.mk
1814
ifeq ($(with_objcxx),yes)
1815
include debian/rules.d/binary-objcxx.mk
1818
ifeq ($(with_objc),yes)
1819
include debian/rules.d/binary-objc.mk
1820
include debian/rules.d/binary-libobjc.mk
1823
ifeq ($(with_go),yes)
1824
include debian/rules.d/binary-go.mk
1827
# include before cxx
1828
ifeq ($(with_java),yes)
1829
include debian/rules.d/binary-java.mk
1832
ifeq ($(with_cxxdev),yes)
1833
include debian/rules.d/binary-cxx.mk
1835
ifeq ($(with_cxx),yes)
1836
include debian/rules.d/binary-libstdcxx.mk
1839
ifeq ($(with_libasan),yes)
1840
include debian/rules.d/binary-libasan.mk
1843
ifeq ($(with_libtsan),yes)
1844
include debian/rules.d/binary-libtsan.mk
1847
ifeq ($(with_f77),yes)
1848
include debian/rules.d/binary-f77.mk
1851
ifeq ($(with_fortran),yes)
1852
include debian/rules.d/binary-fortran.mk
1855
ifeq ($(with_ada),yes)
1856
include debian/rules.d/binary-ada.mk
1859
ifeq ($(with_d),yes)
1860
include debian/rules.d/binary-d.mk
1863
ifeq ($(with_libnof),yes)
1864
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1865
include debian/rules.d/binary-nof.mk
1869
ifeq ($(with_softfloat),yes)
1870
include debian/rules.d/binary-softfloat.mk
1873
# gcc must be moved/built after g77 and g++
1874
ifeq ($(with_cdev),yes)
1875
include debian/rules.d/binary-gcc.mk
1878
ifeq ($(with_hppa64),yes)
1879
include debian/rules.d/binary-hppa64.mk
1882
ifeq ($(with_neon),yes)
1883
include debian/rules.d/binary-neon.mk
1888
endif # ($(single_package),yes)
1890
# ----------------------------------------------------------------------
1891
install: $(install_dependencies)
1893
$(install_dummy_stamp): $(build_dummy_stamp)
1894
touch $(install_dummy_stamp)
1896
$(install_snap_stamp): $(build_dependencies)
1901
: # Install directories
1905
ifeq ($(with_hppa64),yes)
1908
$(MAKE) -C $(builddir_hppa64) \
1911
$(LDFLAGS_TO_PASS) \
1912
DESTDIR=$(PWD)/$(d) \
1915
ls -l $(d)/$(PF)/bin
1916
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1917
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1919
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1922
for i in ar nm ranlib; do \
1923
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1926
: # remove files not needed from the hppa64 build
1927
rm -rf $(d)/$(PF)/share/info
1928
rm -rf $(d)/$(PF)/share/man
1929
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1930
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1932
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1933
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1935
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1938
README|features.h|syslimits.h|limits.h) ;; \
1939
linux|$(TARGET_ALIAS)) ;; \
1940
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1941
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1946
: # Work around PR lto/41569
1947
ln -sf gcc $(builddir)/prev-gcc
1948
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1950
: # Install everything
1953
$(MAKE) -C $(builddir) \
1955
$(LDFLAGS_TO_PASS) \
1956
DESTDIR=$(PWD)/$(d) \
1957
infodir=/$(PF)/share/info \
1958
mandir=/$(PF)/share/man \
1961
ls -l $(d)/$(PF)/bin
1962
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1963
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1965
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1968
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1971
README|features.h|syslimits.h|limits.h) ;; \
1972
linux|$(TARGET_ALIAS)) ;; \
1973
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1974
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1978
ifneq ($(configured_libdir),$(libdir))
1979
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1980
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1981
$(d)/$(PF)/$(libdir)/. || true; \
1982
mv $(d)/$(PF)/libo32/$$i \
1983
$(d)/$(PF)/lib/. || true; \
1987
# FIXME: libjava/classpath not correctly patched
1988
ifeq ($(with_java),yes)
1989
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1990
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1991
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1992
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1993
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1996
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1998
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1999
$(d)/$(gcc_lib_dir)/libgcj_bc.so
2000
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
2001
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
2002
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
2003
$(srcdir)/libjava/libgcj_bc.c \
2004
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
2005
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
2009
if [ -d $(d)/usr/man/man1 ]; then \
2010
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
2013
chmod 755 debian/dh_*
2014
touch $(install_snap_stamp)
2016
$(install_stamp): $(build_stamp)
2019
dh_clean -k -N$(p_hppa64)
2021
if [ -f $(binary_stamp)-hppa64 ]; then \
2022
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
2024
rm -f $(binary_stamp)*
2025
if [ -f saved-stamp-hppa64 ]; then \
2026
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
2029
: # Install directories
2031
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
2032
ifeq ($(biarch32),yes)
2033
mkdir -p $(d)/$(PF)/$(lib32loc)/debug
2035
ifeq ($(biarch64),yes)
2036
mkdir -p $(d)/$(PF)/lib64/debug
2038
ifeq ($(biarchn32),yes)
2039
mkdir -p $(d)/$(PF)/$(libn32)/debug
2041
ifeq ($(biarchx32),yes)
2042
mkdir -p $(d)/$(PF)/libx32/debug
2045
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
2046
ifneq ($(DEB_TARGET_ARCH),x32)
2047
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
2048
: # (this works when CONFARGS contains '--disable-multilib')
2049
ln -s $(configured_libdir) $(d)/lib64
2050
mkdir -p $(d)/$(PF)/$(configured_libdir)
2051
ln -s $(configured_libdir) $(d)/$(PF)/lib64
2054
ifeq ($(DEB_TARGET_ARCH),x32)
2055
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
2056
ln -s $(configured_libdir) $(d)/libx32
2057
mkdir -p $(d)/$(PF)/$(configured_libdir)
2058
ln -s $(configured_libdir) $(d)/$(PF)/libx32
2061
: # Work around PR lto/41569
2062
ln -sf gcc $(builddir)/prev-gcc
2064
: # Install everything
2067
$(MAKE) -C $(builddir) \
2069
$(LDFLAGS_TO_PASS) \
2070
DESTDIR=$(PWD)/$(d) \
2071
infodir=/$(PF)/share/info \
2072
mandir=/$(PF)/share/man \
2075
ifneq ($(configured_libdir),$(libdir))
2076
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
2077
mv $(d)/$(PF)/$(configured_libdir)/$$i \
2078
$(d)/$(PF)/$(libdir)/. || true; \
2079
mv $(d)/$(PF)/libo32/$$i \
2080
$(d)/$(PF)/lib/. || true; \
2084
ifeq ($(with_libcxxdbg),yes)
2085
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2086
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2087
[ -f $$i ] || continue; \
2088
d=$$(dirname $$i); \
2089
b=$$(basename $$i); \
2090
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2095
# FIXME: libjava/classpath not correctly patched
2096
ifeq ($(with_java),yes)
2097
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2098
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2099
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2100
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2101
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2105
: # remove rpath settings from binaries and shared libs
2106
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2107
$(if $(filter $(with_multiarch_lib),yes), \
2108
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2109
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2110
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2112
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2113
[ -h $$i ] && continue; \
2114
chrpath --delete $$i; \
2115
echo "removed RPATH: $$i"; \
2118
: # remove '*.la' and '*.lai' files, not shipped in any package.
2119
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2121
ifneq ($(with_libgnat),yes)
2122
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2125
ifeq ($(GFDL_INVARIANT_FREE),yes)
2126
for i in gcc gcov; do \
2127
I=`echo $$i | tr a-z A-Z`; \
2128
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2129
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2132
ifeq ($(with_fortran),yes)
2134
I=`echo $$i | tr a-z A-Z`; \
2135
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2136
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2139
ifeq ($(with_java),yes)
2140
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2142
I=`echo $$i | tr a-z A-Z`; \
2143
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2144
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2149
# ifeq ($(with_ada),yes)
2150
# : # rename files (versioned ada binaries)
2152
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2153
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2154
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2156
# for i in $(GNAT_TOOLS); do \
2157
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2161
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2162
ifneq ($(DEB_STAGE),stage1)
2163
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2164
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2165
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2166
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2168
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2169
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2170
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2171
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2176
for i in ar nm ranlib; do \
2177
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2180
chmod 755 debian/dh_*
2182
# tar cf tmp.tar debian/tmp
2184
touch $(install_stamp)
2186
$(install_hppa64_stamp): $(build_hppa64_stamp)
2190
mkdir -p $(d_hppa64)/$(PF)
2193
$(MAKE) -C $(builddir_hppa64) \
2196
$(LDFLAGS_TO_PASS) \
2197
DESTDIR=$(PWD)/$(d_hppa64) \
2200
ifeq ($(versioned_packages),yes)
2201
for i in cpp gcc-ar gcc-nm gcc-ranlib; do \
2202
mv -f $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i \
2203
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-$$i$(pkg_ver); \
2207
ifneq ($(single_package),yes)
2208
: # remove files not needed
2209
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2210
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2211
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2212
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2213
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2215
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2216
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2217
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2220
touch $(install_hppa64_stamp)
2222
$(install_neon_stamp): $(build_neon_stamp)
2226
mkdir -p $(d_neon)/$(PF)
2229
$(MAKE) -C $(builddir_neon) \
2232
$(LDFLAGS_TO_PASS) \
2233
DESTDIR=$(PWD)/$(d_neon) \
2235
touch $(install_neon_stamp)
2237
# ----------------------------------------------------------------------
2238
# Build architecture-dependent files here.
2239
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2240
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2241
ifeq ($(with_check),yes)
2243
# : # Send Email about sucessfull build.
2244
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2247
# ----------------------------------------------------------------------
2248
# Build architecture-independent files here.
2249
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2250
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2253
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2255
binary: binary-indep binary-arch
2256
.PHONY: build clean binary-indep binary-arch binary