automation: special configure flags for musl-based systems
authorStefano Stabellini <sstabellini@kernel.org>
Fri, 20 Nov 2020 03:20:15 +0000 (19:20 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 17 Dec 2020 22:56:43 +0000 (14:56 -0800)
QEMU upstream builds with warnings when libc is musl:

  #warning redirecting incorrect #include <sys/signal.h> to <signal.h>

Disable -Werror by passing --disable-werror to the QEMUU config script
if libc is musl.

hvmloader doesn't build on musl systems today. Disable any guest
firmware build.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Wei Liu <wl@xen.org>
automation/scripts/build

index 7038e5eb50bfd25ed921585febdc7764ca5f457d..959a26d0842ea0d46ddbcde3f5a10aa6ab53fee8 100755 (executable)
@@ -28,6 +28,14 @@ if [[ "${CC}" == "clang"* ]]; then
     cfgargs+=("--disable-stubdom")
 fi
 
+if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
+    # disable --disable-werror for QEMUU when building with MUSL
+    cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
+    # hvmloader doesn't build on MUSL systems
+    cfgargs+=("--disable-seabios")
+    cfgargs+=("--disable-rombios")
+fi
+
 # Qemu requires Python 3.5 or later
 if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))"; then
     cfgargs+=("--with-system-qemu=/bin/false")