Properly fix new natdynlink logic
authorXimin Luo <infinity0@debian.org>
Fri, 21 Jul 2017 18:38:22 +0000 (20:38 +0200)
committerXimin Luo <infinity0@debian.org>
Fri, 21 Jul 2017 18:38:22 +0000 (20:38 +0200)
- fix the bogus "double-if" conditional
- filter is more correct than findstring, the latter gives amd64 even if only
  freebsd-amd64 is in the list

debian/changelog
debian/ocamlinit.mk
debian/ocamlvars.mk

index 795f97a59c53110666d9fb663c7642b08f624fc8..36bc9d076491a93a8b3faf6dc0abde8d697dd5b8 100644 (file)
@@ -1,3 +1,9 @@
+ocaml (4.05.0-4) UNRELEASED; urgency=medium
+
+  * Fix new natdynlink logic, fixes FTBFS on some more arches.
+
+ -- Ximin Luo <infinity0@debian.org>  Fri, 21 Jul 2017 20:24:43 +0200
+
 ocaml (4.05.0-3) experimental; urgency=medium
 
   * Fix Makefile $-escaping syntax, fixes FTBFS on a bunch of arches.
index a1ba209e4d7a1622136238d4d221ca881ed2164e..e751aa937a47751459736a2e9c344c5855ab14ad 100644 (file)
@@ -50,14 +50,12 @@ 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)
+ifeq ($(OCAML_HAVE_OCAMLOPT) $(NATDYNLINK),yes 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 005ad452bad216de62e43cc916100ecb27a6358e..4604a6180b01f5a102e94abafa765d93c5851d8e 100644 (file)
@@ -6,6 +6,6 @@ OCAMLMINOR := 0
 OCAML_ABI := $(OCAMLMAJOR).$(OCAMLMINOR)
 OCAML_STDLIB_DIR := /usr/lib/ocaml
 OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs)
-OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
+OCAML_OPT_ARCH := $(filter $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS))
 OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no)
 OCAML_OCAMLDOC_DESTDIR_HTML =