On 11/8/21 10:17, Philippe Mathieu-Daudé wrote:
- QEMU_CXXFLAGS="$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" + QEMU_CXXFLAGS="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" CONFIGURE_CXXFLAGS=$(echo "$CONFIGURE_CFLAGS" | sed s/-std=gnu11/-std=gnu++11/) for arg in $QEMU_CFLAGS; do case $arg inupdate_cxxflags() should keep previous QEMU_CXXFLAGS. But since we call it only once, we don't use it to update. IMHO we should inline this code where it is called, then overwriting QEMU_CXXFLAGS makes sense.
With Meson 0.60 it's possible to link-test a C source with a C++ compiler and then all this stuff (including the link_language detection) can be moved to the proper place.
Paolo
