configure script --extra-cflags not passed to config-meson.cross
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
Since qemu 5.2, when building, the configure would not finish, but would return this error instead:
qemu ../meson.
This is for a cross build, and I invoke qemu with the --extra-cflags and --extra-ldflags containing all the proper paths to the headers, libraries etc. It worked properly with qemu 3.1 to 5.1.
After looking into the configure script, it seems that meson is passed the CFLAGS environment variable instead of QEMU_CFLAGS, and only the latter contains the --extra-cflags argument:
echo "c_args = [${CFLAGS:
Using the CFLAGS and LDFLAGS environment variable instead of --extra-cflags and --extra-ldflags fixes the issue.
Here is my full invocation of the configure script:
CFLAGS=" -isystem /home/anisse/ dev/qemu- cross/build/ usr/include" \ "-Wl,-- gc-sections -Wl,-Y/ home/anisse/ dev/qemu- cross/build/ lib -Wl,-Y/ home/anisse/ dev/qemu- cross/build/ usr/lib -Wl,-rpath- link,/home/ anisse/ dev/qemu- cross/build/ lib -Wl,-rpath- link,/home/ anisse/ dev/qemu- cross/build/ usr/lib" \ pkg-config \ LIBDIR= "/home/ anisse/ dev/qemu- cross/build/ usr/lib/ pkgconfig" \ SYSROOT_ DIR="/home/ anisse/ dev/qemu- cross/build" \ list=aarch64- softmmu --cross- prefix= /opt/toolchains /aarch64- musl-1. 2.2-gcc- 10.2.0- binutils- 2.36-gdb- 7.12.1- 1/bin/aarch64- linux-musl-
LDFLAGS=
PKG_CONFIG=
PKG_CONFIG_
PKG_CONFIG_
./configure $(cat ../features) --enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --target-
And the content of the ./features file:
--enable-system --disable-user --disable- linux-user --disable-bsd-user --disable-docs --disable- guest-agent --disable- guest-agent- msi --enable-pie --disable-modules --disable- module- upgrades --disable-debug-tcg --disable- debug-info --disable-sparse --disable- safe-stack --disable-gnutls --disable-nettle --disable-gcrypt --disable-auth-pam --disable-sdl --disable-sdl-image --disable-gtk --disable-vte --disable-curses --disable-iconv --enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png --disable-cocoa --disable-virtfs --disable-virtiofsd --disable-libudev --disable-mpath --disable-xen --disable- xen-pci- passthrough --disable-brlapi --disable-curl --enable-membarrier --enable-fdt --enable-kvm --disable-hax --disable-hvf --disable-whpx --disable-rdma --disable-pvrdma --disable-vde --disable-netmap --disable-linux-aio --disable- linux-io- uring --disable-cap-ng --disable-attr --enable-vhost-net --enable- vhost-vsock --enable-vhost-scsi --enable- vhost-crypto --enable- vhost-kernel --enable-vhost-user --disable- vhost-user- blk-server --disable- vhost-vdpa --disable-spice --disable-rbd --disable-libiscsi --disable-libnfs --disable-smartcard --disable-u2f --enable-libusb --disable- live-block- migration --disable-usb-redir --disable-lzo --disable-snappy --disable-bzip2 --disable-lzfse --disable-zstd --disable-seccomp --disable- coroutine- pool --disable-glusterfs --disable-tpm --disable-libssh --disable-numa --disable-libxml2 --disable-tcmalloc --disable-jemalloc --disable-avx2 --disable-avx512f --disable- replication --disable-opengl --disable- virglrenderer --disable-xfsctl --disable- qom-cast- debug --enable-tools --disable-bochs --disable-cloop --disable-dmg --enable-qcow1 --enable-vdi --disable-vvfat --disable-qed --disable-parallels --disable-sheepdog --enable- crypto- afalg --disable-capstone --disable- debug-mutex --disable-libpmem --disable-xkbcommon --disable-rng-none --disable-libdaxctl