Simplify and fix the newer natdynlink handling
authorXimin Luo <infinity0@debian.org>
Fri, 21 Jul 2017 17:06:55 +0000 (19:06 +0200)
committerXimin Luo <infinity0@debian.org>
Fri, 21 Jul 2017 17:06:55 +0000 (19:06 +0200)
debian/MANIFEST
debian/natdynlink-archs [deleted file]
debian/ocamlinit.mk
debian/ocamlvars.mk

index 610081cf2f2f0ece8a3dbefe51f7507be3296258..35f86190722994b8e165eef45fdb9ab0b596f04f 100644 (file)
@@ -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 (file)
index 1d4503d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-i386 kfreebsd-amd64 lpia powerpc ppc64 ppc64el sparc s390x
index 35636d439d124265ad934c4d9613222284d39664..a1ba209e4d7a1622136238d4d221ca881ed2164e 100644 (file)
@@ -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: //'
index 3f4365926a240ce651a13fae4e23cb8797635907..005ad452bad216de62e43cc916100ecb27a6358e 100644 (file)
@@ -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