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
NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
44
# kernel-specific ulimit hack
45
ifeq ($(findstring linux,$(DEB_HOST_GNU_SYSTEM)),linux)
46
ULIMIT_M = if [ -e /proc/meminfo ]; then \
47
m=`awk '/^((Mem|Swap)Free|Cached)/{m+=$$2}END{print int(m*.9)}' \
50
m=`vmstat --free --swap-free --kilobytes|awk '{m+=$$2}END{print int(m*.9)}'`; \
53
echo "Limited memory for test runs to `ulimit -m`kB"
58
ifeq ($(locale_data),generate)
59
SET_LOCPATH = LOCPATH=$(PWD)/locales
62
SET_PATH = PATH=$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
63
ifeq ($(PKGSOURCE),gcc-snapshot)
64
ifneq (,$(findstring arm-linux-gnueabi,$(DEB_TARGET_GNU_TYPE)))
65
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
67
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
68
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
70
ifneq (,$(findstring ppc64-linux,$(DEB_TARGET_GNU_TYPE)))
71
SET_PATH = PATH=/usr/lib/gcc-snapshot/bin:$(PWD)/bin:/usr/$(libdir)/gcc/bin:$$PATH
75
# the recipient for the test summaries. Send with: debian/rules mail-summary
76
S_EMAIL = gcc@packages.debian.org gcc-testresults@gcc.gnu.org
78
# build not yet prepared to take variables from the environment
83
$(foreach v, CPPFLAGS CFLAGS CXXFLAGS FFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v)))))
85
ifeq ($(REVERSE_CROSS),yes)
88
CC = $(if $(filter yes,$(with_ada)),gnatgcc,gcc)
91
ifneq ($(distribution),Ubuntu)
92
#ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel armhf mips mipsel))
93
ifneq (,$(filter $(DEB_TARGET_ARCH), mips mipsel))
94
STAGE1_CFLAGS = -g -O2
103
ifeq ($(with_ssp_default),yes)
107
LIBCXXFLAGS = -g -O2 -fno-implicit-templates
108
# Only use -fno-stack-protector when known to the stage1 compiler.
109
cc-fno-stack-protector := $(shell if $(CC) $(CFLAGS) -fno-stack-protector \
110
-S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
111
then echo "-fno-stack-protector"; fi;)
112
$(foreach var,STAGE1_CFLAGS BOOT_CFLAGS LIBCFLAGS LIBCXXFLAGS,$(eval \
113
$(var) += $(cc-fno-stack-protector)))
116
ifeq ($(DEB_CROSS),yes)
120
ifneq (,$(findstring static,$(DEB_BUILD_OPTIONS)))
125
$(if $(CFLAGS),CFLAGS="$(CFLAGS)") \
126
$(if $(BOOT_CFLAGS),BOOT_CFLAGS="$(BOOT_CFLAGS)") \
127
$(if $(LIBCFLAGS),LIBCFLAGS="$(LIBCFLAGS)") \
128
$(if $(LIBCXXFLAGS),LIBCXXFLAGS="$(LIBCXXFLAGS)")
130
$(if $(LDFLAGS),LDFLAGS="$(LDFLAGS)")
131
STAGE1_CFLAGS_TO_PASS = \
132
$(if $(STAGE1_CFLAGS),STAGE1_CFLAGS="$(STAGE1_CFLAGS)")
134
docdir = usr/share/doc
137
--with-pkgversion='$(distribution)$(if $(with_linaro_branch),/Linaro)___$(DEB_VERSION)' \
138
--with-bugurl='file:///usr/share/doc/$(PKGSOURCE)/README.Bugs'
141
--enable-languages=$(subst $(SPACE),$(COMMA),$(enabled_languages)) \
144
ifeq ($(versioned_packages),yes)
145
CONFARGS += --program-suffix=-$(BASE_VERSION)
148
# if this variable exists at all, it's reasonable to use it, giving us
149
# multiarch support for free
150
ifneq ($(DEB_HOST_MULTIARCH),)
151
MULTIARCH_CONFARG = --with-multiarch-defaults=$(DEB_HOST_MULTIARCH)
157
--disable-libmudflap \
159
--disable-multiarch \
162
--libexecdir=/$(libexecdir) \
163
--libdir=/$(PF)/$(libdir) \
164
--with-build-sysroot=$(with_build_sysroot) \
165
--with-sysroot=$(with_sysroot)
167
ifeq ($(DEB_STAGE),stage1)
181
$(MULTIARCH_CONFARG) \
182
--enable-linker-build-id \
185
ifneq ($(PKGSOURCE),gcc-snapshot)
187
--libexecdir=/$(libexecdir) \
188
--without-included-gettext \
189
--enable-threads=posix \
190
--with-gxx-include-dir=/$(cxx_inc_dir) \
191
--libdir=/$(PF)/$(libdir)
194
ifneq ($(with_cpp),yes)
195
CONFARGS += --disable-cpp
198
ifeq ($(with_nls),yes)
199
CONFARGS += --enable-nls
201
CONFARGS += --disable-nls
204
ifeq ($(with_bootstrap),off)
205
CONFARGS += --disable-bootstrap
206
else ifneq ($(with_bootstrap),)
207
CONFARGS += --enable-bootstrap=$(with_bootstrap)
210
ifneq ($(with_sysroot),)
211
CONFARGS += --with-sysroot=$(with_sysroot)
213
ifneq ($(with_build_sysroot),)
214
CONFARGS += --with-build-sysroot=$(with_build_sysroot)
217
ifeq ($(force_gnu_locales),yes)
218
CONFARGS += --enable-clocale=gnu
221
ifeq ($(with_cxx)-$(with_debug),yes-yes)
222
CONFARGS += --enable-libstdcxx-debug
224
CONFARGS += --enable-libstdcxx-time=yes
226
ifneq ($(with_ssp),yes)
227
CONFARGS += --disable-libssp
230
ifneq ($(with_mudflap),yes)
231
CONFARGS += --disable-libmudflap
234
ifneq ($(with_gomp),yes)
235
CONFARGS += --disable-libgomp
238
ifeq ($(with_plugins),yes)
239
CONFARGS += --enable-plugin
242
ifeq ($(with_gold),yes)
243
CONFARGS += --enable-gold --enable-ld=default
244
CONFARGS += --with-plugin-ld=ld.gold
246
CONFARGS += --with-plugin-ld
249
jvm_name_short = java-1.5.0-gcj-$(BASE_VERSION)$(if $(findstring snap,$(PKGSOURCE)),-snap)
250
jvm_name_long = $(jvm_name_short)-1.5.0.0
252
ifeq ($(with_java),yes)
253
CONFARGS += --disable-browser-plugin
254
ifeq ($(with_java_maintainer_mode),yes)
255
CONFARGS += --enable-java-maintainer-mode
257
ifeq ($(with_java_biarch_awt),yes)
258
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)-default))
260
CONFARGS += --enable-java-awt=$(subst $(SPACE),$(COMMA),$(foreach p,$(java_awt_peers),$(p)))
262
ifneq (,$(findstring gtk,$(java_awt_peers)))
263
CONFARGS += --enable-gtk-cairo
265
jvm_dir = /usr/lib/jvm/$(jvm_name_short)
266
CONFARGS += --with-java-home=$(jvm_dir)/jre
267
CONFARGS += --enable-java-home \
268
--with-jvm-root-dir=$(jvm_dir) \
269
--with-jvm-jar-dir=/usr/lib/jvm-exports/$(jvm_name_short)
270
CONFARGS += --with-arch-directory=$(java_cpu)
271
ifeq (./,$(dir $(ecj_jar)))
272
CONFARGS += --with-ecj-jar=$(jvm_dir)/lib/ecj.jar
274
CONFARGS += --with-ecj-jar=$(ecj_jar)
278
ifeq ($(with_gcj),yes)
279
ifeq ($(DEB_HOST_GNU_CPU),m32r)
280
CONFARGS += --enable-libgcj
284
ifeq ($(with_objc)-$(with_objc_gc),yes-yes)
285
CONFARGS += --enable-objc-gc
288
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), i486-linux-gnu i586-linux-gnu i686-linux-gnu))
289
ifeq ($(biarch64),yes)
290
CONFARGS += --enable-targets=all
294
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), x86_64-linux-gnu))
295
ifneq ($(biarch32),yes)
296
CONFARGS += --disable-multilib
300
ifneq (,$(filter $(DEB_TARGET_GNU_TYPE), powerpc-linux-gnu powerpc-linux-gnuspe))
301
CONFARGS += --enable-secureplt
302
ifeq ($(biarch64),yes)
303
CONFARGS += --disable-softfloat \
304
--enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32
306
CONFARGS += --disable-multilib
310
ifneq (,$(findstring powerpc64-linux,$(DEB_TARGET_GNU_TYPE)))
311
CONFARGS += --enable-secureplt
312
ifeq ($(biarch32),yes)
313
CONFARGS += --disable-softfloat --enable-targets=powerpc64-linux,powerpc-linux
315
CONFARGS += --disable-multilib
317
ifeq ($(distribution),Ubuntu)
318
CONFARGS += --with-cpu-32=power7 --with-cpu-64=power7
322
ifeq ($(REVERSE_CROSS),yes)
323
# FIXME: requires ppl and cloog headers for the target
324
CONFARGS += --without-ppl
325
# FIXME: build currently fails build the precompiled headers
326
CONFARGS += --disable-libstdcxx-pch
330
ifeq ($(findstring powerpcspe,$(DEB_TARGET_ARCH)),powerpcspe)
331
CONFARGS += --with-cpu=8548 --enable-e500_double --with-long-double-128
334
ifneq (,$(findstring softfloat,$(DEB_TARGET_GNU_CPU)))
335
CONFARGS += --with-float=soft
338
ifneq (,$(findstring arm-vfp,$(DEB_TARGET_GNU_CPU)))
339
CONFARGS += --with-fpu=vfp
342
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
343
CONFARGS += --disable-sjlj-exceptions
344
# FIXME: libjava is not ported for thumb, this hack only works for
345
# separate gcj builds
346
# any Ubuntu arch or Debian armhf arch
347
ifneq (,$(filter Ubuntu-% Debian-armhf,$(distribution)-$(DEB_TARGET_ARCH)))
348
ifneq (,$(findstring gcj,$(PKGSOURCE)))
349
CONFARGS += --with-arch=armv6
351
CONFARGS += --with-arch=armv7-a
353
CONFARGS += --with-float=$(float_abi) --with-fpu=vfpv3-d16
355
ifeq ($(with_arm_thumb),yes)
356
CONFARGS += --with-mode=thumb
360
ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),m68k))
361
CONFARGS += --disable-werror
363
# FIXME: correct fix-warnings.dpatch
364
ifeq ($(distribution),Ubuntu)
365
CONFARGS += --disable-werror
368
ifneq (,$(findstring sparc-linux,$(DEB_TARGET_GNU_TYPE)))
369
ifeq ($(biarch64),yes)
370
CONFARGS += --enable-targets=all
374
ifneq (,$(findstring sparc64-linux,$(DEB_TARGET_GNU_TYPE)))
375
ifneq ($(biarch32),yes)
376
CONFARGS += --disable-multilib
380
ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE)))
381
CONFARGS += --with-system-libunwind
384
ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE)))
385
CONFARGS += --with-multilib-list=m4,m4-nofpu --with-cpu=sh4
388
ifeq ($(DEB_TARGET_ARCH_OS),linux)
389
ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
390
ifeq ($(DEB_TARGET_ARCH),alpha)
391
glibc_version := $(shell dpkg -s libc6.1 | awk '/^Version:/ {print $$2}')
393
glibc_version := $(shell dpkg -s libc6 | awk '/^Version:/ {print $$2}')
395
with_ldbl128 := $(shell dpkg --compare-versions $(glibc_version) gt 2.3.99 && echo yes)
396
ifeq ($(with_ldbl128),yes)
397
CONFARGS += --with-long-double-128
402
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 kfreebsd-i386 kfreebsd-amd64))
403
ifeq ($(distribution),Ubuntu)
404
CONFARGS += --with-arch-32=i686
406
CONFARGS += --with-arch-32=i586
410
ifneq (,$(filter $(DEB_TARGET_ARCH), hurd-i386))
411
CONFARGS += --with-arch=i586
414
ifeq ($(DEB_TARGET_ARCH),lpia)
415
CONFARGS += --with-arch=pentium-m --with-tune=i586
418
ifneq (,$(filter $(DEB_TARGET_ARCH), amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
419
CONFARGS += --with-tune=generic
422
ifneq (,$(findstring mips-linux,$(DEB_TARGET_GNU_TYPE)))
423
CONFARGS += --with-mips-plt
424
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
425
ifeq ($(biarchn32)-$(biarch64),yes-yes)
426
CONFARGS += --enable-targets=all
427
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
431
ifneq (,$(findstring mipsel-linux,$(DEB_TARGET_GNU_TYPE)))
432
CONFARGS += --with-mips-plt
433
CONFARGS += --with-arch-32=mips2 --with-tune-32=mips32
434
ifeq ($(biarchn32)-$(biarch64),yes-yes)
435
CONFARGS += --enable-targets=all
436
CONFARGS += --with-arch-64=mips3 --with-tune-64=mips64
440
ifneq (,$(findstring s390-linux,$(DEB_TARGET_GNU_TYPE)))
441
ifeq ($(biarch64),yes)
442
CONFARGS += --enable-targets=all
446
ifneq (,$(findstring hppa-linux,$(DEB_TARGET_GNU_TYPE)))
447
CONFARGS += --disable-libstdcxx-pch
450
ifeq ($(PKGSOURCE),gcc-snapshot)
451
ifeq ($(findstring --disable-werror, $(CONFARGS)),)
452
CONFARGS += --disable-werror
454
CONFARGS += --enable-checking=yes
456
CONFARGS += --enable-checking=release
459
ifneq ($(DEB_CROSS),yes)
461
--build=$(DEB_BUILD_GNU_TYPE) \
462
--host=$(DEB_HOST_GNU_TYPE) \
463
--target=$(TARGET_ALIAS)
466
--program-prefix=$(TARGET_ALIAS)- \
467
--includedir=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include \
468
--build=$(DEB_BUILD_GNU_TYPE) \
469
--host=$(DEB_HOST_GNU_TYPE) \
470
--target=$(TARGET_ALIAS)
473
--with-headers=/$(PF)/$(DEB_TARGET_GNU_TYPE)/include \
474
--with-libs=/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib
476
SET_CROSS_LIB_PATH = LD_LIBRARY_PATH=/lib:/usr/lib:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib$${DIRNAME}
479
ifeq ($(with_bootstrap),off)
481
else ifeq ($(with_bootstrap),)
482
# no profiledbootstrap on the following architectures
483
# - m68k: we're happy that it builds at all
484
no_profiled_bs_archs := alpha arm hppa m68k
485
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
486
bootstrap_target = bootstrap-lean
488
bootstrap_target = profiledbootstrap
490
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
491
bootstrap_target = bootstrap-lean
493
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
494
bootstrap_target = bootstrap-lean
496
ifeq ($(PKGSOURCE),gcc-snapshot)
497
bootstrap_target = bootstrap-lean
500
# disable profiled bootstrap on slow archs, get to testing first ...
501
ifeq ($(distribution),Debian)
502
ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel armhf mips mipsel sparc))
503
bootstrap_target = bootstrap-lean
506
ifeq ($(distribution),Ubuntu)
507
ifneq (,$(filter $(DEB_TARGET_ARCH), sparc))
508
bootstrap_target = bootstrap-lean
512
bootstrap_target = bootstrap-lean
515
# Increase the timeout for one testrun on slow architectures
516
ifeq ($(distribution),Debian)
517
ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf hppa m68k sparc))
519
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
522
ifeq ($(DEB_TARGET_GNU_SYSTEM),gnu)
525
else ifeq ($(distribution),Ubuntu)
526
ifneq (,$(findstring $(DEB_TARGET_ARCH),armel armhf hppa ia64 sparc))
528
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
534
ifneq ($(PKGSOURCE),gcc-snapshot)
535
ifeq ($(with_ssp),yes)
536
ifneq ($(PKGSOURCE),gcc-snapshot)
537
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
539
# FIXME Ubuntu armel buildd hangs
540
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
543
ifeq ($(distribution),Ubuntu)
544
# the buildds are just slow ... don't check the non-default
545
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),ia64 powerpc sparc))
552
ifeq ($(distribution),Ubuntu)
553
ifneq (,$(findstring arm, $(DEB_TARGET_GNU_CPU)))
554
ifeq ($(with_arm_thumb),yes)
555
# DEJAGNU_RUNS += -marm
557
DEJAGNU_RUNS += -mthumb
562
ifeq ($(with_32bit_check),yes)
565
ifeq ($(with_64bit_check),yes)
566
ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),mips mipsel))
567
DEJAGNU_RUNS += -mabi=64
572
ifeq ($(with_n32bit_check),yes)
573
DEJAGNU_RUNS += -mabi=n32
576
# gdc is not multilib'd
577
ifneq (,$(findstring gdc, $(PKGSOURCE)))
582
ifneq (,$(findstring gnat, $(PKGSOURCE)))
586
ifneq (,$(DEJAGNU_RUNS))
587
RUNTESTFLAGS = RUNTESTFLAGS="--target_board=unix\{,$(subst $(SPACE),$(COMMA),$(strip $(DEJAGNU_RUNS)))\}"
590
# PF is the installation prefix for the package without the leading slash.
591
# It's "usr" for gcc releases.
593
# use value set in the environment
594
else ifeq ($(PKGSOURCE),gcc-snapshot)
595
PF = usr/lib/gcc-snapshot
600
# PFL is the installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
601
ifeq ($(DEB_CROSS),yes)
602
PFL = $(PF)/$(DEB_TARGET_GNU_TYPE)
607
# RPF is the base prefix or installation prefix with DEB_TARGET_GNU_TYPE attached for cross builds
608
ifeq ($(DEB_CROSS),yes)
609
RPF = $(PF)/$(DEB_TARGET_GNU_TYPE)
614
ifeq ($(with_multiarch_lib),yes)
615
libdir = lib/$(DEB_HOST_MULTIARCH)
619
# /usr/libexec doesn't follow the FHS
620
ifeq ($(PKGSOURCE),gcc-snapshot)
621
libexecdir = $(PF)/libexec
622
spulibexecdir = $(PF)/libexec
624
libexecdir = $(PF)/$(libdir)
625
spulibexecdir = $(PF)/$(libdir)
627
buildlibdir = $(builddir)/$(TARGET_ALIAS)
629
ifeq ($(with_common_gcclibdir),yes)
630
gcc_lib_dir = $(PF)/$(libdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)
631
gcc_lexec_dir = $(libexecdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)
632
gcc_spu_lib_dir = $(PF)/spu/lib/gcc/spu/$(BASE_VERSION)
633
gcc_spu_lexec_dir = $(spulibexecdir)/gcc/spu/$(BASE_VERSION)
635
gcc_lib_dir = $(PF)/$(libdir)/gcc/$(TARGET_ALIAS)/$(GCC_VERSION)
636
gcc_lexec_dir = $(libexecdir)/gcc/$(TARGET_ALIAS)/$(GCC_VERSION)
637
gcc_spu_lib_dir = $(PF)/spu/lib/gcc/spu/$(GCC_VERSION)
638
gcc_spu_lexec_dir = $(spulibexecdir)/gcc/spu/$(GCC_VERSION)
645
p_l= $(1)$(cross_lib_arch)
646
p_d= $(1)-dbg$(cross_lib_arch)
650
ifeq ($(DEB_CROSS),yes)
653
usr_lib = $(PFL)/$(libdir)
655
usr_lib32 = $(PFL)/lib32
656
usr_libn32 = $(PFL)/lib32
657
usr_lib64 = $(PFL)/lib64
659
gcc_lib_dir32 = $(gcc_lib_dir)/$(biarch32subdir)
660
gcc_lib_dirn32 = $(gcc_lib_dir)/$(biarchn32subdir)
661
gcc_lib_dir64 = $(gcc_lib_dir)/$(biarch64subdir)
663
libgcc_dir = $(RPF)/$(libdir)
664
# yes, really; lib32gcc_s ends up in usr
665
libgcc_dir32 = $(PFL)/lib32
666
libgcc_dirn32 = $(RPF)/lib32
667
libgcc_dir64 = $(RPF)/lib64
669
# install_gcc_lib(lib,soname,flavour,package)
670
define install_gcc_lib
671
mv $(d)/$(usr_lib$(3))/$(1)*.a debian/$(4)/$(gcc_lib_dir$(3))/
672
rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so}
674
/$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so
678
checkdirs = $(builddir)
679
ifeq ($(with_separate_libgcj),yes)
680
ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
681
ifneq ($(with_standalone_gcj),yes)
682
checkdirs = $(buildlibdir)/libffi $(buildlibdir)/libjava
686
ifeq ($(with_separate_gnat),yes)
687
ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
688
checkdirs = $(builddir)/gcc
692
ifneq ($(DEB_CROSS),yes)
693
ifneq ($(PKGSOURCE),gcc-snapshot)
694
cxx_inc_dir = $(PF)/include/c++/$(BASE_VERSION)
696
cxx_inc_dir = $(PF)/include/c++/$(GCC_VERSION)
699
cxx_inc_dir = $(PF)/$(TARGET_ALIAS)/include/c++/$(GCC_VERSION)
704
configure: $(configure_dependencies)
706
$(configure_dummy_stamp):
707
touch $(configure_dummy_stamp)
711
: # give information about the build process
712
@echo "------------------------ Build process variables ------------------------"
713
@echo "Number of parallel processes used for the build: $(USE_CPUS)"
714
@echo "Package source: $(PKGSOURCE)"
715
@echo "GCC version: $(GCC_VERSION)"
716
@echo "Base Debian version: $(BASE_VERSION)"
717
@echo -e "Configured with: $(subst ___, ,$(foreach i,$(CONFARGS),$(i)\n\t))"
718
ifeq ($(DEB_CROSS),yes)
719
@echo "Building cross compiler for $(DEB_TARGET_ARCH)"
721
@echo "Using shell $(SHELL)"
722
@echo "Architecture: $(DEB_TARGET_ARCH) (GNU: $(TARGET_ALIAS))"
723
@echo "CPPFLAGS: $(CPPFLAGS)"
724
@echo "CFLAGS: $(CFLAGS)"
725
@echo "LDFLAGS: $(LDFLAGS)"
726
@echo "BOOT_CFLAGS: $(BOOT_CFLAGS)"
727
@echo "DEBIAN_BUILDARCH: $(DEBIAN_BUILDARCH)"
728
@echo "Install prefix: /$(PF)"
729
ifeq ($(biarchn32)-$(biarch64),yes-yes)
730
@echo "Will build the triarch compilers (o32/n32/64, defaulting to o32)"
732
ifeq ($(biarch64),yes)
733
@echo "Will build the biarch compilers (32/64, defaulting to 32bit)"
735
ifeq ($(biarch32),yes)
736
@echo "Will build the biarch compilers (64/32, defaulting to 64bit)"
738
@echo "Will not build the biarch compilers"
743
ifeq ($(with_cxx),yes)
744
@echo "Will build the C++ compiler"
746
@echo "Will not build the C++ compiler: $(with_cxx)"
748
ifeq ($(with_objc),yes)
749
@echo "Will build the ObjC compiler."
750
ifeq ($(with_objc_gc),yes)
751
@echo "Will build the extra ObjC runtime for garbage collection."
753
@echo "Will not build the extra ObjC runtime for garbage collection."
756
@echo "Will not build the ObjC compiler: $(with_objc)"
758
ifeq ($(with_objcxx),yes)
759
@echo "Will build the Obj-C++ compiler"
761
@echo "Will not build the Obj-C++ compiler: $(with_objcxx)"
763
ifeq ($(with_fortran),yes)
764
@echo "Will build the Fortran 95 compiler."
766
@echo "Will not build the Fortran 95 compiler: $(with_fortran)"
768
ifeq ($(with_java),yes)
769
@echo "Will build the Java compiler."
771
@echo "Will not build the Java compiler: $(with_java)"
773
ifeq ($(with_ada),yes)
774
@echo "Will build the Ada compiler."
775
ifeq ($(with_libgnat),yes)
776
@echo "Will build the shared Ada libraries."
778
@echo "Will not build the shared Ada libraries."
781
@echo "Will not build the Ada compiler: $(with_ada)"
783
ifeq ($(with_go),yes)
784
@echo "Will build the Go compiler."
786
@echo "Will not build the Go compiler: $(with_go)"
789
@echo "Will build the D compiler"
791
@echo "Will not build the D compiler: $(with_d)"
793
ifeq ($(with_ssp),yes)
794
@echo "Will build with SSP support."
796
@echo "Will build without SSP support: $(with_ssp)"
798
ifeq ($(with_check),yes)
799
@echo "Will run the testsuite."
800
ifeq ($(biarch64),yes)
801
ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),mips mipsel))
802
@echo 'Will run the testsuite with -mabi=64: $(with_64bit_check)'
804
@echo 'Will run the testsuite with -m64: $(with_64bit_check)'
807
ifeq ($(biarch32),yes)
808
@echo 'Will run the testsuite with -m32: $(with_32bit_check)'
810
ifeq ($(biarchn32),yes)
811
@echo 'Will run the testsuite with -mabi=n32: $(with_n32bit_check)'
814
@echo "Will not run the testsuite: $(with_check)"
816
ifeq ($(with_nls),yes)
817
@echo "Will enable national language support."
819
@echo "Will disable national language support: $(with_nls)"
821
@echo "-----------------------------------------------------------------------------"
823
ifeq ($(with_check),yes)
824
@if echo "spawn true" | /usr/bin/expect -f - >/dev/null; then \
827
echo "expect is failing on your system with the above error, which means the GCC"; \
828
echo "testsuite will fail. Please resolve the above issues and retry the build."; \
829
echo "-----------------------------------------------------------------------------"; \
833
rm -f $(configure_stamp) $(build_stamp)
834
cp $(patch_stamp) debian/README.Debian.$(DEB_TARGET_ARCH)
844
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc/ada/rts \
845
../src/configure $(subst ___, ,$(CONFARGS))
847
touch $(configure_stamp)
849
build: $(build_dependencies)
851
$(build_dummy_stamp):
852
touch $(build_dummy_stamp)
854
$(build_locale_stamp):
855
ifeq ($(locale_data)-$(with_cxx),generate-yes)
856
: # build locales needed by libstdc++ testsuite
859
- sh debian/locale-gen
861
touch $(build_locale_stamp)
864
$(build_stamp): $(configure_stamp) $(build_locale_stamp)
866
rm -f bootstrap-protocol
867
# DEB_CROSS is never set if REVERSE_CROSS is set and vice-versa.
869
ifeq ($(DEB_CROSS),yes)
870
: # build cross compiler for $(TARGET_ALIAS)
875
$(MAKE) -C $(builddir) $(NJOBS) \
881
) 2>&1 | tee bootstrap-protocol
882
s=`cat status`; rm -f status; test $$s -eq 0
884
# REVERSE_CROSS build
885
ifeq ($(REVERSE_CROSS),yes)
886
: # build cross compiler for $(TARGET_ALIAS)
891
$(MAKE) -C $(builddir) $(NJOBS) \
897
) 2>&1 | tee bootstrap-protocol
898
s=`cat status`; rm -f status; test $$s -eq 0
901
ifeq ($(with_java),yes)
903
ln -sf /usr/bin/fastjar bin/jar
904
ifeq ($(with_native_ecj),yes)
905
: # prepare the standalone ecj jar
906
cp /usr/share/java/ecj.jar $(srcdir)/ecj-standalone.jar
907
zip -d $(srcdir)/ecj-standalone.jar 'org/eclipse/jdt/core/JDTCompilerAdapter*'
909
ifeq ($(with_java_maintainer_mode),yes)
912
echo 'exec gij-4.3 -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain "$$@"'; \
915
: # If we don't have gjavah in PATH, try to build it with the old gij
917
if [ -x /usr/bin/gjavah-4.3 ]; then \
918
ln -sf /usr/bin/gjavah-4.3 bin/gjavah; \
919
elif [ -x bin/gjavah ]; then \
922
mkdir -p $(builddir)/java_hacks; \
923
cd $(builddir)/java_hacks; \
924
cp -a $(srcdir)/libjava/classpath/tools/external external; \
925
mkdir -p gnu/classpath/tools; \
926
cp -a $(srcdir)/libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt} \
927
gnu/classpath/tools/; \
928
cp -a $(srcdir)/libjava/classpath/resource/gnu/classpath/tools/common/Messages.properties \
929
gnu/classpath/tools/common; \
931
for i in `find . -name \*.java`; do gcj-4.3 --encoding ISO-8859-1 -C $$i -I.; done; \
933
for i in `find gnu -name \*.java`; do gcj-4.3 -C $$i -I. -Iexternal/asm/; done; \
934
gcj-4.3 -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main \
935
-I. -Iexternal/asm/ `find . -name \*.class` -o $(PWD)/bin/gjavah.real; \
938
echo 'export CLASSPATH='`pwd`'$${CLASSPATH:+:$$CLASSPATH}'; \
939
echo 'exec $(PWD)/bin/gjavah.real "$$@"'; \
940
) > $(PWD)/bin/gjavah; \
941
chmod +x $(PWD)/bin/gjavah; \
945
: # build native compiler
951
$(MAKE) -C $(builddir) $(NJOBS) $(bootstrap_target) \
954
$(STAGE1_CFLAGS_TO_PASS) \
958
) 2>&1 | tee bootstrap-protocol
959
s=`cat status`; rm -f status; test $$s -eq 0
962
-chmod 755 $(srcdir)/contrib/warn_summary
963
if [ -x $(srcdir)/contrib/warn_summary ]; then \
964
rm -f bootstrap-summary; \
965
$(srcdir)/contrib/warn_summary bootstrap-protocol \
966
> bootstrap-summary; \
971
ifeq ($(versioned_packages),yes)
972
hppa64_configure_flags += --program-suffix=-$(BASE_VERSION)
975
ifeq ($(DEB_CROSS),yes)
976
CC_for_hppa64_cross = $(CC)
978
CC_for_hppa64_cross = $(builddir)/gcc/xgcc -B$(builddir)/gcc/
981
$(configure_hppa64_stamp): $(build_stamp)
983
rm -f $(configure_hppa64_stamp) $(build_hppa64_stamp)
984
rm -rf $(builddir_hppa64)
985
mkdir $(builddir_hppa64)
987
cd $(builddir_hppa64) && \
990
CC="$(CC_for_hppa64_cross)" \
992
--enable-languages=c \
994
--libexecdir=/$(libexecdir) \
996
$(MULTIARCH_CONFARG) \
1001
--disable-libmudflap \
1003
--with-system-zlib \
1004
--with-as=/usr/bin/hppa64-linux-gnu-as \
1005
--with-ld=/usr/bin/hppa64-linux-gnu-ld \
1006
--includedir=/usr/hppa64-linux-gnu/include \
1007
--build=$(DEB_BUILD_GNU_TYPE) \
1008
--host=$(DEB_HOST_GNU_TYPE) \
1009
--target=hppa64-linux-gnu
1010
touch $(configure_hppa64_stamp)
1012
$(build_hppa64_stamp): $(configure_hppa64_stamp)
1016
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(builddir)/gcc \
1017
$(MAKE) -C $(builddir_hppa64) $(NJOBS) \
1018
CC="$(CC_for_hppa64_cross)" \
1021
touch $(build_hppa64_stamp)
1023
$(configure_neon_stamp): $(build_stamp)
1025
rm -f $(configure_neon_stamp) $(build_neon_stamp)
1026
rm -rf $(builddir_neon)
1027
mkdir $(builddir_neon)
1029
cd $(builddir_neon) && \
1032
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1034
--disable-bootstrap \
1035
--enable-languages=c,c++,objc,fortran \
1037
--libexecdir=/$(libexecdir) \
1038
--program-suffix=-$(BASE_VERSION) \
1039
--enable-multiarch \
1040
$(MULTIARCH_CONFARG) \
1042
--disable-libmudflap \
1043
--with-arch=armv7-a --with-tune=cortex-a8 \
1044
--with-float=$(float_abi) --with-fpu=neon \
1045
--host=arm-linux-gnueabi \
1046
--build=arm-linux-gnueabi \
1047
--target=arm-linux-gnueabi
1048
touch $(configure_neon_stamp)
1050
$(build_neon_stamp): $(configure_neon_stamp)
1054
$(MAKE) -C $(builddir_neon) $(NJOBS) \
1055
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1058
touch $(build_neon_stamp)
1060
$(configure_ia6432_stamp): $(build_stamp)
1062
rm -f $(configure_ia6432_stamp) $(build_ia6432_stamp)
1063
rm -rf $(builddir_ia6432)
1064
mkdir $(builddir_ia6432)
1066
cd $(builddir_ia6432) && \
1069
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1071
--enable-languages=c \
1073
--libexecdir=/$(libexecdir) \
1074
--enable-multiarch \
1075
$(MULTIARCH_CONFARG) \
1077
--disable-libmudflap \
1078
--program-suffix=-$(BASE_VERSION) \
1079
--host=ia64-linux-gnu \
1080
--build=ia64-linux-gnu \
1081
--target=i486-linux-gnu
1082
touch $(configure_ia6432_stamp)
1084
$(build_ia6432_stamp): $(configure_ia6432_stamp)
1087
$(MAKE) -C $(builddir_ia6432) $(NJOBS) \
1088
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1091
touch $(build_ia6432_stamp)
1093
spu_configure_args = \
1094
--enable-languages=c,c++,fortran \
1096
--libexecdir=/$(spulibexecdir) \
1100
--enable-checking=release \
1102
--with-system-zlib \
1104
--program-prefix=spu- \
1105
--with-as=/usr/bin/spu-as \
1106
--with-ar=/usr/bin/spu-ar \
1107
--with-ld=/usr/bin/spu-ld
1109
# FIXME: --with-sysroot=/usr/spu breaks libgfortran build
1110
#ifeq ($(PKGSOURCE),gcc-snapshot)
1111
# spu_configure_args += \
1112
# --with-sysroot=/usr/spu
1114
spu_configure_args += \
1115
--includedir=/usr/spu/include \
1116
--libdir=/usr/spu/lib
1119
spu_configure_args += \
1120
--host=$(DEB_HOST_GNU_TYPE) \
1121
--build=$(DEB_BUILD_GNU_TYPE) \
1124
$(configure_spu_stamp): $(src_spu_stamp) $(build_stamp)
1126
rm -f $(configure_spu_stamp) $(build_spu_stamp)
1127
rm -rf $(builddir_spu)
1128
mkdir $(builddir_spu)
1130
cd $(builddir_spu) && \
1133
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1134
../src-spu/configure $(spu_configure_args)
1135
touch $(configure_spu_stamp)
1137
$(build_spu_stamp): $(configure_spu_stamp)
1141
$(MAKE) -C $(builddir_spu) $(NJOBS) \
1142
CC="$(builddir)/gcc/xgcc -B$(builddir)/gcc/" \
1145
touch $(build_spu_stamp)
1149
$(srcdir)/gcc/doc/cpp.texi \
1150
$(srcdir)/gcc/doc/cppinternals.texi \
1151
$(srcdir)/gcc/doc/gcc.texi \
1152
$(srcdir)/gcc/doc/gccint.texi
1153
ifeq ($(with_fortran),yes)
1154
MANUALS += $(srcdir)/gcc/fortran/gfortran.texi
1156
ifeq ($(with_java),yes)
1157
MANUALS += $(srcdir)/gcc/java/gcj.texi
1159
ifeq ($(with_ada),yes)
1161
$(builddir)/gcc/doc/gnat_ugn.texi \
1162
$(srcdir)/gcc/ada/gnat_rm.texi \
1163
$(srcdir)/gcc/ada/gnat-style.texi
1165
ifeq ($(with_gomp),yes)
1166
MANUALS += $(srcdir)/libgomp/libgomp.texi
1169
html-docs: $(build_html_stamp)
1170
#$(build_html_stamp): html-texi2html
1171
#$(build_html_stamp): html-makeinfo
1172
$(build_html_stamp): html-makeinfo-nosplit
1175
rm -rf html $(builddir)/gcc/html
1176
mkdir $(builddir)/gcc/html
1177
ln -s $(builddir)/gcc/html html
1178
cd $(builddir)/gcc; \
1179
for manual in $(MANUALS); do \
1180
outname=`basename $${manual} .texi`; \
1181
echo "generating $$outname ..."; \
1182
texi2html -number -split chapter \
1183
-I $(srcdir)/gcc/doc/include \
1184
-I $(srcdir)/gcc/p/doc \
1185
-I $(srcdir)/gcc/p/doc/generated \
1186
-I `dirname $${manual}` \
1187
-I $(builddir)/gcc \
1195
cd $(builddir)/gcc; \
1196
for manual in $(MANUALS); do \
1197
manual=`find $(srcdir) -name $${file}.texi`; \
1198
outname=`basename $${manual} .texi`; \
1199
echo "generating $$outname ..."; \
1200
if [ "$${manual}" ]; then \
1201
makeinfo --html --number-sections \
1202
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1203
-I $(srcdir)/gcc/p/doc \
1204
-I $(srcdir)/gcc/p/doc/generated \
1205
-I $(builddir)/gcc \
1211
html-makeinfo-nosplit:
1214
cd $(builddir)/gcc; \
1215
for manual in $(MANUALS); do \
1216
outname=`basename $${manual} .texi`.html; \
1217
echo "generating $$outname ..."; \
1218
makeinfo --html --number-sections --no-split \
1219
-I $(srcdir)/gcc/doc/include -I `dirname $${manual}` \
1220
-I $(srcdir)/gcc/p/doc \
1221
-I $(srcdir)/gcc/p/doc/generated \
1222
-I $(builddir)/gcc \
1223
-o $(PWD)/html/$${outname} \
1227
# start the script only on architectures known to have slow autobuilders ...
1228
logwatch_archs := alpha arm m68k mips mipsel sparc
1229
ifeq ($(DEB_HOST_GNU_CPU), $(findstring $(DEB_HOST_GNU_CPU),$(logwatch_archs)))
1230
start_logwatch = yes
1232
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
1233
start_logwatch = yes
1236
stamps/mauve-build: stamps/build
1239
ifeq ($(with_mauve_check),yes)
1240
tar xf $(wildcard /usr/src/mauve*.tar.*)
1245
&& PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
1246
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH $(MAKE) -C mauve
1250
stamps/mauve-check: stamps/build stamps/mauve-build
1251
ifeq ($(with_mauve_check),yes)
1253
JAVA_HOME=$(CURDIR)/$(sdkimg) \
1254
PATH=$(CURDIR)/$(sdkimg)/bin:$$PATH \
1255
xvfb-run -s "-extension GLX" java Harness \
1256
-vm $(CURDIR)/$(sdkimg)/bin/java \
1257
-file $(CURDIR)/debian/mauve_tests \
1258
-timeout 30000 2>&1 \
1262
echo "mauve testsuite not run for this build" > mauve/mauve_output
1266
check: $(check_stamp) # $(if $(filter yes, $(with_java)),stamps/05-build-mauve-stamp) #$(check_inst_stamp)
1267
$(check_stamp): $(build_stamp) $(build_locale_stamp)
1270
-chmod 755 $(srcdir)/contrib/test_summary
1271
ifneq ($(with_common_libs),yes)
1272
: # libstdc++6 built from newer gcc-4.x source, run testsuite against the installed lib
1274
sed 's/-L[^ ]*//g' $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags \
1275
> $(buildlibdir)/libstdc++-v3/scripts/testsuite_flags.installed
1278
for d in $(buildlibdir)/libstdc++-v3/testsuite; do \
1279
echo "Running testsuite in $$d ..."; \
1284
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1286
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1287
done 2>&1 | tee test-protocol2
1289
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1290
$(srcdir)/contrib/test_summary -m "$(S_EMAIL)" > raw-test-summary
1292
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary; \
1293
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF; \
1294
) > libstdc++-test-summary
1295
echo 'BEGIN installed libstdc++-v3 test-summary'
1296
cat libstdc++-test-summary
1297
echo 'END installed libstdc++-v3 test-summary'
1298
find $(buildlibdir)/libstdc++-v3/testsuite -name '*.log' -o -name '*.sum' \
1302
ifeq ($(start_logwatch),yes)
1303
: # start logwatch script for regular output during test runs
1304
chmod +x debian/logwatch.sh
1305
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch.pid \
1306
-m '\ntestsuite still running ...\n' \
1308
$(builddir)/gcc/testsuite/gcc/gcc.log \
1309
$(builddir)/gcc/testsuite/g++/g++.log \
1310
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1311
$(builddir)/gcc/testsuite/objc/objc.log \
1312
$(builddir)/gcc/testsuite/obj-c++/obj-c++.log \
1313
$(builddir)/gcc/testsuite/gnat/gnat.log \
1314
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1315
$(builddir)/gcc/testsuite/gfortran/gfortran.log \
1316
$(builddir)/gcc/p/test/test_log \
1317
$(buildlibdir)/libstdc++-v3/testsuite/libstdc++-v3.log \
1318
$(buildlibdir)/libjava/testsuite/libjava.log \
1319
$(buildlibdir)/libmudflap/testsuite/libmudflap.log \
1320
$(buildlibdir)/libgomp/testsuite/libgomp.log \
1321
$(buildlibdir)/libffi/testsuite/libffi.log \
1325
ifeq ($(with_ada),yes)
1326
chmod +x debian/acats-killer.sh
1327
-debian/acats-killer.sh -p $(builddir)/acats-killer.pid \
1328
$(builddir)/gcc/testsuite/ada/acats/acats.log \
1329
$(builddir)/gcc/testsuite/g++.log \
1335
for d in $(checkdirs); do \
1336
echo "Running testsuite in $$d ..."; \
1340
EXTRA_TEST_PFLAGS=-g0 \
1341
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1343
$(MAKE) -k -C $$d $(NJOBS) check $(RUNTESTFLAGS); \
1344
done 2>&1 | tee test-protocol
1346
-ps aux | fgrep logwatch | fgrep -v fgrep
1347
-if [ -f $(builddir)/logwatch.pid ]; then \
1348
kill -1 `cat $(builddir)/logwatch.pid`; \
1350
kill -9 `cat $(builddir)/logwatch.pid`; \
1351
rm -f $(builddir)/logwatch.pid; \
1353
-ps aux | fgrep logwatch | fgrep -v fgrep
1355
ifeq ($(with_ada),yes)
1356
-if [ -f $(builddir)/acats-killer.pid ]; then \
1357
kill -1 `cat $(builddir)/acats-killer.pid`; \
1359
kill -9 `cat $(builddir)/acats-killer.pid`; \
1360
rm -f $(builddir)/acats-killer.pid; \
1364
: # running the libjava testsuite alone is missing this information
1365
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -v > $(builddir)/compiler_version.sum 2>&1
1367
if [ -x $(srcdir)/contrib/test_summary ]; then \
1368
rm -f test-summary; \
1371
echo '' > ts-include; \
1372
echo '' >> ts-include; \
1373
if [ -f $(builddir)/gcc/.bad_compare ]; then \
1374
echo 'Bootstrap comparison failure:' >> ts-include; \
1375
cat $(builddir)/gcc/.bad_compare >> ts-include; \
1376
echo '' >> ts-include; \
1377
echo '' >> ts-include; \
1379
echo "Build Dependencies:" >> ts-include; \
1380
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1381
libgmp3-dev libmpfr-dev libmpc-dev libppl0.10-dev libcloog-ppl-dev \
1382
| fgrep -v '<none>' >> ts-include; \
1383
echo '' >> ts-include; \
1384
cat ../$(patch_stamp) >> ts-include; \
1385
BOOT_CFLAGS="$(BOOT_CFLAGS)" \
1386
$(srcdir)/contrib/test_summary \
1387
-i ts-include -m "$(S_EMAIL)" \
1388
) > raw-test-summary; \
1389
if [ -n "$(testsuite_tarball)" ]; then \
1390
echo "Test suite used: $(testsuite_srcdir)" > test-summary; \
1391
echo " Do not interpret the results on its own" >> test-summary; \
1392
echo " but compare them with the results from" >> test-summary; \
1393
echo " the gcc-snapshot package." >> test-summary; \
1395
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-summary \
1397
awk '/^cat/, /^EOF/' raw-test-summary | grep -v EOF >> test-summary; \
1398
if [ -f bootstrap-summary -a "$(bootstrap_target)" != profiledbootstrap ]; then \
1399
echo '' >> test-summary; \
1400
cat bootstrap-summary >> test-summary; \
1402
echo 'BEGIN test-summary'; \
1404
echo 'END test-summary'; \
1407
touch $(check_stamp)
1409
$(check_inst_stamp): $(check_stamp)
1410
rm -f test-inst-protocol
1412
ifeq ($(start_logwatch),yes)
1413
: # start logwatch script for regular output during test runs
1414
chmod +x debian/logwatch.sh
1415
-debian/logwatch.sh -t 900 -p $(builddir)/logwatch-inst.pid \
1416
-m '\ntestsuite (3.3) still running ...\n' \
1417
test-inst-protocol \
1418
check-inst/{gcc,g++,g77,objc}.log \
1425
echo "Running testsuite ..."
1429
EXTRA_TEST_PFLAGS=-g0 \
1430
DEJAGNU_TIMEOUT=$(DEJAGNU_TIMEOUT) \
1431
cd check-inst && $(srcdir)/contrib/test_installed \
1432
--with-gcc=gcc-3.3 --with-g++=g++-3.3 --with-g77=g77-3.3 \
1433
2>&1 | tee test-inst-protocol
1435
-ps aux | fgrep logwatch | fgrep -v fgrep
1436
if [ -f $(builddir)/logwatch-inst.pid ]; then \
1437
kill -1 `cat $(builddir)/logwatch-inst.pid`; \
1441
-ps aux | fgrep logwatch | fgrep -v fgrep
1443
-chmod 755 $(srcdir)/contrib/test_summary
1444
if [ -x $(srcdir)/contrib/test_summary ]; then \
1445
rm -f test-inst-summary; \
1448
echo '' > ts-include; \
1449
echo '' >> ts-include; \
1450
echo "Build Dependencies:" >> ts-include; \
1451
dpkg -l g++-* binutils* `echo '$(LIBC_DEP)' | awk '{print $$1}'` \
1452
libgmp3-dev libmpfr-dev libmpc-dev libppl0.10-dev libcloog-ppl-dev \
1453
| fgrep -v '<none>' >> ts-include; \
1454
echo '' >> ts-include; \
1455
echo 'Results for the installed GCC-3.3 compilers' >> ts-include; \
1456
$(srcdir)/contrib/test_summary \
1457
-i ts-include -m "$(S_EMAIL)" \
1458
) > raw-test-inst-summary; \
1459
sed -n '/^Mail/s/.*"\([^"][^"]*\)".*/\1/p' raw-test-inst-summary \
1460
>> test-inst-summary; \
1461
awk '/^cat/, /^EOF/' raw-test-inst-summary \
1462
| grep -v EOF >> test-inst-summary; \
1463
echo 'BEGIN test-installed-summary'; \
1464
cat test-inst-summary; \
1465
echo 'END test-installed-summary'; \
1468
chmod 755 debian/reduce-test-diff.awk
1469
if diff -u test-inst-summary test-summary \
1470
| debian/reduce-test-diff.awk > diff-summary; \
1472
mv -f diff-summary testsuite-comparision; \
1475
echo "WARNING: New failures in gcc-3.4 compared to gcc-3.3"; \
1478
) > testsuite-comparision; \
1479
rm -f diff-summary; \
1481
touch $(check_inst_stamp)
1483
clean: debian/control
1486
rm -f *-summary *-protocol testsuite-comparision summary-diff
1487
if [ -f $(srcdir)/gcc/p/config-lang.in.debian ]; then \
1488
mv -f $(srcdir)/gcc/p/config-lang.in.debian $(srcdir)/gcc/p/config-lang.in; \
1490
rm -f $(srcdir)/gcc/po/*.gmo
1491
rm -f debian/lib{gcc,gcj,objc,stdc++}{-v3,[0-9]}*.{{pre,post}{inst,rm},shlibs}
1492
fs=`echo debian/*BV* debian/*GCJ* debian/*CXX* debian/*LC* debian/*MF* | sort -u`; \
1494
[ -f $$f ] || continue; \
1496
| sed 's/BV/$(BASE_VERSION)/;s/CXX/$(CXX_SONAME)/;s/LGCJ/$(PKG_LIBGCJ_EXT)/;s/GCJ/$(PKG_GCJ_EXT)/;s/LC/$(GCC_SONAME)/;s/MF/$(MUDFLAP_SONAME)/;s/-CRB/$(cross_bin_arch)/;s/\.in$$//'); \
1499
rm -f debian/shlibs.local debian/substvars.local
1500
rm -f debian/*.debhelper
1501
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
1502
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
1503
rm -f debian/lib*gcj-bc.shlibs
1504
rm -rf bin locales share
1509
# -----------------------------------------------------------------------------
1510
# some abbrevations for the package names and directories;
1511
# p_XXX is the package name, d_XXX is the package directory
1512
# these macros are only used in the binary-* targets.
1514
ifeq ($(versioned_packages),yes)
1515
pkg_ver := -$(BASE_VERSION)
1518
ifneq ($(DEB_CROSS),yes)
1519
p_base = gcc$(pkg_ver)-base
1520
p_gcc = gcc$(pkg_ver)
1521
p_cpp = cpp$(pkg_ver)
1522
p_cppd = cpp$(pkg_ver)-doc
1523
p_cxx = g++$(pkg_ver)
1524
p_doc = gcc$(pkg_ver)-doc
1525
p_lgcc = libgcc$(GCC_SONAME)
1527
# only triggered if DEB_CROSS set
1528
p_base = gcc$(pkg_ver)$(cross_bin_arch)-base
1529
p_cpp = cpp$(pkg_ver)$(cross_bin_arch)
1530
p_gcc = gcc$(pkg_ver)$(cross_bin_arch)
1531
p_cxx = g++$(pkg_ver)$(cross_bin_arch)
1533
p_hppa64 = gcc$(pkg_ver)-hppa64
1536
d_base = debian/$(p_base)
1537
d_gcc = debian/$(p_gcc)
1538
d_cpp = debian/$(p_cpp)
1539
d_cppd = debian/$(p_cppd)
1540
d_cxx = debian/$(p_cxx)
1541
d_doc = debian/$(p_doc)
1542
d_lgcc = debian/$(p_lgcc)
1543
d_hppa64= debian/$(p_hppa64)
1545
d_spu = debian/tmp-spu
1546
d_neon = debian/tmp-neon
1548
common_substvars = \
1549
$(shell awk "{printf \"'-V%s' \", \$$0}" debian/substvars.local)
1551
ifeq ($(DEB_CROSS),yes)
1552
lib_binaries := indep_binaries
1554
lib_binaries := arch_binaries
1557
# ---------------------------------------------------------------------------
1559
ifeq ($(PKGSOURCE),gcc-snapshot)
1560
include debian/rules.d/binary-snapshot.mk
1563
ifneq ($(DEB_CROSS),yes)
1564
ifeq ($(with_source),yes)
1565
include debian/rules.d/binary-source.mk
1569
ifneq ($(BACKPORT),true)
1570
ifeq ($(with_gccxbase),yes)
1571
include debian/rules.d/binary-base.mk
1574
ifeq ($(with_gccbase),yes)
1575
include debian/rules.d/binary-base.mk
1578
ifneq ($(DEB_STAGE),stage1)
1579
include debian/rules.d/binary-libgcc.mk
1582
ifeq ($(with_libqmath),yes)
1583
include debian/rules.d/binary-libquadmath.mk
1586
ifeq ($(with_libgmath),yes)
1587
include debian/rules.d/binary-libgccmath.mk
1590
ifeq ($(with_libgomp),yes)
1591
include debian/rules.d/binary-libgomp.mk
1594
ifeq ($(with_cdev),yes)
1595
include debian/rules.d/binary-cpp.mk
1598
ifeq ($(with_fixincl),yes)
1599
include debian/rules.d/binary-fixincl.mk
1602
ifeq ($(with_mudflap),yes)
1603
include debian/rules.d/binary-libmudflap.mk
1606
ifeq ($(with_libssp),yes)
1607
include debian/rules.d/binary-libssp.mk
1610
ifeq ($(with_objcxx),yes)
1611
include debian/rules.d/binary-objcxx.mk
1614
ifeq ($(with_objc),yes)
1615
include debian/rules.d/binary-objc.mk
1617
ifeq ($(with_libobjc),yes)
1618
include debian/rules.d/binary-libobjc.mk
1621
ifeq ($(with_go),yes)
1622
include debian/rules.d/binary-go.mk
1625
# include before cxx
1626
ifeq ($(with_java),yes)
1627
include debian/rules.d/binary-java.mk
1630
ifeq ($(with_cxxdev),yes)
1631
include debian/rules.d/binary-cxx.mk
1633
ifeq ($(with_cxx),yes)
1634
include debian/rules.d/binary-libstdcxx.mk
1637
ifeq ($(with_f77),yes)
1638
include debian/rules.d/binary-f77.mk
1641
ifeq ($(with_fortran),yes)
1642
include debian/rules.d/binary-fortran.mk
1645
ifeq ($(with_ada),yes)
1646
include debian/rules.d/binary-ada.mk
1649
ifeq ($(with_d),yes)
1650
include debian/rules.d/binary-d.mk
1653
ifeq ($(with_libnof),yes)
1654
ifeq ($(DEB_TARGET_GNU_CPU),powerpc)
1655
include debian/rules.d/binary-nof.mk
1659
# gcc must be moved/built after g77 and g++
1660
ifeq ($(with_cdev),yes)
1661
include debian/rules.d/binary-gcc.mk
1664
ifeq ($(with_hppa64),yes)
1665
include debian/rules.d/binary-hppa64.mk
1668
ifeq ($(with_neon),yes)
1669
include debian/rules.d/binary-neon.mk
1672
ifeq ($(with_spu),yes)
1673
include debian/rules.d/binary-spu.mk
1677
endif # ($(PKGSOURCE),gcc-snapshot)
1679
# ----------------------------------------------------------------------
1680
install: $(install_dependencies)
1682
$(install_dummy_stamp): $(build_dummy_stamp)
1683
touch $(install_dummy_stamp)
1685
$(install_snap_stamp): $(build_dependencies)
1690
: # Install directories
1694
ifeq ($(with_hppa64),yes)
1697
$(MAKE) -C $(builddir_hppa64) \
1700
$(LDFLAGS_TO_PASS) \
1701
DESTDIR=$(PWD)/$(d) \
1704
ls -l $(d)/$(PF)/bin
1705
if [ ! -x $(d)/$(PF)/bin/hppa64-linux-gnu-gcc ]; then \
1706
mv $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4* $(d)/$(PF)/bin/hppa64-linux-gnu-gcc; \
1708
rm -f $(d)/$(PF)/bin/hppa64-linux-gnu-gcc-4*; \
1711
: # remove files not needed from the hppa64 build
1712
rm -rf $(d)/$(PF)/share/info
1713
rm -rf $(d)/$(PF)/share/man
1714
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1715
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1717
rm -rf $(d)/$(PF)/hppa64-linux-gnu/include
1718
rm -rf $(d)/$(PF)/hppa64-linux-gnu/lib
1720
cd $(d)/$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/include-fixed; \
1723
README|features.h|syslimits.h|limits.h) ;; \
1724
linux|$(TARGET_ALIAS)) ;; \
1725
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1726
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1731
ifeq ($(with_spu),yes)
1734
$(MAKE) -C $(builddir_spu) \
1737
$(LDFLAGS_TO_PASS) \
1738
DESTDIR=$(PWD)/$(d) \
1741
ls -l $(d)/$(PF)/bin
1742
if [ ! -x $(d)/$(PF)/bin/spu-gcc ]; then \
1743
mv $(d)/$(PF)/bin/spu-gcc-4* $(d)/$(PF)/bin/spu-gcc; \
1745
rm -f $(d)/$(PF)/bin/spu-gcc-4*; \
1747
if [ ! -x $(d)/$(PF)/bin/spu-g++ ]; then \
1748
mv $(d)/$(PF)/bin/spu-g++-4* $(d)/$(PF)/bin/spu-g++; \
1750
rm -f $(d)/$(PF)/bin/spu-g++-4*; \
1752
ifneq (,$(findstring fortran, $(spu_configure_args)))
1753
if [ ! -x $(d)/$(PF)/bin/spu-gfortran ]; then \
1754
mv $(d)/$(PF)/bin/spu-gfortran-4* $(d)/$(PF)/bin/spu-gfortran; \
1756
rm -f $(d)/$(PF)/bin/spu-gfortran-4*; \
1759
rm -f $(d)/$(PF)/bin/spu-c++*
1761
: # remove files not needed from the spu build
1762
rm -rf $(d)/$(PF)/info $(d)/$(PF)/share/info
1763
rm -rf $(d)/$(PF)/man $(d)/$(PF)/share/man
1764
rm -rf $(d)/$(PF)/$(libdir)/gcc/spu/$(GCC_VERSION)/plugin
1765
rm -f $(d)/$(PF)/$(libdir)/libiberty.a
1766
rm -f $(d)/$(PF)/bin/*{gcov,gccbug,gcc}
1769
# rm -rf $(d)/$(PF)/spu/include
1770
# rm -rf $(d)/$(PF)/spu/lib
1772
cd $(d)/$(PF)/$(libdir)/gcc/spu/$(GCC_VERSION)/include-fixed; \
1775
README|features.h|syslimits.h|limits.h) ;; \
1776
linux|$(TARGET_ALIAS)) ;; \
1777
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1778
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1783
: # Work around PR lto/41569
1784
ln -sf gcc $(builddir)/prev-gcc
1786
: # Install everything
1789
$(MAKE) -C $(builddir) \
1791
$(LDFLAGS_TO_PASS) \
1792
DESTDIR=$(PWD)/$(d) \
1793
infodir=/$(PF)/share/info \
1794
mandir=/$(PF)/share/man \
1797
ls -l $(d)/$(PF)/bin
1798
if [ ! -x $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc ]; then \
1799
mv $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4* $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc; \
1801
rm -f $(d)/$(PF)/bin/$(TARGET_ALIAS)-gcc-4*; \
1804
cd $(d)/$(gcc_lib_dir)/include-fixed; \
1807
README|features.h|syslimits.h|limits.h) ;; \
1808
linux|$(TARGET_ALIAS)) ;; \
1809
$(subst $(DEB_TARGET_GNU_CPU),$(biarch_cpu),$(TARGET_ALIAS))) ;; \
1810
*) echo "remove include-fixed/$$i"; rm -rf $$i; \
1814
ifeq ($(biarch64)-$(with_cxx),yes-yes)
1815
ifneq (,$(filter libstdc++-v3, $(biarch_multidir_names)))
1816
: # fix biarch C++ header installation
1817
ifeq ($(DEB_TARGET_ARCH),i386)
1818
mv $(d)/$(cxx_inc_dir)/x86_64-linux-gnu/64 \
1819
$(d)/$(cxx_inc_dir)/i486-linux-gnu/
1820
rmdir $(d)/$(cxx_inc_dir)/x86_64-linux-gnu
1822
ifeq ($(DEB_TARGET_ARCH),powerpc)
1823
mv $(d)/$(cxx_inc_dir)/powerpc64-linux-gnu/64 \
1824
$(d)/$(cxx_inc_dir)/powerpc-linux-gnu/
1825
rmdir $(d)/$(cxx_inc_dir)/powerpc64-linux-gnu
1827
ifeq ($(DEB_TARGET_ARCH),s390)
1828
mv $(d)/$(cxx_inc_dir)/s390x-linux-gnu/64 \
1829
$(d)/$(cxx_inc_dir)/s390-linux-gnu/
1830
rmdir $(d)/$(cxx_inc_dir)/s390x-linux-gnu
1835
# FIXME: libjava/classpath not correctly patched
1836
ifeq ($(with_java),yes)
1837
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1838
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1839
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1840
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1841
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1844
ln -sf libgcj.so.$(GCJ_SONAME).0.0 $(d)/$(PF)/lib/libgcj_bc.so.1.0.0
1846
install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
1847
$(d)/$(gcc_lib_dir)/libgcj_bc.so
1848
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic -xc /dev/null \
1849
-o build/libgcj.so -Wl,-soname,libgcj.so.$(GCJ_SONAME) -nostdlib
1850
$(builddir)/gcc/xgcc -B$(builddir)/gcc/ -shared -fpic \
1851
$(srcdir)/libjava/libgcj_bc.c \
1852
-o $(d)/$(gcc_lib_dir)/libgcj_bc.so \
1853
-Wl,-soname,libgcj_bc.so.1 $(builddir)/libgcj.so -shared-libgcc
1857
if [ -d $(d)/usr/man/man1 ]; then \
1858
mv $(d)/usr/man/man1/* $(d)/usr/share/man/man1/; \
1861
chmod 755 debian/dh_*
1862
touch $(install_snap_stamp)
1864
$(install_stamp): $(build_stamp)
1867
dh_clean -k -N$(p_hppa64)
1869
if [ -f $(binary_stamp)-hppa64 ]; then \
1870
mv $(binary_stamp)-hppa64 saved-stamp-hppa64; \
1872
if [ -f $(binary_stamp)-spu ]; then \
1873
mv $(binary_stamp)-spu saved-stamp-spu; \
1875
rm -f $(binary_stamp)*
1876
if [ -f saved-stamp-hppa64 ]; then \
1877
mv saved-stamp-hppa64 $(binary_stamp)-hppa64; \
1879
if [ -f saved-stamp-spu ]; then \
1880
mv saved-stamp-spu $(binary_stamp)-spu; \
1883
: # Install directories
1885
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
1886
ifeq ($(biarch32),yes)
1887
mkdir -p $(d)/$(PF)/lib32/debug
1889
ifeq ($(biarch64),yes)
1890
mkdir -p $(d)/$(PF)/lib64/debug
1892
ifeq ($(biarchn32),yes)
1893
mkdir -p $(d)/$(PF)/$(libn32)/debug
1896
ifneq (,$(filter $(DEB_TARGET_GNU_CPU),x86_64 sparc64))
1897
: # link lib to lib64 and $(PF)/lib to $(PF)/lib64
1898
: # (this works when CONFARGS contains '--disable-multilib')
1899
ln -s $(libdir) $(d)/lib64
1900
mkdir -p $(d)/$(PF)/$(libdir)
1901
ln -s $(libdir) $(d)/$(PF)/lib64
1904
: # Work around PR lto/41569
1905
ln -sf gcc $(builddir)/prev-gcc
1907
: # Install everything
1910
$(MAKE) -C $(builddir) \
1912
$(LDFLAGS_TO_PASS) \
1913
DESTDIR=$(PWD)/$(d) \
1914
infodir=/$(PF)/share/info \
1915
mandir=/$(PF)/share/man \
1918
ifeq ($(with_common_gcclibdir),yes)
1919
mv $(d)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lib_dir)) \
1921
if [ -d $(d)/$(PF)/share/gcc-$(GCC_VERSION) ] ; then \
1922
mv $(d)/$(PF)/share/gcc-$(GCC_VERSION) $(d)/$(PF)/share/gcc-$(BASE_VERSION); \
1924
ifneq ($(gcc_lib_dir),$(gcc_lexec_dir))
1925
mv $(d)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lexec_dir)) \
1926
$(d)/$(gcc_lexec_dir)
1928
ifeq ($(with_d),yes)
1929
mv $(d)/$(PF)/include/d/$(GCC_VERSION) \
1930
$(d)/$(PF)/include/d/$(BASE_VERSION)
1934
ifeq ($(biarch64)-$(with_cxx),yes-yes)
1935
ifneq (,$(filter libstdc++-v3, $(biarch_multidir_names)))
1936
ifeq ($(DEB_TARGET_ARCH),i386)
1937
: # fix biarch C++ header installation
1938
mv $(d)/$(cxx_inc_dir)/x86_64-linux-gnu/64 \
1939
$(d)/$(cxx_inc_dir)/i486-linux-gnu/
1940
rmdir $(d)/$(cxx_inc_dir)/x86_64-linux-gnu
1942
ifeq ($(DEB_TARGET_ARCH),powerpc)
1943
: # fix biarch C++ header installation
1944
mv $(d)/$(cxx_inc_dir)/powerpc64-linux-gnu/64 \
1945
$(d)/$(cxx_inc_dir)/powerpc-linux-gnu/
1946
rmdir $(d)/$(cxx_inc_dir)/powerpc64-linux-gnu
1951
# FIXME: libjava/classpath not correctly patched
1952
ifeq ($(with_java),yes)
1953
-if [ -d $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME) ]; then \
1954
ls -l $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1955
mv $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME)/* \
1956
$(d)/$(PF)/lib/gcj-$(BASE_VERSION)-$(GCJ_SONAME)/; \
1957
rmdir $(d)/$(PF)/lib/gcj-$(GCC_VERSION)-$(GCJ_SONAME); \
1961
: # remove rpath settings from binaries and shared libs
1962
for i in $$(chrpath -k $(d)/$(PF)/bin/* $(d)/$(PF)/lib*/lib*.so.* \
1963
$(d)/$(PF)/lib*/gcj$(pkg_ver)*/lib*.so.* \
1964
2>/dev/null | awk -F: '/RPATH=/ {print $$1}'); \
1966
case "$$i" in ecj1|*gij-*|*libjawt*|*libjvm*) continue; esac; \
1967
[ -h $$i ] && continue; \
1968
chrpath --delete $$i; \
1969
echo "removed RPATH: $$i"; \
1972
: # remove '*.la' and '*.lai' files, not shipped in any package.
1973
find $(d) -name '*.la' -o -name '*.lai' | xargs -r rm -f
1975
ifneq ($(with_libgnat),yes)
1976
rm -f $(d)/$(gcc_lib_dir)/adalib/lib*.so*
1979
ifeq ($(GFDL_INVARIANT_FREE),yes)
1980
for i in gcc gcov; do \
1981
I=`echo $$i | tr a-z A-Z`; \
1982
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
1983
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
1986
ifeq ($(with_fortran),yes)
1988
I=`echo $$i | tr a-z A-Z`; \
1989
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
1990
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
1993
ifeq ($(with_java),yes)
1994
for i in gcj gcjh gij jv-convert jv-scan jcf-dump grmic grmiregistry; \
1996
I=`echo $$i | tr a-z A-Z`; \
1997
sed -e "s/@NAME@/$$I$(pkg_ver)/g" -e "s/@name@/$$i$(pkg_ver)/g" \
1998
debian/dummy-man.1 > $(d)/$(PF)/share/man/man1/$$i.1; \
2003
# ifeq ($(with_ada),yes)
2004
# : # rename files (versioned ada binaries)
2006
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2007
# mv $(d)/$(PF)/share/man/man1/$$i.1 \
2008
# $(d)/$(PF)/share/man/man1/$$i-$(GNAT_VERSION).1; \
2010
# for i in $(GNAT_TOOLS); do \
2011
# mv $(d)/$(PF)/bin/$$i $(d)/$(PF)/bin/$$i-$(GNAT_VERSION); \
2015
ifeq ($(DEB_CROSS),yes)
2016
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),s390-yes)
2017
: # s390 64bit stuff happens to be in s390x-linux-gnu/lib64/
2018
mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64
2019
cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/
2021
ifeq ($(DEB_TARGET_ARCH)-$(biarch64),powerpc-yes)
2022
: # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu
2023
cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/
2027
chmod 755 debian/dh_*
2029
# tar cf tmp.tar debian/tmp
2031
touch $(install_stamp)
2033
$(install_hppa64_stamp): $(build_hppa64_stamp)
2037
mkdir -p $(d_hppa64)/$(PF)
2040
$(MAKE) -C $(builddir_hppa64) \
2043
$(LDFLAGS_TO_PASS) \
2044
DESTDIR=$(PWD)/$(d_hppa64) \
2047
ifeq ($(versioned_packages),yes)
2048
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-gcc-$(GCC_VERSION) \
2049
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-gcc$(pkg_ver)
2050
mv $(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp \
2051
$(d_hppa64)/$(PF)/bin/hppa64-linux-gnu-cpp$(pkg_ver)
2054
ifneq ($(PKGSOURCE),gcc-snapshot)
2055
: # remove files not needed
2056
rm -rf $(d_hppa64)/$(PF)/info $(d_hppa64)/$(PF)/share/info
2057
rm -rf $(d_hppa64)/$(PF)/man $(d_hppa64)/$(PF)/share/man
2058
rm -rf $(d_hppa64)/$(PF)/$(libdir)/gcc/spu/$(GCC_VERSION)/plugin
2059
rm -f $(d_hppa64)/$(PF)/$(libdir)/libiberty.a
2060
rm -f $(d_hppa64)/$(PF)/bin/*{gcov,gccbug,gcc}
2062
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/include
2063
rm -rf $(d_hppa64)/$(PF)/hppa64-linux-gnu/lib
2064
rm -rf $(d_hppa64)//$(PF)/$(libdir)/gcc/hppa64-linux-gnu/$(GCC_VERSION)/install-tools
2067
touch $(install_hppa64_stamp)
2069
$(install_neon_stamp): $(build_neon_stamp)
2073
mkdir -p $(d_neon)/$(PF)
2076
$(MAKE) -C $(builddir_neon) \
2079
$(LDFLAGS_TO_PASS) \
2080
DESTDIR=$(PWD)/$(d_neon) \
2082
touch $(install_neon_stamp)
2084
$(install_spu_stamp): $(build_spu_stamp)
2088
mkdir -p $(d_spu)/$(PF)
2091
$(MAKE) -C $(builddir_spu) \
2094
$(LDFLAGS_TO_PASS) \
2095
DESTDIR=$(PWD)/$(d_spu) \
2098
ifeq ($(with_common_gcclibdir),yes)
2099
mv $(d_spu)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_spu_lib_dir)) \
2100
$(d_spu)/$(gcc_spu_lib_dir)
2101
ifneq ($(gcc_spu_lib_dir),$(gcc_spu_lexec_dir))
2102
mv $(d_spu)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_spu_lexec_dir)) \
2103
$(d_spu)/$(gcc_spu_lexec_dir)
2107
ifeq ($(versioned_packages),yes)
2108
mv $(d_spu)/$(PF)/bin/spu-cpp \
2109
$(d_spu)/$(PF)/bin/spu-cpp$(pkg_ver)
2110
mv $(d_spu)/$(PF)/bin/spu-gcc-$(GCC_VERSION) \
2111
$(d_spu)/$(PF)/bin/spu-gcc$(pkg_ver)
2112
mv $(d_spu)/$(PF)/bin/spu-g++ \
2113
$(d_spu)/$(PF)/bin/spu-g++$(pkg_ver)
2114
ifneq (,$(findstring fortran, $(spu_configure_args)))
2115
mv $(d_spu)/$(PF)/bin/spu-gfortran \
2116
$(d_spu)/$(PF)/bin/spu-gfortran$(pkg_ver)
2118
rm -f $(d_spu)/$(PF)/bin/spu-c++*
2120
ifneq ($(GFDL_INVARIANT_FREE),yes)
2121
for i in spu-cpp spu-gcc spu-g++ spu-gcov spu-gfortran; do \
2122
mv $(d_spu)/$(PF)/share/man/man1/$$i.1 $(d_spu)/$(PF)/share/man/man1/$$i-$(BASE_VERSION).1; \
2127
ifneq ($(PKGSOURCE),gcc-snapshot)
2128
: # remove files not needed
2129
rm -rf $(d_spu)/$(PF)/info
2130
# rm -rf $(d_spu)/$(PF)/man
2131
rm -f $(d_spu)/$(PF)/$(libdir)/libiberty.a
2132
rm -f $(d_spu)/$(PF)/bin/*{gcov,gccbug,gcc}
2134
# rm -rf $(d_spu)/$(PF)/spu/include
2135
# rm -rf $(d_spu)/$(PF)/spu/lib
2138
touch $(install_spu_stamp)
2140
# ----------------------------------------------------------------------
2141
# Build architecture-dependent files here.
2142
#binary-arch: build install $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2143
binary-arch: $(foreach i,$(arch_binaries),$(binary_stamp)-$(i))
2144
ifeq ($(with_check),yes)
2146
# : # Send Email about sucessfull build.
2147
# # cat raw-test-summary | sh; echo "Sent mail to $(S_EMAIL)"
2150
# ----------------------------------------------------------------------
2151
# Build architecture-independent files here.
2152
#binary-indep: build install $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2153
binary-indep: $(foreach i,$(indep_binaries),$(binary_stamp)-$(i))
2156
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
2158
binary: binary-indep binary-arch
2159
.PHONY: build clean binary-indep binary-arch binary