diff options
author | Colin Watson <cjwatson@debian.org> | 2011-09-16 10:04:06 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-09-16 10:04:06 +0000 |
commit | 1d2b3bc346e487f38061d6ce4cdec24fca91e5fc (patch) | |
tree | 07c124f64bb4cdf3c85d8a2a8cfc40e5e5256875 | |
parent | 0b53584d667e39a72101b200baaea28ba36c38e0 (diff) |
Add cross-compiling support.
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | debian/rules | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index e75b874..4ba7058 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +db1-compat (2.1.3-15) UNRELEASED; urgency=low + + * Add cross-compiling support. + + -- Colin Watson <cjwatson@debian.org> Fri, 16 Sep 2011 11:03:39 +0100 + db1-compat (2.1.3-14) unstable; urgency=low * Link with -lc rather than /usr/lib/libc.so, fixing build failure on diff --git a/debian/rules b/debian/rules index 90cfce5..33f300d 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,13 @@ else soversion=.2 endif +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +export CC := $(DEB_HOST_GNU_TYPE)-gcc +endif + ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) export CFLAGS := -O0 endif |