Bug#603948: gcj-4.4: Armhf support
Source: gcj-4.4
Severity: wishlist
Tags: patch
The attached patch enables the package to build on armhf.
Konstantinos
diff -ruN gcj-4.4-4.4.5.orig//debian/changelog gcj-4.4-4.4.5/debian/changelog
--- gcj-4.4-4.4.5.orig//debian/changelog 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/changelog 2010-11-18 18:14:40.000000000 +0000
@@ -1,3 +1,9 @@
+gcj-4.4 (4.4.5-2+armhf) unreleased; urgency=low
+
+ * Added armhf support
+
+ -- Konstantinos Margaritis <markos@genesi-usa.com> Tue, 09 Nov 2010 20:08:56 +0000
+
gcj-4.4 (4.4.5-2) unstable; urgency=low
* Update the packaging corresponding to gcc-4.4 4.4.5-3.
diff -ruN gcj-4.4-4.4.5.orig//debian/control gcj-4.4-4.4.5/debian/control
--- gcj-4.4-4.4.5.orig//debian/control 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/control 2010-11-18 18:14:40.000000000 +0000
@@ -4,7 +4,7 @@
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Uploaders: Matthias Klose <doko@debian.org>, Arthur Loiret <aloiret@debian.org>
Standards-Version: 3.9.1
-Build-Depends: dpkg-dev (>= 1.14.15), debhelper (>= 5.0.62), g++-multilib [amd64 i386 mips mipsel powerpc ppc64 s390 sparc kfreebsd-amd64], libc6.1-dev (>= 2.5) [alpha ia64] | libc0.3-dev (>= 2.5) [hurd-i386] | libc0.1-dev (>= 2.5) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= 2.5), libc6-dev-amd64 [i386], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64], lib64gcc1 [i386 powerpc sparc s390], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel], m4, libtool, autoconf2.59, automake1.9, libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64], zlib1g-dev, gawk, lzma, xz-utils, patchutils, binutils (>= 2.20.1-15~) | binutils-multiarch (>= 2.20.1-15~), binutils-hppa64 (>= 2.20.1-15~) [hppa], gperf (>= 3.0.1), bison (>= 1:2.3), flex, gettext, texinfo (>= 4.3), libmpfr-dev (>= 2.3.0), locales [!m68k !knetbsd-i386
!knetbsd-alpha], procps, sharutils, libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, zlib1g-dev, libantlr-java, fastjar, libmagic-dev, libecj-java (>= 3.3.0-2), zip, libasound2-dev [!knetbsd-i386 !knetbsd-alpha !hurd-i386 !hurd-alpha !kfreebsd-i386 !kfreebsd-amd64 !knetbsd-i386 !knetbsd-alpha], libxtst-dev, libxt-dev, libgtk2.0-dev (>= 2.4.4-2), libart-2.0-dev, libcairo2-dev, g++-4.4 [armel], gcc-4.4-source (>= 4.4.5), gcc-4.4-source (<< 4.4.6), libcloog-ppl-dev (>= 0.15.9-2~), dejagnu [!m68k !hurd-i386 !hurd-alpha], realpath (>= 1.9.12), chrpath, lsb-release, make (>= 3.81), quilt
+Build-Depends: dpkg-dev (>= 1.14.15), debhelper (>= 5.0.62), g++-multilib [amd64 i386 mips mipsel powerpc ppc64 s390 sparc kfreebsd-amd64], libc6.1-dev (>= 2.5) [alpha ia64] | libc0.3-dev (>= 2.5) [hurd-i386] | libc0.1-dev (>= 2.5) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= 2.5), libc6-dev-amd64 [i386], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64], lib64gcc1 [i386 powerpc sparc s390], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel], m4, libtool, autoconf2.59, automake1.9, libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64], zlib1g-dev, gawk, lzma, xz-utils, patchutils, binutils (>= 2.20.1-15~) | binutils-multiarch (>= 2.20.1-15~), binutils-hppa64 (>= 2.20.1-15~) [hppa], gperf (>= 3.0.1), bison (>= 1:2.3), flex, gettext, texinfo (>= 4.3), libmpfr-dev (>= 2.3.0), locales [!m68k !knetbsd-i386
!knetbsd-alpha], procps, sharutils, libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, zlib1g-dev, libantlr-java, fastjar, libmagic-dev, libecj-java (>= 3.3.0-2), zip, libasound2-dev [!knetbsd-i386 !knetbsd-alpha !hurd-i386 !hurd-alpha !kfreebsd-i386 !kfreebsd-amd64 !knetbsd-i386 !knetbsd-alpha], libxtst-dev, libxt-dev, libgtk2.0-dev (>= 2.4.4-2), libart-2.0-dev, libcairo2-dev, g++-4.4 [armel armhf], gcc-4.4-source (>= 4.4.5), gcc-4.4-source (<< 4.4.6), libcloog-ppl-dev (>= 0.15.9-2~), dejagnu [!m68k !hurd-i386 !hurd-alpha], realpath (>= 1.9.12), chrpath, lsb-release, make (>= 3.81), quilt
Build-Depends-Indep:
Homepage: http://gcc.gnu.org/
Vcs-Browser: http://svn.debian.org/viewsvn/gcccvs/branches/sid/gcc-4.4/
diff -ruN gcj-4.4-4.4.5.orig//debian/rules.conf gcj-4.4-4.4.5/debian/rules.conf
--- gcj-4.4-4.4.5.orig//debian/rules.conf 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/rules.conf 2010-11-18 18:14:40.000000000 +0000
@@ -47,7 +47,7 @@
$1_no_archs += !alpha !hurd-alpha !knetbsd-alpha
endif
ifneq (,$$(filter arm,$$($1_no_cpus)))
- $1_no_archs += !arm !armel
+ $1_no_archs += !arm !armel !armhf
endif
ifneq (,$$(strip $3))
$1_no_systems_tmp := $$(subst $$(SPACE)gnu$$(SPACE),$$(SPACE)hurd-gnu$$(SPACE),$$(SPACE)$3$$(SPACE))
@@ -292,7 +292,7 @@
# gstreamer peer
#JAVA_BUILD_DEP += libgstreamer-plugins-base0.10-dev$(bd_java_archs),
ifneq ($(PKGSOURCE),gcc-snapshot)
- JAVA_BUILD_DEP += g++-4.4 [armel],
+ JAVA_BUILD_DEP += g++-4.4 [armel armhf],
endif
endif
ifneq ($(with_standalone_gcj),yes)
@@ -314,7 +314,7 @@
ECJ_DEP = ecj, libecj-java (>= 3.3.0-2)
ECJ_DEP = ecj-gcj, libecj-java-gcj (>= 3.3.0-2)
-ifneq (,$(filter $(DEB_HOST_ARCH),arm armel))
+ifneq (,$(filter $(DEB_HOST_ARCH),arm armel armhf))
ECJ_DEP +=, ecj1
endif
@@ -342,7 +342,7 @@
# Ditto, as part of the gcc-snapshot package.
# FIXME: ad hoc dependency, better fix setting of ada_no_archs
#GNAT_BUILD_DEP := gnat (>= 4.1) [$(ada_no_archs)], gcc-snapshot (>= 20090821-1) [armel],
- GNAT_BUILD_DEP := gnat (>= 4.1) [!arm !armel !m68k !hurd-i386], gcc-snapshot (>= 20100116-1) [armel],
+ GNAT_BUILD_DEP := gnat (>= 4.1) [!arm !armel !armhf !m68k !hurd-i386], gcc-snapshot (>= 20100116-1) [armel armhf],
PASCAL_BUILD_DEP :=
else ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
# Special source package just for gnat. Fail early if gnat is not present,
@@ -785,7 +785,7 @@
endif
endif
ifneq ($(with_standalone_gcj),yes)
- ifeq ($(DEB_HOST_ARCH),armel)
+ ifneq (,$(filter $(DEB_TARGET_ARCH), armel armhf))
echo 'dep:gcj=g++$(pkg_ver) (>= $(DEB_GCC_SOFT_VERSION))' \
>> debian/substvars.local.tmp
else
diff -ruN gcj-4.4-4.4.5.orig//debian/rules.defs gcj-4.4-4.4.5/debian/rules.defs
--- gcj-4.4-4.4.5.orig//debian/rules.defs 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/rules.defs 2010-11-18 18:14:40.000000000 +0000
@@ -260,12 +260,22 @@
ifeq ($(distribution),Ubuntu)
ifeq (,$(findstring gnat, $(PKGSOURCE)))
- ifneq (,$(findstring $(DEB_TARGET_ARCH),amd64 armel i386 powerpc))
+ ifneq (,$(findstring $(DEB_TARGET_ARCH),amd64 armel armhf i386 powerpc))
with_linaro_branch = yes
endif
endif
endif
+ifeq ($(DEB_TARGET_ARCH),armhf)
+ with_linaro_branch = yes
+ float_abi = hard
+ ifeq (,$(findstring gcj,$(PKGSOURCE)))
+ with_arm_thumb = yes
+ endif
+else
+ float_abi = softfp
+endif
+
# -------------------------------------------------------------------
# basic config
@@ -397,7 +407,7 @@
# that support both (see ada-sjlj.diff). Most cpus support both
# mechanisms; here, we declare the few that support only one.
libgnat_zcx_only_cpus :=
- libgnat_sjlj_only_cpus := arm armel
+ libgnat_sjlj_only_cpus := arm armel armhf
ifneq (,$(filter $(DEB_TARGET_ARCH_CPU),$(libgnat_sjlj_only_cpus)))
with_gnat_zcx := no
else
@@ -546,7 +556,7 @@
ifeq ($(with_java),yes)
# use the same names as OpenJDK
- java_cpu_map = armel=arm hppa=parisc i686=i386 i586=i386 i486=i386 mipsel=mips powerpc=ppc sh4=sh
+ java_cpu_map = armel=arm armhf=arm hppa=parisc i686=i386 i586=i386 i486=i386 mipsel=mips powerpc=ppc sh4=sh
java_cpu = $(patsubst $(DEB_TARGET_ARCH_CPU)=%,%, \
$(filter $(DEB_TARGET_ARCH_CPU)=%,$(java_cpu_map)))
ifeq (,$(java_cpu))
@@ -682,7 +692,7 @@
with_objc_gc := yes
# disable ObjC garbage collection library (needs libgc)
- libgc_no_cpus := avr mips mipsel # alpha amd64 arm armel hppa i386 ia64 m68k mips mipsel powerpc s390 sparc
+ libgc_no_cpus := avr mips mipsel # alpha amd64 arm armel armhf hppa i386 ia64 m68k mips mipsel powerpc s390 sparc
libgc_no_systems := knetbsd-gnu
ifneq (,$(findstring $(DEB_TARGET_ARCH_CPU),$(libgc_no_cpus)))
with_objc_gc := disabled for cpu $(DEB_TARGET_ARCH_CPU)
@@ -774,7 +784,7 @@
endif # ifndef DEB_STAGE
# gold --------------------
-gold_archs = amd64 armel i386 lpia powerpc sparc
+gold_archs = amd64 armel armhf i386 lpia powerpc sparc
gold_archs = amd64 i386 lpia
ifneq (,$(filter $(DEB_TARGET_ARCH),$(gold_archs)))
ifneq (,$(findstring snapshot,$(PKGSOURCE))$(findstring 4.5,$(PKGSOURCE)))
@@ -895,7 +905,7 @@
# FIXME: build as a cross compiler to build on armv4 as well
ifneq (,$(findstring gcc-4, $(PKGSOURCE)))
ifeq ($(distribution),Ubuntu)
-# neon_archs = armel
+# neon_archs = armel armhf
# ifneq (, $(filter $(DEB_TARGET_ARCH),$(neon_archs)))
# with_neon = yes
# endif
diff -ruN gcj-4.4-4.4.5.orig//debian/rules.parameters gcj-4.4-4.4.5/debian/rules.parameters
--- gcj-4.4-4.4.5.orig//debian/rules.parameters 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/rules.parameters 2010-11-18 18:14:40.000000000 +0000
@@ -2,9 +2,9 @@
GCC_VERSION := 4.4.5
NEXT_GCC_VERSION := 4.4.6
BASE_VERSION := 4.4
-SOURCE_VERSION := 4.4.5-1
-DEB_VERSION := 4.4.5-1
-DEB_EVERSION := 1:4.4.5-1
+SOURCE_VERSION := 4.4.5-2+armhf
+DEB_VERSION := 4.4.5-2+armhf
+DEB_EVERSION := 1:4.4.5-2+armhf
GPC_BASE_VERSION :=
GDC_BASE_VERSION :=
DEB_GPC_VERSION :=
@@ -12,7 +12,7 @@
DEB_SOVERSION := 4.4
DEB_SOEVERSION := 1:4.4
DEB_LIBGCC_SOVERSION := 1:4.4
-DEB_LIBGCC_VERSION := 1:4.4.5-1
+DEB_LIBGCC_VERSION := 1:4.4.5-2+armhf
DEB_STDCXX_SOVERSION := 4.4
DEB_GCJ_SOVERSION := 4.4
PKG_GCJ_EXT := 10
diff -ruN gcj-4.4-4.4.5.orig//debian/rules.patch gcj-4.4-4.4.5/debian/rules.patch
--- gcj-4.4-4.4.5.orig//debian/rules.patch 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/rules.patch 2010-11-18 18:14:40.000000000 +0000
@@ -215,7 +215,7 @@
endif
endif
-ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel))
+ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf))
debian_patches += libjava-armel-unwind
debian_patches += $(if $(with_linaro_branch),,arm-gcc-gcse)
endif
@@ -225,7 +225,7 @@
endif
# FIXME: submitted for 4.3, no feedback on the upstream status
-ifeq ($(DEB_TARGET_ARCH),armel)
+ifneq (,$(findstring $(DEB_TARGET_ARCH),armel armhf))
debian_patches += armel-hilo-union-class
endif
diff -ruN gcj-4.4-4.4.5.orig//debian/rules2 gcj-4.4-4.4.5/debian/rules2
--- gcj-4.4-4.4.5.orig//debian/rules2 2010-11-18 18:12:04.000000000 +0000
+++ gcj-4.4-4.4.5/debian/rules2 2010-11-18 18:14:40.000000000 +0000
@@ -87,7 +87,7 @@
endif
ifneq ($(distribution),Ubuntu)
- ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel mips mipsel))
+ ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel armhf mips mipsel))
STAGE1_CFLAGS = -g -O2
endif
endif
@@ -298,7 +298,9 @@
CONFARGS += --with-fpu=vfp
endif
-ifneq (,$(findstring arm-linux-gnueabi,$(DEB_TARGET_GNU_TYPE)))
+# FIXME: this should be again used when the triplet is again one
+# ifneq (,$(findstring arm-linux-gnueabi,$(DEB_TARGET_GNU_TYPE)))
+ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),arm armel armhf))
CONFARGS += --disable-sjlj-exceptions
# FIXME: libjava is not ported for thumb, this hack only works for
# separate gcj builds
@@ -308,7 +310,17 @@
else
CONFARGS += --with-arch=armv7-a
endif
- CONFARGS += --with-float=softfp --with-fpu=vfpv3-d16
+ CONFARGS += --with-float=$(float_abi) --with-fpu=vfpv3-d16
+ endif
+ ifeq ($(distribution),Debian)
+ ifeq ($(DEB_TARGET_ARCH),armhf)
+ ifneq (,$(findstring gcj,$(PKGSOURCE)))
+ CONFARGS += --with-arch=armv6
+ else
+ CONFARGS += --with-arch=armv7-a
+ endif
+ CONFARGS += --with-float=$(float_abi) --with-fpu=vfpv3-d16
+ endif
endif
ifeq ($(with_arm_thumb),yes)
CONFARGS += --with-mode=thumb
@@ -439,7 +451,7 @@
ifeq ($(with_bootstrap),)
# no profiledbootstrap on the following architectures
# - m68k: we're happy that it builds at all
- no_profiled_bs_archs := arm armel m68k
+ no_profiled_bs_archs := arm armel armhf m68k
ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),$(no_profiled_bs_archs)))
bootstrap_target = bootstrap-lean
else
@@ -458,7 +470,7 @@
# disable profiled bootstrap on slow archs, get to testing first ...
ifeq ($(distribution),Debian)
- ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel hppa mips mipsel sparc))
+ ifneq (,$(filter $(DEB_TARGET_ARCH), arm armel armhf hppa mips mipsel sparc))
bootstrap_target = bootstrap-lean
endif
endif
@@ -472,7 +484,7 @@
DEJAGNU_TIMEOUT=300
# Increase the timeout for one testrun on slow architectures
ifeq ($(distribution),Debian)
- ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel hppa m68k sparc))
+ ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf hppa m68k sparc))
DEJAGNU_TIMEOUT=600
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
DEJAGNU_TIMEOUT=180
@@ -481,7 +493,7 @@
DEJAGNU_TIMEOUT=900
endif
else ifeq ($(distribution),Ubuntu)
- ifneq (,$(findstring $(DEB_TARGET_ARCH),armel hppa ia64 sparc))
+ ifneq (,$(findstring $(DEB_TARGET_ARCH),armel armhf hppa ia64 sparc))
DEJAGNU_TIMEOUT=600
else ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),amd64 i386 i486 i686 lpia))
DEJAGNU_TIMEOUT=180
@@ -495,7 +507,7 @@
DEJAGNU_RUNS += $(if $(filter yes,$(with_ssp_default)),-fno-stack-protector,-fstack-protector)
endif
# FIXME Ubuntu armel buildd hangs
- ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),armel))
+ ifneq (,$(findstring $(DEB_TARGET_GNU_CPU),armel armhf))
DEJAGNU_RUNS =
endif
ifeq ($(distribution),Ubuntu)
@@ -986,7 +998,7 @@
--disable-nls \
--disable-libmudflap \
--with-arch=armv7-a --with-tune=cortex-a8 \
- --with-float=softfp --with-fpu=neon \
+ --with-float=$(float_abi) --with-fpu=neon \
--host=arm-linux-gnueabi \
--build=arm-linux-gnueabi \
--target=arm-linux-gnueabi
Reply to: