diff -Nru ocaml-4.02.3/debian/changelog ocaml-4.02.3/debian/changelog
--- ocaml-4.02.3/debian/changelog	2016-07-15 20:20:10.000000000 +0000
+++ ocaml-4.02.3/debian/changelog	2016-07-22 03:42:17.000000000 +0000
@@ -1,3 +1,11 @@
+ocaml (4.02.3-7+rpi1) stretch-staging; urgency=medium
+
+  [changes brought forward from 4.01.0-5+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Sat, 24 Jan 2015 10:29:46 +0000]
+  * Add logic in debian/rules to detect raspbian and give the upstream 
+    configure script the correct instructions.
+
+ -- Raspbian forward porter <root@raspbian.org>  Fri, 22 Jul 2016 03:42:16 +0000
+
 ocaml (4.02.3-7) unstable; urgency=medium
 
   * d/rules: split install-stamp target into -arch and -indep, to allow
diff -Nru ocaml-4.02.3/debian/rules ocaml-4.02.3/debian/rules
--- ocaml-4.02.3/debian/rules	2016-07-15 20:20:10.000000000 +0000
+++ ocaml-4.02.3/debian/rules	2016-07-22 03:42:17.000000000 +0000
@@ -61,8 +61,19 @@
 export OCAML_OPT_ARCH
 export OCAML_STDLIB_DIR
 
-CONFIGURE_OPTS := \
-  --host $(DEB_BUILD_GNU_TYPE)\
+ifeq ($(DEB_BUILD_ARCH),armhf)
+  IS_RASPBIAN := $(shell dpkg-vendor --derives-from Raspbian && echo yes || echo no)
+else
+  IS_RASPBIAN := no
+endif
+
+ifeq ($(IS_RASPBIAN),yes)
+  CONFIGURE_OPTS := --host armv6-unknown-linux-gnueabihf
+else
+  CONFIGURE_OPTS := --host $(DEB_BUILD_GNU_TYPE)
+endif 
+
+CONFIGURE_OPTS += \
   --with-pthread -prefix $(DEB_TEST_BUILD_PREFIX)/usr \
   -libdir $(DEB_TEST_BUILD_PREFIX)$(OCAML_STDLIB_DIR) \
   -x11lib "$(shell pkg-config --variable=libdir x11)" \