Hi,

I rebased an old series I started more than 1 year ago and tried
to build it using '../configure --extra-cflags=-Wint-conversion'
but got:

cc1plus: error: command-line option ‘-Wint-conversion’ is valid for
C/ObjC but not for C++ [-Werror]

QEMU_CXXFLAGS are sanitized in update_cxxflags() but when linking
with the C++ linker the C specific flags are propagated via
QEMU_LDFLAGS:

  --extra-cflags=*) QEMU_CFLAGS="$QEMU_CFLAGS $optarg"
                    QEMU_LDFLAGS="$QEMU_LDFLAGS $optarg"
  ;;
  --extra-cxxflags=*) QEMU_CXXFLAGS="$QEMU_CXXFLAGS $optarg"
  ;;
  --extra-ldflags=*) QEMU_LDFLAGS="$QEMU_LDFLAGS $optarg"
                     EXTRA_LDFLAGS="$optarg"

Maybe the change comes from commit db5adeaa84d:
("build-sys: clean up flags included in the linker command line").

Any suggestion where to filter EXTRA_LDFLAGS for C++?
Should I add a filtered EXTRA_LDXXFLAGS (similar to QEMU_CXXFLAGS)?

Thanks,

Phil.


Reply via email to