]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
tools/ocaml: abi check: #include on x86 only. Spotted by Gitlab CI
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Sep 2019 15:16:51 +0000 (16:16 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Sep 2019 15:26:39 +0000 (16:26 +0100)
Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/libs/xc/xenctrl_stubs.c

index d7bc2cf40d5e7cdf08cf8c2545d55e94aa46b18d..0cdd873599a5b0aac4213d5d5365efceeea5348d 100644 (file)
@@ -135,7 +135,20 @@ static value c_bitmap_to_ocaml_list
        CAMLparam0();
        CAMLlocal2(list, tmp);
 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * This check file contains a mixture of stuff, because it is
+ * generated from the whole of this xenctrl_stubs.c file (without
+ * regard to arch ifdefs) and the whole of xenctrl.ml (which does not
+ * have any arch ifdeffery).  Currently, there is only x86 and
+ * arch-independent stuff, and there is no facility in the abi-check
+ * script for arch conditionals.  So for now we make the checks
+ * effective on x86 only; this will suffice to defend even ARM
+ * because breaking changes to common code will break the build
+ * on x86 and not make it to master.  This is a bit of a bodge.
+ */
 #include "xenctrl_abi_check.h"
+#endif
 
        list = tmp = Val_emptylist;