diff -Nru ocaml-4.01.0/debian/changelog ocaml-4.01.0/debian/changelog --- ocaml-4.01.0/debian/changelog 2013-12-02 19:03:03.000000000 +0000 +++ ocaml-4.01.0/debian/changelog 2013-12-12 11:16:07.000000000 +0000 @@ -1,3 +1,12 @@ +ocaml (4.01.0-3+rpi1) jessie-staging; urgency=low + + * Add logic in debian/rules to detect raspbian and give the upstream + configure script the correct instructions. + * Fix upstream build scripts to pass "model" when building .p.o files + from assembler files. + + -- Peter Michael Green Thu, 12 Dec 2013 10:10:32 +0000 + ocaml (4.01.0-3) unstable; urgency=low * Upload to unstable diff -Nru ocaml-4.01.0/debian/patches/pass-model-p.o.patch ocaml-4.01.0/debian/patches/pass-model-p.o.patch --- ocaml-4.01.0/debian/patches/pass-model-p.o.patch 1970-01-01 00:00:00.000000000 +0000 +++ ocaml-4.01.0/debian/patches/pass-model-p.o.patch 2013-12-12 11:20:11.000000000 +0000 @@ -0,0 +1,30 @@ +Description: Pass "model" when building .p.o files from assembler files. + The upstream build system passed -DMODEL_$(MODEL) when building .o files but + not when building .p.o files. When building for raspbian (with the correct + v6 configuration) this resulted in arm.p.o coming out with v7 code. +Author: Peter Michael Green + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- ocaml-4.01.0.orig/asmrun/Makefile ++++ ocaml-4.01.0/asmrun/Makefile +@@ -180,7 +180,7 @@ clean:: + exit 2; } + + .S.p.o: +- $(ASPP) -DSYS_$(SYSTEM) $(ASPPPROFFLAGS) -o $*.p.o $*.S ++ $(ASPP) -DSYS_$(SYSTEM) -DMODEL_$(MODEL) $(ASPPPROFFLAGS) -o $*.p.o $*.S + + .c.d.o: + ln -s -f $*.c $*.d.c diff -Nru ocaml-4.01.0/debian/patches/series ocaml-4.01.0/debian/patches/series --- ocaml-4.01.0/debian/patches/series 2013-12-02 17:40:05.000000000 +0000 +++ ocaml-4.01.0/debian/patches/series 2013-12-12 11:17:59.000000000 +0000 @@ -13,3 +13,4 @@ 0013-Tune-resource-usage-of-some-tests.patch 0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch 0015-Fix-native-backtraces-on-arm.patch +pass-model-p.o.patch diff -Nru ocaml-4.01.0/debian/rules ocaml-4.01.0/debian/rules --- ocaml-4.01.0/debian/rules 2013-12-02 17:40:05.000000000 +0000 +++ ocaml-4.01.0/debian/rules 2013-12-12 10:10:01.000000000 +0000 @@ -59,8 +59,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)" \