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-kfreebsd-gnu s390x-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
361
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
362
CONFARGS += --enable-secureplt
363
ifeq ($(biarch32),yes)
364
ifeq ($(multilib),yes)
365
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
368
CONFARGS += --disable-multilib
370
ifeq ($(derivative),Ubuntu)
371
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
375
ifeq ($(REVERSE_CROSS),yes)
376
# FIXME: requires isl and cloog headers for the target
377
#CONFARGS += --without-isl
378
# FIXME: build currently fails build the precompiled headers
379
CONFARGS += --disable-libstdcxx-pch
382
ifeq ($(with_multiarch_lib),yes)
383
CONFARGS += --enable-multiarch
386
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
387
CONFARGS += --with-cpu=8548 --enable-e500_double
390
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
391
CONFARGS += --with-float=soft
394
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
395
CONFARGS += --with-fpu=vfp
398
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
399
ifeq ($(multilib),yes)
400
CONFARGS += --enable-multilib
402
CONFARGS += --disable-sjlj-exceptions
403
# FIXME: libjava is not ported for thumb, this hack only works for
404
# separate gcj builds
405
ifneq (,$(filter armhf,$(DEB_TARGET_ARCH)))
406
ifeq ($(distribution),Raspbian)
407
with_arm_arch = armv6
410
ifneq (,$(findstring gcj,$(PKGSOURCE)))
411
with_arm_arch = armv6
413
with_arm_arch = armv7-a
415
with_arm_fpu = vfpv3-d16
419
ifeq ($(derivative),Debian)
420
with_arm_arch = armv4t
421
else ifneq (,$(filter $(distrelease),karmic))
422
with_arm_arch = armv6
423
with_arm_fpu = vfpv3-d16
424
else ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise))
425
ifneq (,$(findstring gcj,$(PKGSOURCE)))
426
with_arm_arch = armv6
428
with_arm_arch = armv7-a
430
with_arm_fpu = vfpv3-d16
432
with_arm_arch = armv5t # starting with quantal
435
CONFARGS += --with-arch=$(with_arm_arch)
436
ifneq (,$(with_arm_fpu))
437
CONFARGS += --with-fpu=$(with_arm_fpu)
439
CONFARGS += --with-float=$(float_abi)
440
ifeq ($(with_arm_thumb),yes)
441
CONFARGS += --with-mode=thumb
445
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
446
CONFARGS += --disable-werror
448
# FIXME: correct fix-warnings.dpatch
449
ifeq ($(derivative),Ubuntu)
450
CONFARGS += --disable-werror
453
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
454
ifeq ($(biarch64),yes)
455
CONFARGS += --enable-targets=all
459
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
460
ifeq ($(biarch32),yes)
461
CONFARGS += --enable-targets=all
465
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
466
CONFARGS += --with-system-libunwind
469
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
470
ifeq ($(multilib),yes)
471
CONFARGS += --with-multilib-list=m4,m4-nofpu
473
CONFARGS += --with-cpu=sh4
476
ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
477
CONFARGS += --disable-multilib
480
ifeq ($(DEB_TARGET_ARCH_OS),linux)
481
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
482
CONFARGS += --with-long-double-128
486
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
487
ifneq (,$(filter $(derivative),Ubuntu))
488
ifneq (,$(filter $(distrelease),dapper hardy))
489
CONFARGS += --with-arch-32=i486
490
else ifneq (,$(filter $(distrelease),jaunty karmic lucid))
491
CONFARGS += --with-arch-32=i586
493
CONFARGS += --with-arch-32=i686
496
ifneq (,$(filter $(distrelease),etch lenny))
497
CONFARGS += --with-arch-32=i486
499
CONFARGS += --with-arch-32=i586
504
ifeq ($(DEB_TARGET_ARCH),amd64)
505
CONFARGS += --with-abi=m64
507
ifeq ($(multilib),yes)
508
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386))
509
CONFARGS += --with-multilib-list=m32,m64$(if $(filter yes,$(biarchx32)),$(COMMA)mx32)
510
else ifeq ($(DEB_TARGET_ARCH),x32)
511
CONFARGS += --with-abi=mx32 --with-multilib-list=mx32,m64,m32
515
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
516
CONFARGS += --with-arch=i586
519
ifeq ($(DEB_TARGET_ARCH),lpia)
520
CONFARGS += --with-arch=pentium-m --with-tune=i586
523
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
524
CONFARGS += --with-tune=generic
527
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
528
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
529
ifeq ($(multilib),yes)
530
ifeq ($(biarchn32)-$(biarch64),yes-yes)
531
CONFARGS += --enable-targets=all
532
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
537
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
538
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
539
ifeq ($(multilib),yes)
540
ifeq ($(biarchn32)-$(biarch64),yes-yes)
541
CONFARGS += --enable-targets=all
542
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
547
#FIXME: howto for mipsn32?
548
ifneq (,$(findstring mips64el-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
549
CONFARGS += --with-mips-plt
550
ifeq ($(multilib),yes)
551
ifeq ($(biarchn32)-$(biarch32),yes-yes)
552
CONFARGS += --enable-targets=all
553
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=loongson3a
554
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
559
ifneq (,$(findstring mips64-linux-gnuabin32,$(DEB_TARGET_GNU_TYPE)))
560
CONFARGS += --with-mips-plt
561
ifeq ($(multilib),yes)
562
ifeq ($(biarchn32)-$(biarch32),yes-yes)
563
CONFARGS += --enable-targets=all
564
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
565
CONFARGS += --with-arch-32=mips32 --with-tune-32=mips32r2
570
ifneq (,$(findstring mips64el-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
571
CONFARGS += --with-mips-plt
572
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=loongson3a
573
ifeq ($(multilib),yes)
574
ifeq ($(biarchn32)-$(biarch32),yes-yes)
575
CONFARGS += --enable-targets=all
576
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
581
ifneq (,$(findstring mips64-linux-gnuabi64,$(DEB_TARGET_GNU_TYPE)))
582
CONFARGS += --with-mips-plt
583
CONFARGS += --with-arch-64=mips64r2 --with-tune-64=octeon+
584
ifeq ($(multilib),yes)
585
ifeq ($(biarchn32)-$(biarch32),yes-yes)
586
CONFARGS += --enable-targets=all
587
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
592
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
593
ifeq ($(multilib),yes)
594
ifeq ($(biarch64),yes)
595
CONFARGS += --enable-targets=all
600
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
601
CONFARGS += --disable-libstdcxx-pch
604
ifneq (,$(findstring gdc, $(PKGSOURCE)))
605
CONFARGS += --disable-libquadmath
608
ifeq ($(trunk_build),yes)
609
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
610
CONFARGS += --disable-werror
612
CONFARGS += --enable-checking=yes
614
CONFARGS += --enable-checking=release
618
--build=$(DEB_BUILD_GNU_TYPE) \
619
--host=$(DEB_HOST_GNU_TYPE) \
620
--target=$(TARGET_ALIAS)
622
ifeq ($(DEB_CROSS),yes)
624
--program-prefix=$(TARGET_ALIAS)-
625
ifneq ($(with_deps_on_target_arch_pkgs),yes)
627
--includedir=/$(PFL)/include
631
ifeq ($(with_bootstrap),off)
633
else ifeq ($(with_bootstrap),)
634
bootstrap_target = bootstrap-lean
635
# no profiledbootstrap on the following architectures
636
# - m68k: we're happy that it builds at all
637
no_profiled_bs_archs := alpha arm arm64 hppa m68k
638
ifeq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
639
bootstrap_target = profiledbootstrap
640
# FIXME: disabled for first uploads
641
bootstrap_target = bootstrap-lean
643
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
644
bootstrap_target = bootstrap-lean
646
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
647
bootstrap_target = bootstrap-lean
650
# disable profiled bootstrap on slow archs, get to testing first ...
651
ifeq ($(derivative),Debian)
652
ifneq (,$(filter $(DEB_TARGET_ARCH), arm arm64 armel armhf mips mipsel sparc))
653
bootstrap_target = bootstrap-lean
656
ifeq ($(derivative),Ubuntu)
657
ifneq (,$(filter $(DEB_TARGET_ARCH), arm64 sparc))
658
bootstrap_target = bootstrap-lean
664
# Increase the timeout for one testrun on slow architectures
665
ifeq ($(derivative),Debian)
666
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm arm64 armel armhf hppa m68k sparc))
668
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
671
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
674
else ifeq ($(derivative),Ubuntu)
675
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm64 armel armhf hppa ia64 sparc))
677
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
683
ifneq ($(trunk_build),yes)
684
ifeq ($(with_ssp),yes)
685
ifneq ($(single_package),yes)
686
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
688
# FIXME Ubuntu armel buildd hangs
689
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
692
ifeq ($(derivative),Ubuntu)
693
# the buildds are just slow ... don't check the non-default
694
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
701
ifeq ($(derivative),Ubuntu)
702
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
703
ifeq ($(with_arm_thumb),yes)
704
#DEJAGNU_RUNS += -marm
706
DEJAGNU_RUNS += -mthumb
711
# no b-d on g++-multilib, this is run by the built compiler
712
abi_run_check = $(strip $(if $(wildcard build/runcheck$(1).out), \
713
$(shell cat build/runcheck$(1).out), \
714
$(shell CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -static-libgcc $(1)" bash debian/runcheck.sh)))
715
ifeq ($(biarch32),yes)
716
DEJAGNU_RUNS += $(call abi_run_check,-m32)
718
ifeq ($(biarch64),yes)
719
DEJAGNU_RUNS += $(call abi_run_check,$(if $(filter $(DEB_TARGET_ARCH_CPU),mips mipsel),-mabi=64,-m64))
721
ifeq ($(biarchn32),yes)
722
DEJAGNU_RUNS += $(call abi_run_check,-mabi=n32)
724
ifeq ($(biarchx32),yes)
725
DEJAGNU_RUNS += $(call abi_run_check,-mx32)
728
# gdc is not multilib'd
729
ifneq (,$(findstring gdc, $(PKGSOURCE)))
733
ifneq (,$(findstring gcj, $(PKGSOURCE)))
738
ifneq (,$(findstring gnat, $(PKGSOURCE)))
742
ifneq (,$(strip $(value DEJAGNU_RUNS)))
743
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
746
# PF is the installation prefix for the package without the leading slash.
747
# It's "usr" for gcc releases.
749
# use value set in the environment
750
else ifeq ($(trunk_build),yes)
751
PF = usr/lib/gcc-snapshot
752
else ifeq ($(PKGSOURCE),gcc-linaro)
753
PF = usr/lib/gcc-linaro
758
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
759
ifeq ($(DEB_CROSS),yes)
760
ifneq ($(with_deps_on_target_arch_pkgs),yes)
761
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
769
# RPF is the base prefix or 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
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
780
ifeq ($(with_multiarch_lib),yes)
781
ifeq ($(DEB_CROSS),yes)
782
ifneq ($(with_deps_on_target_arch_pkgs),yes)
785
libdir = lib/$(DEB_TARGET_MULTIARCH)
788
libdir = lib/$(DEB_TARGET_MULTIARCH)
793
configured_libdir = lib
795
hppa64libexecdir= $(PF)/lib
797
# /usr/libexec doesn't follow the FHS
798
ifeq ($(single_package),yes)
800
libexecdir = $(PF)/libexec
801
versiondir = $(GCC_VERSION)
803
libexecdir = $(PF)/$(configured_libdir)
804
versiondir = $(BASE_VERSION)
806
buildlibdir = $(builddir)/$(TARGET_ALIAS)
808
# install cross compilers in /usr/lib/gcc-cross, native ones in /usr/lib/gcc
809
gcc_subdir_name = gcc
810
ifneq ($(single_package),yes)
811
ifeq ($(DEB_CROSS),yes)
812
ifneq ($(with_deps_on_target_arch_pkgs),yes)
813
gcc_subdir_name = gcc-cross
818
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
819
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
822
ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
825
lib32 = $(PF)/$(lib32loc)
830
p_l= $(1)$(cross_lib_arch)
831
p_d= $(1)-dbg$(cross_lib_arch)
835
ifeq ($(DEB_CROSS),yes)
836
ifneq ($(with_deps_on_target_arch_pkgs),yes)
839
# sh4 has multilib. base is sh4-linux-gnu. See #663028.
840
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
841
usr_lib = $(PFL)/lib/sh4-linux-gnu/
844
usr_lib = $(PFL)/$(libdir)
847
usr_lib = $(PFL)/$(libdir)
849
usr_lib32 = $(PFL)/$(lib32loc)
850
usr_libn32 = $(PFL)/lib32
851
usr_libx32 = $(PFL)/libx32
852
usr_lib64 = $(PFL)/lib64
853
# FIXME: Move to the new location for native builds too
854
ifeq ($(DEB_CROSS),yes)
855
usr_libhf = $(PFL)/libhf
856
usr_libsf = $(PFL)/libsf
858
usr_libhf = $(PFL)/lib/arm-linux-gnueabihf
859
usr_libsf = $(PFL)/lib/arm-linux-gnueabi
862
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
863
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
864
gcc_lib_dirx32 = $(gcc_lib_dir)/$(biarchx32subdir)
865
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
866
gcc_lib_dirhf = $(gcc_lib_dir)/$(biarchhfsubdir)
867
gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
869
libgcc_dir = $(RPF)/$(libdir)
870
# yes, really; lib32gcc_s ends up in usr
871
libgcc_dir32 = $(PFL)/$(lib32loc)
872
libgcc_dirn32 = $(RPF)/lib32
873
# libx32gcc_s also ends up in usr
874
libgcc_dirx32 = $(PFL)/libx32
875
libgcc_dir64 = $(RPF)/lib64
876
# FIXME: Move to the new location for native builds too
877
ifeq ($(DEB_CROSS),yes)
878
libgcc_dirhf = $(RPF)/libhf
879
libgcc_dirsf = $(RPF)/libsf
881
libgcc_dirhf = $(RPF)/lib/arm-linux-gnueabihf
882
libgcc_dirsf = $(RPF)/lib/arm-linux-gnueabi
885
# install_gcc_lib(lib,soname,flavour,package)
886
define install_gcc_lib
887
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
888
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
890
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
894
checkdirs = $(builddir)
895
ifeq ($(with_separate_libgcj),yes)
896
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
897
ifneq ($(with_standalone_gcj),yes)
898
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
902
ifeq ($(with_separate_go),yes)
903
ifeq ($(PKGSOURCE),gccgo-$(BASE_VERSION))
904
checkdirs = $(buildlibdir)/libgo
907
ifeq ($(with_separate_gnat),yes)
908
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
909
checkdirs = $(builddir)/gcc
913
ifneq ($(DEB_CROSS),yes)
914
ifneq ($(single_package),yes)
915
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
917
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
920
ifeq ($(with_deps_on_target_arch_pkgs),yes)
921
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
923
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
927
# FIXME: MULTIARCH_DIRNAME needed for g++-multiarch-incdir.diff
928
MULTIARCH_DIRNAME := $(DEB_TARGET_MULTIARCH)
929
export MULTIARCH_DIRNAME
933
configure: $(configure_dependencies)
935
$(configure_dummy_stamp):
936
touch $(configure_dummy_stamp)
940
: # give information about the build process
941
@echo "------------------------ Build process variables ------------------------"
942
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
943
@echo "Package source: $(PKGSOURCE)"
944
@echo "GCC version: $(GCC_VERSION)"
945
@echo "Base Debian version: $(BASE_VERSION)"
946
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
947
ifeq ($(DEB_CROSS),yes)
948
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
950
@echo "Using shell $(SHELL)"
951
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
952
@echo "CPPFLAGS: $(CPPFLAGS)"
953
@echo "CFLAGS: $(CFLAGS)"
954
@echo "LDFLAGS: $(LDFLAGS)"
955
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
956
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
957
@echo "Install prefix: /$(PF)"
958
ifeq ($(biarchn32)-$(biarch64),yes-yes)
959
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
960
else ifeq ($(biarchn32)-$(biarch32),yes-yes)
961
@echo "Will build the triarch compilers (o32/n32/64, defaulting to 64)"
962
else ifeq ($(biarch64)-$(biarch32),yes-yes)
963
@echo "Will build the triarch compilers (x32/64/32, defaulting to x32)"
964
else ifeq ($(biarch64)-$(biarchx32),yes-yes)
965
@echo "Will build the triarch compilers (32/64/x32, defaulting to 32bit)"
966
else ifeq ($(biarch32)-$(biarchx32),yes-yes)
967
@echo "Will build the triarch compilers (64/32/x32, defaulting to 64bit)"
969
ifeq ($(biarch64),yes)
970
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
972
ifeq ($(biarch32),yes)
973
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
975
@echo "Will not build the biarch compilers"
980
ifeq ($(with_cxx),yes)
981
@echo "Will build the C++ compiler"
983
@echo "Will not build the C++ compiler: $(with_cxx)"
985
ifeq ($(with_objc),yes)
986
@echo "Will build the ObjC compiler."
987
ifeq ($(with_objc_gc),yes)
988
@echo "Will build the extra ObjC runtime for garbage collection."
990
@echo "Will not build the extra ObjC runtime for garbage collection."
993
@echo "Will not build the ObjC compiler: $(with_objc)"
995
ifeq ($(with_objcxx),yes)
996
@echo "Will build the Obj-C++ compiler"
998
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
1000
ifeq ($(with_fortran),yes)
1001
@echo "Will build the Fortran 95 compiler."
1003
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
1005
ifeq ($(with_java),yes)
1006
@echo "Will build the Java compiler."
1008
@echo "Will not build the Java compiler: $(with_java)"
1010
ifeq ($(with_ada),yes)
1011
@echo "Will build the Ada compiler."
1012
ifeq ($(with_libgnat),yes)
1013
@echo "Will build the shared Ada libraries."
1015
@echo "Will not build the shared Ada libraries."
1018
@echo "Will not build the Ada compiler: $(with_ada)"
1020
ifeq ($(with_go),yes)
1021
@echo "Will build the Go compiler."
1023
@echo "Will not build the Go compiler: $(with_go)"
1025
ifeq ($(with_d),yes)
1026
@echo "Will build the D compiler"
1027
ifeq ($(with_libphobos),yes)
1028
@echo "Will build the phobos D runtime library."
1030
@echo "Will not build the phobos D runtime library: $(with_libphobos)"
1033
@echo "Will not build the D compiler: $(with_d)"
1035
ifeq ($(with_ssp),yes)
1036
@echo "Will build with SSP support."
1038
@echo "Will build without SSP support: $(with_ssp)"
1040
ifeq ($(with_check),yes)
1041
@echo "Will run the testsuite."
1043
@echo "Will not run the testsuite: $(with_check)"
1045
ifeq ($(with_nls),yes)
1046
@echo "Will enable national language support."
1048
@echo "Will disable national language support: $(with_nls)"
1050
@echo "-----------------------------------------------------------------------------"
1052
ifeq ($(with_check),yes)
1053
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
1056
echo "expect is failing on your system with the above error, which means the GCC"; \
1057
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
1058
echo "-----------------------------------------------------------------------------"; \
1062
rm -f $(configure_stamp) $(build_stamp)
1063
cat debian/README.Debian $(patch_stamp) > debian/README.Debian.$(DEB_TARGET_ARCH)
1073
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
1074
../src/configure $(subst ___, ,$(CONFARGS))
1076
: # multilib builds without b-d on gcc-multilib (used in FLAGS_FOR_TARGET)
1077
if [ -d /usr/include/$(DEB_TARGET_MULTIARCH)/asm ]; then \
1078
mkdir -p $(builddir)/sys-include; \
1079
ln -sf /usr/include/$(DEB_TARGET_MULTIARCH)/asm $(builddir)/sys-include/asm; \
1082
touch $(configure_stamp)
1084
build: $(build_dependencies)
1086
$(build_dummy_stamp):
1087
touch $(build_dummy_stamp)
1089
$(build_locale_stamp):
1090
ifeq ($(locale_data)-$(with_cxx),generate-yes)
1091
: # build locales needed by libstdc++ testsuite
1094
- sh debian/locale-gen
1096
touch $(build_locale_stamp)
1099
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
1101
rm -f bootstrap-protocol
1102
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
1104
ifeq ($(DEB_CROSS),yes)
1105
: # build cross compiler for $(TARGET_ALIAS)
1110
$(MAKE) -C $(builddir) $(NJOBS) \
1113
$(LDFLAGS_TO_PASS) \
1115
echo $$? > status; \
1116
) 2>&1 | tee bootstrap-protocol
1117
s=`cat status`; rm -f status; test $$s -eq 0
1119
# REVERSE_CROSS build
1120
ifeq ($(REVERSE_CROSS),yes)
1121
: # build cross compiler for $(TARGET_ALIAS)
1126
$(MAKE) -C $(builddir) $(NJOBS) \
1129
$(LDFLAGS_TO_PASS) \
1131
echo $$? > status; \
1132
) 2>&1 | tee bootstrap-protocol
1133
s=`cat status`; rm -f status; test $$s -eq 0
1136
ifeq ($(with_java),yes)
1138
ln -sf /usr/bin/fastjar bin/jar
1139
ifeq ($(with_native_ecj),yes)
1140
: # prepare the standalone ecj jar
1141
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
1142
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
1144
ifeq ($(with_java_maintainer_mode),yes)
1147
echo 'exec gij-4.8 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
1150
: # If we don't have gjavah in PATH, try to build it with the old gij
1152
if [ -x /usr/bin/gjavah-4.8 ]; then \
1153
ln -sf /usr/bin/gjavah-4.8 bin/gjavah; \
1154
elif [ -x bin/gjavah ]; then \
1157
mkdir -p $(builddir)/java_hacks; \
1158
cd $(builddir)/java_hacks; \
1159
cp -a $(srcdir)/libjava/classpath/tools/external external; \
1160
mkdir -p gnu/classpath/tools; \
1161
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
1162
gnu/classpath/tools/; \
1163
cp -a $(srcdir)/libjava/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties \
1164
gnu/classpath/tools/common; \
1166
for i in `find . -name \*.java`; do gcj-4.8 --encoding ISO-8859-1 -C $$i -I.; done; \
1168
for i in `find gnu -name \*.java`; do gcj-4.8 -C $$i -I. -Iexternal/asm/; done; \
1169
gcj-4.8 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
1170
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
1173
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
1174
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
1175
) > $(PWD)/bin/gjavah; \
1176
chmod +x $(PWD)/bin/gjavah; \
1180
: # build native compiler
1186
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
1189
$(STAGE1_CFLAGS_TO_PASS) \
1190
$(LDFLAGS_TO_PASS) \
1192
echo $$? > status; \
1193
) 2>&1 | tee bootstrap-protocol
1194
s=`cat status`; rm -f status; test $$s -eq 0
1197
-chmod 755 $(srcdir)/contrib/warn_summary
1198
if [ -x $(srcdir)/contrib/warn_summary ]; then \
1199
rm -f bootstrap-summary; \
1200
$(srcdir)/contrib/warn_summary bootstrap-protocol \
1201
> bootstrap-summary; \
1204
touch $(build_stamp)
1206
ifeq ($(versioned_packages),yes)
1207
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
1210
ifeq ($(DEB_CROSS),yes)
1211
CC_for_hppa64_cross = $(CC)
1213
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
1216
$(configure_hppa64_stamp): $(build_stamp)
1218
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
1219
rm -rf $(builddir_hppa64)
1220
mkdir $(builddir_hppa64)
1222
cd $(builddir_hppa64) && \
1225
CC="$(CC_for_hppa64_cross)" \
1227
--enable-languages=c \
1229
--libexecdir=/$(hppa64libexecdir) \
1233
--disable-libatomic \
1236
--disable-libmudflap \
1238
--disable-libquadmath \
1240
--with-system-zlib \
1241
--with-as=/usr/bin/hppa64-linux-gnu-as \
1242
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1243
--includedir=/usr/hppa64-linux-gnu/include \
1244
--build=$(DEB_BUILD_GNU_TYPE) \
1245
--host=$(DEB_HOST_GNU_TYPE) \
1246
--target=hppa64-linux-gnu
1247
touch $(configure_hppa64_stamp)
1249
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1253
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1254
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1255
CC="$(CC_for_hppa64_cross)" \
1258
touch $(build_hppa64_stamp)
1260
$(configure_neon_stamp): $(build_stamp)
1262
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1263
rm -rf $(builddir_neon)
1264
mkdir $(builddir_neon)
1266
cd $(builddir_neon) && \
1269
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1271
--disable-bootstrap \
1272
--enable-languages=c,c++,objc,fortran \
1274
--libexecdir=/$(libexecdir) \
1275
--program-suffix=-$(BASE_VERSION) \
1278
--disable-libmudflap \
1279
--with-arch=armv7-a --with-tune=cortex-a8 \
1280
--with-float=$(float_abi) --with-fpu=neon \
1281
--host=arm-linux-gnueabi \
1282
--build=arm-linux-gnueabi \
1283
--target=arm-linux-gnueabi
1284
touch $(configure_neon_stamp)
1286
$(build_neon_stamp): $(configure_neon_stamp)
1290
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1291
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1294
touch $(build_neon_stamp)
1298
$(srcdir)/gcc/doc/cpp.texi \
1299
$(srcdir)/gcc/doc/cppinternals.texi \
1300
$(srcdir)/gcc/doc/gcc.texi \
1301
$(srcdir)/gcc/doc/gccint.texi
1302
ifeq ($(with_fortran),yes)
1303
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1305
ifeq ($(with_java),yes)
1306
MANUALS += $(srcdir)/gcc/java/gcj.texi
1308
ifeq ($(with_ada),yes)
1310
$(builddir)/gcc/doc/gnat_ugn.texi \
1311
$(srcdir)/gcc/ada/gnat_rm.texi \
1312
$(srcdir)/gcc/ada/gnat-style.texi
1314
ifeq ($(with_gomp),yes)
1315
MANUALS += $(srcdir)/libgomp/libgomp.texi
1317
ifeq ($(with_itm),yes)
1318
MANUALS += $(srcdir)/libitm/libitm.texi
1320
ifeq ($(with_qmath),yes)
1321
MANUALS += $(srcdir)/libquadmath/libquadmath.texi
1323
ifeq ($(with_go),yes)
1324
MANUALS += $(srcdir)/gcc/go/gccgo.texi
1327
html-docs: $(build_html_stamp)
1328
#$(build_html_stamp): html-texi2html
1329
#$(build_html_stamp): html-makeinfo
1330
$(build_html_stamp): html-makeinfo-nosplit
1333
rm -rf html $(builddir)/gcc/html
1334
mkdir $(builddir)/gcc/html
1335
ln -s $(builddir)/gcc/html html
1336
cd $(builddir)/gcc; \
1337
for manual in $(MANUALS); do \
1338
outname=`basename $${manual} .texi`; \
1339
echo "generating $$outname ..."; \
1340
texi2html -number -split chapter \
1341
-I $(srcdir)/gcc/doc/include \
1342
-I $(srcdir)/gcc/p/doc \
1343
-I $(srcdir)/gcc/p/doc/generated \
1344
-I `dirname $${manual}` \
1345
-I $(builddir)/gcc \
1346
-I $(buildlibdir)/libquadmath \
1354
cd $(builddir)/gcc; \
1355
for manual in $(MANUALS); do \
1356
manual=`find $(srcdir) -name $${file}.texi`; \
1357
outname=`basename $${manual} .texi`; \
1358
echo "generating $$outname ..."; \
1359
if [ "$${manual}" ]; then \
1360
makeinfo --html --number-sections \
1361
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1362
-I $(srcdir)/gcc/p/doc \
1363
-I $(srcdir)/gcc/p/doc/generated \
1364
-I $(builddir)/gcc \
1365
-I $(buildlibdir)/libquadmath \
1371
html-makeinfo-nosplit:
1374
cd $(builddir)/gcc; \
1375
for manual in $(MANUALS); do \
1376
outname=`basename $${manual} .texi`.html; \
1377
echo "generating $$outname ..."; \
1378
makeinfo --html --number-sections --no-split \
1379
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1380
-I $(srcdir)/gcc/p/doc \
1381
-I $(srcdir)/gcc/p/doc/generated \
1382
-I $(builddir)/gcc \
1383
-I $(buildlibdir)/libquadmath \
1384
-o $(PWD)/html/$${outname} \
1388
# start the script only on architectures known to have slow autobuilders ...
1389
logwatch_archs := alpha arm m68k mips mipsel sparc
1390
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1391
start_logwatch = yes
1393
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1394
start_logwatch = yes
1397
stamps/mauve-build: stamps/build
1400
ifeq ($(with_mauve_check),yes)
1401
tar xf $(wildcard /usr/src/mauve*.tar.*)
1406
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1407
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1411
stamps/mauve-check: stamps/build stamps/mauve-build
1412
ifeq ($(with_mauve_check),yes)
1414
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1415
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1416
xvfb-run -s "-extension GLX" java Harness \
1417
-vm $(CURDIR)/$(sdkimg)/bin/java \
1418
-file $(CURDIR)/debian/mauve_tests \
1419
-timeout 30000 2>&1 \
1423
echo "mauve testsuite not run for this build" > mauve/mauve_output
1427
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1428
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1430
rm -f $(builddir)/runcheck*
1432
-chmod 755 $(srcdir)/contrib/test_summary
1434
: # needed for the plugin tests to succeed
1435
ln -sf gcc $(builddir)/prev-gcc
1436
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1438
ifneq ($(with_common_libs),yes)
1439
ifeq ($(with_cxx),yes)
1440
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1442
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1443
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1446
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1447
echo "Running testsuite in $$d ..."; \
1452
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1454
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1455
done 2>&1 | tee test-protocol2
1457
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1458
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1460
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1461
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1462
) > libstdc++-test-summary
1463
echo 'BEGIN installed libstdc++-v3 test-summary'
1464
cat libstdc++-test-summary
1465
echo 'END installed libstdc++-v3 test-summary'
1466
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1471
ifeq ($(start_logwatch),yes)
1472
: # start logwatch script for regular output during test runs
1473
chmod +x debian/logwatch.sh
1474
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1475
-m '\ntestsuite still running ...\n' \
1477
$(builddir)/gcc/testsuite/gcc/gcc.log \
1478
$(builddir)/gcc/testsuite/g++/g++.log \
1479
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1480
$(builddir)/gcc/testsuite/objc/objc.log \
1481
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1482
$(builddir)/gcc/testsuite/gnat/gnat.log \
1483
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1484
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1485
$(builddir)/gcc/p/test/test_log \
1486
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++.log \
1487
$(buildlibdir)/libjava/testsuite/libjava.log \
1488
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1489
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1490
$(buildlibdir)/libffi/testsuite/libffi.log \
1494
ifeq ($(with_ada),yes)
1495
chmod +x debian/acats-killer.sh
1496
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1497
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1498
$(builddir)/gcc/testsuite/g++.log \
1504
for d in $(checkdirs); do \
1505
echo "Running testsuite in $$d ..."; \
1509
EXTRA_TEST_PFLAGS=-g0 \
1510
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1512
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1513
done 2>&1 | tee test-protocol
1515
-ps aux | fgrep logwatch | fgrep -v fgrep
1516
-if [ -f $(builddir)/logwatch.pid ]; then \
1517
kill -1 `cat $(builddir)/logwatch.pid`; \
1519
kill -9 `cat $(builddir)/logwatch.pid`; \
1520
rm -f $(builddir)/logwatch.pid; \
1522
-ps aux | fgrep logwatch | fgrep -v fgrep
1524
ifeq ($(with_ada),yes)
1525
-if [ -f $(builddir)/acats-killer.pid ]; then \
1526
kill -1 `cat $(builddir)/acats-killer.pid`; \
1528
kill -9 `cat $(builddir)/acats-killer.pid`; \
1529
rm -f $(builddir)/acats-killer.pid; \
1533
: # running the libjava testsuite alone is missing this information
1534
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1536
if [ -x $(srcdir)/contrib/test_summary ]; then \
1537
rm -f test-summary; \
1540
echo '' > ts-include; \
1541
echo '' >> ts-include; \
1542
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1543
echo 'Bootstrap comparison failure:' >> ts-include; \
1544
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1545
echo '' >> ts-include; \
1546
echo '' >> ts-include; \
1548
echo "Build Dependencies:" >> ts-include; \
1549
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1550
libgmp*-dev libmpfr-dev libmpc-dev libisl-dev libcloog-isl-dev \
1551
| fgrep -v '<none>' >> ts-include; \
1552
echo '' >> ts-include; \
1553
cat ../$(patch_stamp) >> ts-include; \
1554
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1555
$(srcdir)/contrib/test_summary \
1556
-i ts-include -m "$(S_EMAIL)" \
1557
) > raw-test-summary; \
1558
if [ -n "$(testsuite_tarball)" ]; then \
1559
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1560
echo " Do not interpret the results on its own" >> test-summary; \
1561
echo " but compare them with the results from" >> test-summary; \
1562
echo " the gcc-snapshot package." >> test-summary; \
1564
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1566
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1567
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1568
echo '' >> test-summary; \
1569
cat bootstrap-summary >> test-summary; \
1571
echo 'BEGIN test-summary'; \
1573
echo 'END test-summary'; \
1575
ifeq ($(with_d),yes)
1576
: # the D test failures for the non-default multilibs are known, ignore them
1577
egrep -v '^(FAIL|UNRESOLVED): (runnable|fail_c|comp)' test-summary > test-summary.tmp
1578
mv -f test-summary.tmp test-summary
1581
touch $(check_stamp)
1583
$(check_inst_stamp): $(check_stamp)
1584
rm -f test-inst-protocol
1586
ifeq ($(start_logwatch),yes)
1587
: # start logwatch script for regular output during test runs
1588
chmod +x debian/logwatch.sh
1589
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1590
-m '\ntestsuite (3.3) still running ...\n' \
1591
test-inst-protocol \
1592
check-inst/{gcc,g++,g77,objc}.log \
1599
echo "Running testsuite ..."
1603
EXTRA_TEST_PFLAGS=-g0 \
1604
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1605
cd check-inst && $(srcdir)/contrib/test_installed \
1606
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1607
2>&1 | tee test-inst-protocol
1609
-ps aux | fgrep logwatch | fgrep -v fgrep
1610
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1611
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1615
-ps aux | fgrep logwatch | fgrep -v fgrep
1617
-chmod 755 $(srcdir)/contrib/test_summary
1618
if [ -x $(srcdir)/contrib/test_summary ]; then \
1619
rm -f test-inst-summary; \
1622
echo '' > ts-include; \
1623
echo '' >> ts-include; \
1624
echo "Build Dependencies:" >> ts-include; \
1625
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1626
libgmp*-dev libmpfr-dev libmpc-dev libisl*-dev libcloog-isl-dev \
1627
| fgrep -v '<none>' >> ts-include; \
1628
echo '' >> ts-include; \
1629
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1630
$(srcdir)/contrib/test_summary \
1631
-i ts-include -m "$(S_EMAIL)" \
1632
) > raw-test-inst-summary; \
1633
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1634
>> test-inst-summary; \
1635
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1636
| grep -v EOF >> test-inst-summary; \
1637
echo 'BEGIN test-installed-summary'; \
1638
cat test-inst-summary; \
1639
echo 'END test-installed-summary'; \
1642
chmod 755 debian/reduce-test-diff.awk
1643
if diff -u test-inst-summary test-summary \
1644
| debian/reduce-test-diff.awk > diff-summary; \
1646
mv -f diff-summary testsuite-comparision; \
1649
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1652
) > testsuite-comparision; \
1653
rm -f diff-summary; \
1655
touch $(check_inst_stamp)
1657
clean: debian/control
1660
rm -f *-summary *-protocol testsuite-comparision summary-diff
1661
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1662
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1664
rm -f $(srcdir)/gcc/po/*.gmo
1665
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1666
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1668
[ -f $$f ] || continue; \
1670
| 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$$//'); \
1673
find debian -maxdepth 1 -name '*.symbols' -type l | xargs -r rm -f
1674
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
1675
rm -f debian/shlibs.local debian/substvars.local
1676
rm -f debian/*.debhelper
1677
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1678
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1679
rm -f debian/lib*gcj-bc.shlibs
1680
rm -rf bin locales share
1684
$(cross_clean) dh_clean
1686
# -----------------------------------------------------------------------------
1687
# some abbrevations for the package names and directories;
1688
# p_XXX is the package name, d_XXX is the package directory
1689
# these macros are only used in the binary-* targets.
1691
ifeq ($(versioned_packages),yes)
1692
pkg_ver := -$(BASE_VERSION)
1695
ifneq ($(DEB_CROSS),yes)
1696
p_base = gcc$(pkg_ver)-base
1697
p_xbase = gcc$(pkg_ver)-base
1698
p_gcc = gcc$(pkg_ver)
1699
p_cpp = cpp$(pkg_ver)
1700
p_cppd = cpp$(pkg_ver)-doc
1701
p_cxx = g++$(pkg_ver)
1702
p_doc = gcc$(pkg_ver)-doc
1703
p_lgcc = libgcc$(GCC_SONAME)
1705
# only triggered if DEB_CROSS set
1706
ifneq ($(with_deps_on_target_arch_pkgs),yes)
1707
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1708
p_xbase = gcc$(pkg_ver)$(cross_bin_arch)-base
1710
p_base = gcc$(pkg_ver)-base
1713
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1714
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1715
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1717
p_hppa64 = gcc$(pkg_ver)-hppa64
1720
d_base = debian/$(p_base)
1721
d_xbase = debian/$(p_xbase)
1722
d_gcc = debian/$(p_gcc)
1723
d_cpp = debian/$(p_cpp)
1724
d_cppd = debian/$(p_cppd)
1725
d_cxx = debian/$(p_cxx)
1726
d_doc = debian/$(p_doc)
1727
d_lgcc = debian/$(p_lgcc)
1728
d_hppa64= debian/$(p_hppa64)
1730
d_neon = debian/tmp-neon
1732
common_substvars = \
1733
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1735
ifeq ($(DEB_CROSS),yes)
1736
lib_binaries := indep_binaries
1738
lib_binaries := arch_binaries
1741
# ---------------------------------------------------------------------------
1743
ifeq ($(single_package),yes)
1744
include debian/rules.d/binary-snapshot.mk
1747
ifneq ($(DEB_CROSS),yes)
1748
ifeq ($(with_source),yes)
1749
include debian/rules.d/binary-source.mk
1753
ifneq ($(BACKPORT),true)
1754
ifeq ($(with_gccxbase),yes)
1755
include debian/rules.d/binary-base.mk
1758
ifeq ($(with_gccbase),yes)
1759
include debian/rules.d/binary-base.mk
1762
# always include to get some definitions
1763
include debian/rules.d/binary-libgcc.mk
1765
ifeq ($(with_libqmath),yes)
1766
include debian/rules.d/binary-libquadmath.mk
1769
ifeq ($(with_libgmath),yes)
1770
include debian/rules.d/binary-libgccmath.mk
1773
ifeq ($(with_libgomp),yes)
1774
include debian/rules.d/binary-libgomp.mk
1777
ifeq ($(with_libitm),yes)
1778
include debian/rules.d/binary-libitm.mk
1781
ifeq ($(with_libatomic),yes)
1782
include debian/rules.d/binary-libatomic.mk
1785
ifeq ($(with_libbacktrace),yes)
1786
include debian/rules.d/binary-libbacktrace.mk
1789
ifeq ($(with_cdev),yes)
1790
include debian/rules.d/binary-cpp.mk
1793
ifeq ($(with_fixincl),yes)
1794
include debian/rules.d/binary-fixincl.mk
1797
ifeq ($(with_libssp),yes)
1798
include debian/rules.d/binary-libssp.mk
1801
ifeq ($(with_objcxx),yes)
1802
include debian/rules.d/binary-objcxx.mk
1805
ifeq ($(with_objc),yes)
1806
include debian/rules.d/binary-objc.mk
1807
include debian/rules.d/binary-libobjc.mk
1810
ifeq ($(with_go),yes)
1811
include debian/rules.d/binary-go.mk
1814
# include before cxx
1815
ifeq ($(with_java),yes)
1816
include debian/rules.d/binary-java.mk
1819
ifeq ($(with_cxxdev),yes)
1820
include debian/rules.d/binary-cxx.mk
1822
ifeq ($(with_cxx),yes)
1823
include debian/rules.d/binary-libstdcxx.mk
1826
ifeq ($(with_libasan),yes)
1827
include debian/rules.d/binary-libasan.mk
1830
ifeq ($(with_libtsan),yes)
1831
include debian/rules.d/binary-libtsan.mk
1834
ifeq ($(with_f77),yes)
1835
include debian/rules.d/binary-f77.mk
1838
ifeq ($(with_fortran),yes)
1839
include debian/rules.d/binary-fortran.mk
1842
ifeq ($(with_ada),yes)
1843
include debian/rules.d/binary-ada.mk
1846
ifeq ($(with_d),yes)
1847
include debian/rules.d/binary-d.mk
1850
ifeq ($(with_libnof),yes)
1851
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1852
include debian/rules.d/binary-nof.mk
1856
ifeq ($(with_softfloat),yes)
1857
include debian/rules.d/binary-softfloat.mk
1860
# gcc must be moved/built after g77 and g++
1861
ifeq ($(with_cdev),yes)
1862
include debian/rules.d/binary-gcc.mk
1865
ifeq ($(with_hppa64),yes)
1866
include debian/rules.d/binary-hppa64.mk
1869
ifeq ($(with_neon),yes)
1870
include debian/rules.d/binary-neon.mk
1875
endif # ($(single_package),yes)
1877
# ----------------------------------------------------------------------
1878
install: $(install_dependencies)
1880
$(install_dummy_stamp): $(build_dummy_stamp)
1881
touch $(install_dummy_stamp)
1883
$(install_snap_stamp): $(build_dependencies)
1888
: # Install directories
1892
ifeq ($(with_hppa64),yes)
1895
$(MAKE) -C $(builddir_hppa64) \
1898
$(LDFLAGS_TO_PASS) \
1899
DESTDIR=$(PWD)/$(d) \
1902
ls -l $(d)/$(PF)/bin
1903
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1904
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1906
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1909
for i in ar nm ranlib; do \
1910
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
1913
: # remove files not needed from the hppa64 build
1914
rm -rf $(d)/$(PF)/share/info
1915
rm -rf $(d)/$(PF)/share/man
1916
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1917
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1919
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1920
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1922
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(versiondir)/include-fixed; \
1925
README|features.h|syslimits.h|limits.h) ;; \
1926
linux|$(TARGET_ALIAS)) ;; \
1927
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1928
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1933
: # Work around PR lto/41569
1934
ln -sf gcc $(builddir)/prev-gcc
1935
ln -sf $(DEB_TARGET_GNU_TYPE) $(builddir)/prev-$(DEB_TARGET_GNU_TYPE)
1937
: # Install everything
1940
$(MAKE) -C $(builddir) \
1942
$(LDFLAGS_TO_PASS) \
1943
DESTDIR=$(PWD)/$(d) \
1944
infodir=/$(PF)/share/info \
1945
mandir=/$(PF)/share/man \
1948
ls -l $(d)/$(PF)/bin
1949
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1950
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1952
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1955
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1958
README|features.h|syslimits.h|limits.h) ;; \
1959
linux|$(TARGET_ALIAS)) ;; \
1960
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1961
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1965
ifneq ($(configured_libdir),$(libdir))
1966
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
1967
mv $(d)/$(PF)/$(configured_libdir)/$$i \
1968
$(d)/$(PF)/$(libdir)/. || true; \
1969
mv $(d)/$(PF)/libo32/$$i \
1970
$(d)/$(PF)/lib/. || true; \
1974
# FIXME: libjava/classpath not correctly patched
1975
ifeq ($(with_java),yes)
1976
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1977
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1978
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1979
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1980
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1983
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1985
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1986
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1987
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1988
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1989
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1990
$(srcdir)/libjava/libgcj_bc.c \
1991
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1992
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
1996
if [ -d $(d)/usr/man/man1 ]; then \
1997
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
2000
chmod 755 debian/dh_*
2001
touch $(install_snap_stamp)
2003
$(install_stamp): $(build_stamp)
2006
dh_clean -k -N$(p_hppa64)
2008
if [ -f $(binary_stamp)-hppa64 ]; then \
2009
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
2011
rm -f $(binary_stamp)*
2012
if [ -f saved-stamp-hppa64 ]; then \
2013
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
2016
: # Install directories
2018
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
2019
ifeq ($(biarch32),yes)
2020
mkdir -p $(d)/$(PF)/$(lib32loc)/debug
2022
ifeq ($(biarch64),yes)
2023
mkdir -p $(d)/$(PF)/lib64/debug
2025
ifeq ($(biarchn32),yes)
2026
mkdir -p $(d)/$(PF)/$(libn32)/debug
2028
ifeq ($(biarchx32),yes)
2029
mkdir -p $(d)/$(PF)/libx32/debug
2032
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64 s390x powerpc64))
2033
ifneq ($(DEB_TARGET_ARCH),x32)
2034
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
2035
: # (this works when CONFARGS contains '--disable-multilib')
2036
ln -s $(configured_libdir) $(d)/lib64
2037
mkdir -p $(d)/$(PF)/$(configured_libdir)
2038
ln -s $(configured_libdir) $(d)/$(PF)/lib64
2041
ifeq ($(DEB_TARGET_ARCH),x32)
2042
: # link lib to libx32 and $(PF)/lib to $(PF)/libx32
2043
ln -s $(configured_libdir) $(d)/libx32
2044
mkdir -p $(d)/$(PF)/$(configured_libdir)
2045
ln -s $(configured_libdir) $(d)/$(PF)/libx32
2048
: # Work around PR lto/41569
2049
ln -sf gcc $(builddir)/prev-gcc
2051
: # Install everything
2054
$(MAKE) -C $(builddir) \
2056
$(LDFLAGS_TO_PASS) \
2057
DESTDIR=$(PWD)/$(d) \
2058
infodir=/$(PF)/share/info \
2059
mandir=/$(PF)/share/man \
2062
ifneq ($(configured_libdir),$(libdir))
2063
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
2064
mv $(d)/$(PF)/$(configured_libdir)/$$i \
2065
$(d)/$(PF)/$(libdir)/. || true; \
2066
mv $(d)/$(PF)/libo32/$$i \
2067
$(d)/$(PF)/lib/. || true; \
2071
ifeq ($(with_libcxxdbg),yes)
2072
: # FIXME: the libstdc++ gdb.py file is installed with a wrong name
2073
for i in $$(find $(d)/$(PF) -name libstdc++_pic.a-gdb.py); do \
2074
[ -f $$i ] || continue; \
2075
d=$$(dirname $$i); \
2076
b=$$(basename $$i); \
2077
t=$$(cd $$d; echo libstdc++.so.*.*.*)-gdb.py; \
2082
# FIXME: libjava/classpath not correctly patched
2083
ifeq ($(with_java),yes)
2084
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
2085
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2086
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
2087
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
2088
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
2092
: # remove rpath settings from binaries and shared libs
2093
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
2094
$(if $(filter $(with_multiarch_lib),yes), \
2095
$(d)/$(PF)/lib/$(DEB_HOST_MULTIARCH)/lib*.so.*) \
2096
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
2097
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
2099
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
2100
[ -h $$i ] && continue; \
2101
chrpath --delete $$i; \
2102
echo "removed RPATH: $$i"; \
2105
: # remove '*.la' and '*.lai' files, not shipped in any package.
2106
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
2108
ifneq ($(with_libgnat),yes)
2109
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
2112
ifeq ($(GFDL_INVARIANT_FREE),yes)
2113
for i in gcc gcov; do \
2114
I=`echo $$i | tr a-z A-Z`; \
2115
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2116
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2119
ifeq ($(with_fortran),yes)
2121
I=`echo $$i | tr a-z A-Z`; \
2122
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2123
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2126
ifeq ($(with_java),yes)
2127
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
2129
I=`echo $$i | tr a-z A-Z`; \
2130
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
2131
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2136
# ifeq ($(with_ada),yes)
2137
# : # rename files (versioned ada binaries)
2139
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2140
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2141
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2143
# for i in $(GNAT_TOOLS); do \
2144
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2148
ifeq ($(DEB_CROSS)-$(multilib),yes-yes)
2149
ifneq ($(DEB_STAGE),stage1)
2150
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2151
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2152
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2153
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2155
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2156
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2157
mkdir -p $(d)/$(PF)/powerpc-linux-gnu/lib64
2158
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2163
for i in ar nm ranlib; do \
2164
cp debian/gcc-$$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$(cmd_prefix)gcc-$$i$(pkg_ver).1; \
2167
chmod 755 debian/dh_*
2169
# tar cf tmp.tar debian/tmp
2171
touch $(install_stamp)
2173
$(install_hppa64_stamp): $(build_hppa64_stamp)
2177
mkdir -p $(d_hppa64)/$(PF)
2180
$(MAKE) -C $(builddir_hppa64) \
2183
$(LDFLAGS_TO_PASS) \
2184
DESTDIR=$(PWD)/$(d_hppa64) \
2187
ifeq ($(versioned_packages),yes)
2188
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp \
2189
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp$(pkg_ver)
2192
ifneq ($(single_package),yes)
2193
: # remove files not needed
2194
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2195
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2196
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/plugin
2197
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2198
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2200
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2201
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2202
rm -rf $(d_hppa64)/$(hppa64libexecdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2205
touch $(install_hppa64_stamp)
2207
$(install_neon_stamp): $(build_neon_stamp)
2211
mkdir -p $(d_neon)/$(PF)
2214
$(MAKE) -C $(builddir_neon) \
2217
$(LDFLAGS_TO_PASS) \
2218
DESTDIR=$(PWD)/$(d_neon) \
2220
touch $(install_neon_stamp)
2222
# ----------------------------------------------------------------------
2223
# Build architecture-dependent files here.
2224
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2225
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2226
ifeq ($(with_check),yes)
2228
# : # Send Email about sucessfull build.
2229
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2232
# ----------------------------------------------------------------------
2233
# Build architecture-independent files here.
2234
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2235
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2238
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2240
binary: binary-indep binary-arch
2241
.PHONY: build clean binary-indep binary-arch binary