qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

configure: --extra-cflags are passed along C++ linker via QEMU_LDFLAGS


From: Philippe Mathieu-Daudé
Subject: configure: --extra-cflags are passed along C++ linker via QEMU_LDFLAGS
Date: Tue, 1 Dec 2020 13:48:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

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

[Prev in Thread] Current Thread [Next in Thread]