diff mbox series

[NOTFORMERGE,v3,17/17] configure: libSLiRP buildsys kludge

Message ID 20210507144315.1994337-18-philmd@redhat.com
State New
Headers show
Series misc: Replace alloca() by g_malloc() | expand

Commit Message

Philippe Mathieu-Daudé May 7, 2021, 2:43 p.m. UTC
Only enable -Walloca when libSLiRP is not built.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé May 7, 2021, 5:15 p.m. UTC | #1
On 5/7/21 4:43 PM, Philippe Mathieu-Daudé wrote:
> Only enable -Walloca when libSLiRP is not built.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  configure | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

> +# Kludge pending an alloca() call removed from libSLiRP, see:
> +# https://lists.freedesktop.org/archives/slirp/2021-May/000150.html

FYI it has already been merged, thanks to Marc-André :)
diff mbox series

Patch

diff --git a/configure b/configure
index 67cb6d5421c..ab5b6248253 100755
--- a/configure
+++ b/configure
@@ -552,7 +552,7 @@  ARFLAGS="${ARFLAGS-rv}"
 # provides these semantics.)
 QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
-QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls -Walloca $QEMU_CFLAGS"
+QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
 
 # Flags that are needed during configure but later taken care of by Meson
@@ -5255,6 +5255,14 @@  case "$slirp" in
     ;;
 esac
 
+# Kludge pending an alloca() call removed from libSLiRP, see:
+# https://lists.freedesktop.org/archives/slirp/2021-May/000150.html
+case "$slirp" in
+  internal | disabled)
+    QEMU_CFLAGS="-Walloca $QEMU_CFLAGS"
+    ;;
+esac
+
 ##########################################
 # check for usable __NR_keyctl syscall