[Pkg-openldap-devel] [openldap] 06/06: Set CC correctly for cross builds.

Ryan Tandy rtandy-guest at moszumanska.debian.org
Thu Aug 27 00:11:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

rtandy-guest pushed a commit to branch master
in repository openldap.

commit 164568e56a1d920537cd49fd45fe5e34396fe511
Author: Ryan Tandy <ryan at nardis.ca>
Date:   Wed Aug 26 16:42:22 2015 -0700

    Set CC correctly for cross builds.
---
 debian/changelog | 1 +
 debian/rules     | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e90d5e4..bacbba4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ openldap (2.4.42+dfsg-2) UNRELEASED; urgency=medium
     removed after lenny.
   * Annotate Build-Depends on perl with :any to allow running the system perl 
     interpreter during cross builds.
+  * Ensure CC is set correctly for cross builds. Thanks Helmut Grohne.
 
  -- Ryan Tandy <ryan at nardis.ca>  Tue, 25 Aug 2015 11:49:24 -0700
 
diff --git a/debian/rules b/debian/rules
index bc5c07e..65a3b13 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,7 @@ export DEB_BUILD_MAINT_OPTIONS := hardening=+pie,+bindnow
 export RESOLV_MULTI = off
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 CONFIG		= $(shell grep -v "^\#" debian/configure.options)
@@ -22,6 +23,12 @@ ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
 	CONFIG += --disable-slapd --disable-slp
 endif
 
+# Ensure CC is set correctly for cross builds, unless it has already 
+# been set explicitly.
+ifeq ($(origin CC),default)
+	export CC := $(DEB_HOST_GNU_TYPE)-cc
+endif
+
 installdir	:= $(CURDIR)/debian/tmp
 builddir	:= $(CURDIR)/debian/build
 slapddir	:= $(CURDIR)/debian/slapd/usr/sbin

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list