Skip to contentSkip to conversation

sparse: fix build

PATCH Applied Gerd Hoffmann 2 participants 2 messages Oct 15, 2014 – Oct 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparse: fix build

c++ compiler isn't wrapped with cgcc, resulting in gcc complaining about the sparse compiler flags which it doesn't know in case qemu is built with --enable-sparse.

---
 configure | 1 +
 1 file changed, 1 insertion(+)
configure +1 -0
index 9ac2600..90349f3 100755
@@ -4908,6 +4908,7 @@ echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
 if test "$sparse" = "yes" ; then
   echo "CC           := REAL_CC=\"\$(CC)\" cgcc"       >> $config_host_mak
+  echo "CXX          := REAL_CC=\"\$(CXX)\" cgcc"      >> $config_host_mak
   echo "HOST_CC      := REAL_CC=\"\$(HOST_CC)\" cgcc"  >> $config_host_mak
   echo "QEMU_CFLAGS  += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
 fi
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Gerd Hoffmann

c++ compiler isn't wrapped with cgcc, resulting in gcc complaining about the sparse compiler flags which it doesn't know in case qemu is built with --enable-sparse.

Applied to -trivial, thank you!

/mjt