]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add cross compilation support
authorLaszlo Boszormenyi <gcs@debian.hu>
Sat, 19 Mar 2011 19:36:10 +0000 (20:36 +0100)
committerLaszlo Boszormenyi <gcs@debian.hu>
Sat, 19 Mar 2011 19:45:20 +0000 (20:45 +0100)
Taken from Debian bugreport #618939 , courtesy by Hector Oron.

Signed-off-by: Hector Oron <zumbi@debian.org>
debian/changelog
debian/rules

index 734ef4b09217af80486dbcd9555e37d2b0179575..e2be88146e1e84f41d2a66e7c238558edf187e96 100644 (file)
@@ -1,9 +1,9 @@
-
 ceph (0.26~rc-1) experimental; urgency=low
 
   * Make ceph x86 and x64 only due to dependency on architecture dependent
     google-perftools (closes: #614890).
   * Correct section of libcrush1, librados1, librbd1 and libceph1 to libs.
+  * Make Ceph cross buildable (closes: #618939), thanks to Hector Oron.
 
  -- Laszlo Boszormenyi (GCS) <gcs@debian.hu>  Mon, 21 Mar 2011 11:34:02 -0800
 
index 1273d0d2b6f9fb84961ae6520a22dbfca8e88c64..d40dee07a2eb7db3d33fbb1f71fa27020737ccd2 100755 (executable)
@@ -8,6 +8,16 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   MAKEFLAGS += -j$(NUMJOBS)
 endif
 
+export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# Recommended snippet for Autoconf 2.52 or later
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -18,7 +28,8 @@ build-stamp: configure-stamp
        dh_testdir
 
        ./autogen.sh
-       ./configure --prefix=/usr --sbindir=/sbin --localstatedir=/var --sysconfdir=/etc
+       ./configure --prefix=/usr --sbindir=/sbin --localstatedir=/var \
+               --sysconfdir=/etc $(confflags)
        $(MAKE)
        cp src/init-ceph debian/ceph.init
        cp src/logrotate.conf debian/ceph.logrotate