From: Ximin Luo Date: Fri, 21 Jul 2017 17:06:55 +0000 (+0200) Subject: Simplify and fix the newer natdynlink handling X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~45 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1bf550c9de7c1b484346ce1c48ee2449ef4827a4;p=ocaml.git Simplify and fix the newer natdynlink handling --- diff --git a/debian/MANIFEST b/debian/MANIFEST index 610081cf..35f86190 100644 --- a/debian/MANIFEST +++ b/debian/MANIFEST @@ -14,7 +14,6 @@ debian/ld.conf.in debian/man/ocamldumpobj.1 debian/man/ocamlmklib.1 debian/man/ocamlobjinfo.1 -debian/natdynlink-archs debian/native-archs debian/ocaml-base-nox.README.Debian debian/ocaml-base-nox.dirs.in diff --git a/debian/natdynlink-archs b/debian/natdynlink-archs deleted file mode 100644 index 1d4503d0..00000000 --- a/debian/natdynlink-archs +++ /dev/null @@ -1 +0,0 @@ -amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-i386 kfreebsd-amd64 lpia powerpc ppc64 ppc64el sparc s390x diff --git a/debian/ocamlinit.mk b/debian/ocamlinit.mk index 35636d43..a1ba209e 100644 --- a/debian/ocamlinit.mk +++ b/debian/ocamlinit.mk @@ -48,12 +48,16 @@ else OCAMLINIT_SED += -e '/^OPT: /d' -e 's/^BYTE: //' endif +# Upstream Makefile is mildly buggy, sets NATDYNLINK for sparc64 with no opt +# support. This double-if should stay correct in all future situations. +ifeq ($(OCAML_HAVE_OCAMLOPT),yes) ifeq ($(NATDYNLINK),true) OCAMLINIT_SED += -e 's/^DYN: //' else OCAMLINIT_SED += -e '/^DYN: /d' OCAMLINIT_SED += -e '/\.cmxs$$/d' endif +endif ifeq ($(PROFILING),true) OCAMLINIT_SED += -e 's/^PROFILING: //' diff --git a/debian/ocamlvars.mk b/debian/ocamlvars.mk index 3f436592..005ad452 100644 --- a/debian/ocamlvars.mk +++ b/debian/ocamlvars.mk @@ -6,13 +6,6 @@ OCAMLMINOR := 0 OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR) OCAML_STDLIB_DIR := /usr/lib/ocaml OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs) -OCAML_NATDYNLINK_ARCHS := $(shell cat debian/natdynlink-archs) OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS)) OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no) OCAML_OCAMLDOC_DESTDIR_HTML = - -ifneq (,$(findstring $(DEB_BUILD_ARCH),$(OCAML_NATDYNLINK_ARCHS))) - OCAML_NATDYNLINK := yes -else - OCAML_NATDYNLINK := no -endif