summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-08-02 00:05:39 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-08-02 00:05:39 +0000
commit17c92e0dee47d7e6bd3097ed719b994bf014e995 (patch)
tree9d9c86201a53cc470afdec9baeb65a377e02c5fb
parent58c6d0e2da5be692c258997797c212f0d82cde62 (diff)
downloadgcc-49-17c92e0dee47d7e6bd3097ed719b994bf014e995.tar.gz
* Fix libphobos cross build.
git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.9@7551 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/gdc-cross-install-location.diff11
-rw-r--r--debian/rules.conf6
-rw-r--r--debian/rules.d/binary-d.mk27
-rw-r--r--debian/rules.patch3
5 files changed, 34 insertions, 14 deletions
diff --git a/debian/changelog b/debian/changelog
index 87686eb..65a92e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ gcc-4.9 (4.9.1-5) UNRELEASED; urgency=medium
* Update to SVN 20140731 (r213317) from the gcc-4_9-branch.
- Fix PR tree-optimization/61964. LP: #1347147.
+ * Fix libphobos cross build.
-- Matthias Klose <doko@debian.org> Fri, 01 Aug 2014 17:20:58 +0200
diff --git a/debian/patches/gdc-cross-install-location.diff b/debian/patches/gdc-cross-install-location.diff
new file mode 100644
index 0000000..9dae9ed
--- /dev/null
+++ b/debian/patches/gdc-cross-install-location.diff
@@ -0,0 +1,11 @@
+--- a/src/libphobos/configure.ac
++++ b/src/libphobos/configure.ac
+@@ -239,7 +239,7 @@
+ fi
+
+ if test "${gdc_host}" != "${gdc_target}"; then
+- gdc_include_dir='${libdir}/gcc/${host_alias}'/${d_gcc_ver}/include/d
++ gdc_include_dir='${libdir}/gcc-cross/${host_alias}'/${d_gcc_ver}/include/d
+ else
+ gdc_include_dir='${prefix}'/include/d/${d_gcc_ver}
+ fi
diff --git a/debian/rules.conf b/debian/rules.conf
index 1962574..5cb6f9d 100644
--- a/debian/rules.conf
+++ b/debian/rules.conf
@@ -1123,12 +1123,12 @@ ifeq ($(DEB_CROSS),yes)
>> debian/substvars.local.tmp
endif
ifeq ($(with_libphobos),yes)
+ echo 'dep:phobosdev=libphobos$(pkg_ver)-dev$(LS)$(AQ) (>= $(DEB_GCC_SOFT_VERSION))' \
+ >> debian/substvars.local.tmp
ifeq ($(DEB_CROSS),yes)
+ : # FIXME: make the cross gdc aware of both include paths
echo 'dep:gdccross=gdc$(pkg_ver) (>= $(DEB_GCC_SOFT_VERSION))' \
>> debian/substvars.local.tmp
- else
- echo 'dep:phobosdev=libphobos$(pkg_ver)-dev (>= $(DEB_GCC_SOFT_VERSION))' \
- >> debian/substvars.local.tmp
endif
endif
#ifneq (,$(findstring gtk, $(java_awt_peers)))
diff --git a/debian/rules.d/binary-d.mk b/debian/rules.d/binary-d.mk
index 656c69c..4b54f6f 100644
--- a/debian/rules.d/binary-d.mk
+++ b/debian/rules.d/binary-d.mk
@@ -10,7 +10,11 @@ p_libphobos = libphobos$(pkg_ver)-dev
d_gdc = debian/$(p_gdc)
d_libphobos = debian/$(p_libphobos)
-gdc_include_dir := $(PF)/include/d
+ifeq ($(DEB_CROSS),yes)
+ gdc_include_dir := $(gcc_lib_dir)/include/d
+else
+ gdc_include_dir := $(PF)/include/d/$(BASE_VERSION)
+endif
dirs_gdc = \
$(PF)/bin \
@@ -18,7 +22,7 @@ dirs_gdc = \
$(gcc_lexec_dir)
ifneq ($(DEB_CROSS),yes)
dirs_gdc += \
- $(gdc_include_dir)/$(BASE_VERSION)
+ $(gdc_include_dir)
endif
files_gdc = \
@@ -32,12 +36,12 @@ endif
dirs_libphobos = \
$(PF)/lib \
- $(gdc_include_dir)/$(BASE_VERSION) \
+ $(gdc_include_dir) \
$(gcc_lib_dir)
files_libphobos = \
- $(PF)/$(libdir)/libgphobos2.a \
- $(gdc_include_dir)/$(BASE_VERSION)
+ $(usr_lib$(2))/libgphobos2.a \
+ $(gdc_include_dir)
$(binary_stamp)-gdc: $(install_stamp)
@@ -67,13 +71,14 @@ ifneq ($(DEB_CROSS),yes)
endif
# FIXME: object.di needs to go into a libgdc-dev Multi-Arch: same package
-ifneq ($(DEB_CROSS),yes)
# Always needed by gdc.
+ mkdir -p $(d_gdc)/$(gdc_include_dir)
cp $(srcdir)/libphobos/libdruntime/object.di \
- $(d_gdc)/$(gdc_include_dir)/$(BASE_VERSION)/.
+ $(d_gdc)/$(gdc_include_dir)/.
+ifneq ($(DEB_CROSS),yes)
dh_link -p$(p_gdc) \
- /$(gdc_include_dir)/$(BASE_VERSION) \
- /$(gdc_include_dir)/$(GCC_VERSION)
+ /$(gdc_include_dir) \
+ /$(dir $(gdc_include_dir))/$(GCC_VERSION)
endif
dh_link -p$(p_gdc) \
@@ -108,7 +113,7 @@ $(binary_stamp)-libphobos: $(install_stamp)
$(d_libphobos)/$(gcc_lib_dir)
# included in gdc package
- rm -f $(d_libphobos)/$(gdc_include_dir)/$(BASE_VERSION)/object.di
+ rm -f $(d_libphobos)/$(gdc_include_dir)/object.di
ifeq ($(with_separate_gdc),yes)
debian/dh_doclink -p$(p_libphobos) $(p_gdc)
@@ -145,7 +150,7 @@ define __do_libphobos_dev
$(d_l)/$(gcc_lib_dir)
: # included in gdc package
- rm -f $(d_l)/$(gdc_include_dir)/$(BASE_VERSION)/object.di
+ rm -f $(d_l)/$(gdc_include_dir)/object.di
debian/dh_doclink -p$(p_l) \
$(if $(filter yes,$(with_separate_gdc)),$(p_gdc),$(p_base))
diff --git a/debian/rules.patch b/debian/rules.patch
index 688506b..0f0cbaa 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -239,6 +239,9 @@ ifeq ($(DEB_CROSS),yes)
debian_patches += cross-ma-install-location
else
debian_patches += cross-install-location
+ ifeq ($(with_d),yes)
+ debian_patches += gdc-cross-install-location
+ endif
endif
endif