------------------------------------------------------------ revno: 657 committer: Matthias Klose <d...@ubuntu.com> branch nick: openjdk8 timestamp: Thu 2015-10-22 14:11:07 +0200 message: - add some cross build fixes. modified: debian/rules
-- lp:~openjdk/openjdk/openjdk8 https://code.launchpad.net/~openjdk/openjdk/openjdk8 Your team Debian Java Maintainers is subscribed to branch lp:~openjdk/openjdk/openjdk8. To unsubscribe from this branch go to https://code.launchpad.net/~openjdk/openjdk/openjdk8/+edit-subscription
=== modified file 'debian/rules' --- debian/rules 2015-10-22 12:01:37 +0000 +++ debian/rules 2015-10-22 12:11:07 +0000 @@ -16,6 +16,7 @@ DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH) +DEB_BUILD_ARCH ?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_ARCH) DEB_HOST_ARCH_CPU ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_CPU) DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH) @@ -40,6 +41,9 @@ hotspot_archs = amd64 i386 arm64 ppc64 ppc64el kfreebsd-amd64 kfreebsd-i386 # FIXME: use bootcycle builds for zero archs? bootcycle_build = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),yes) +ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) + bootcycle_build = +endif shark_archs = amd64 i386 kfreebsd-amd64 kfreebsd-i386 # Shark build but just crash @@ -294,15 +298,15 @@ export CXX = g++-4.9 else ifneq (,$(filter $(distrel),wily sid stretch)) ifneq (,$(filter $(DEB_HOST_ARCH), $(hotspot_archs))) - export CC = gcc-5 - export CXX = g++-5 + export CC = $(DEB_HOST_GNU_TYPE)-gcc-5 + export CXX = $(DEB_HOST_GNU_TYPE)-g++-5 else - export CC = gcc-4.9 - export CXX = g++-4.9 + export CC = $(DEB_HOST_GNU_TYPE)-gcc-4.9 + export CXX = $(DEB_HOST_GNU_TYPE)-g++-4.9 endif else - export CC = gcc-5 - export CXX = g++-5 + export CC = $(DEB_HOST_GNU_TYPE)-gcc-5 + export CXX = $(DEB_HOST_GNU_TYPE)-g++-5 endif ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) @@ -569,7 +573,11 @@ ZERO_CONFIGURE_ARGS += --with-jvm-variants=zero DEFAULT_CONFIGURE_ARGS += --with-boot-jdk=$(BOOTJDK_HOME) -ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(CURDIR)/$(builddir)/$(sdkimg) +ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) + ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(CURDIR)/$(builddir)/$(sdkimg) +else + ZERO_CONFIGURE_ARGS += --with-boot-jdk=$(BOOTJDK_HOME) +endif COMMON_CONFIGURE_ARGS += --disable-ccache @@ -639,8 +647,16 @@ --with-extra-cxxflags='-fpermissive' \ --with-extra-ldflags='$(EXTRA_LDFLAGS_HS)' -# FIXME: this, or use target ..., fix cross builds -#CONFIGURE_ARGS += --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) + COMMON_CONFIGURE_ARGS += \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --host=$(DEB_HOST_GNU_TYPE) \ + --target=$(DEB_HOST_GNU_TYPE) \ + BUILD_CC=$(subst $(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE),$(CC)) \ + BUILD_LD=$(subst $(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE),$(CC)) \ + BUILD_CXX=$(subst $(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE),$(CXX)) \ + +endif # (most) jre and jdk tools handled by the alternatives system. # dups in heimdal-clients, krb5-user: kinit, klist, ktab, no alternatives
__ This is the maintainer address of Debian's Java team <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use debian-j...@lists.debian.org for discussions and questions.