Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions build/meta-qemu/classes/qemu.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,30 @@ qemu_do_configure () {
# per IB_PLATFORM), but PRESERVE any other arch already built in a prior
# run — otherwise meson would drop it. So building arm-softmmu then
# aarch64-softmmu (or vice-versa) keeps both qemu-system-* binaries.
tlist="${QEMU_TARGET}"
#
# Fixed order, so the same targets always give the same configure line.

tlist=""
for t in arm-softmmu aarch64-softmmu; do
if [ "$t" != "${QEMU_TARGET}" ] && ls build/$t/qemu-system-* >/dev/null 2>&1; then
tlist="$tlist,$t"
if [ "$t" = "${QEMU_TARGET}" ] || ls build/$t/qemu-system-* >/dev/null 2>&1; then
tlist="${tlist:+$tlist,}$t"
fi
done

# QEMU's configure wipes build/, so re-running it means a full rebuild.
# Only run it when the options changed; meson/ninja handle the rest.

args="--target-list=$tlist ${QEMU_OPTS}"
stamp=build/.ib-configure-args

if [ -f $stamp ] && [ "$(cat $stamp)" = "$args" ]; then
echo "QEMU already configured (target-list=$tlist), skipping configure"
return
fi

echo "Configuring QEMU (target-list=$tlist)..."
./configure --target-list=$tlist ${QEMU_OPTS}
./configure $args
echo "$args" > $stamp

}

Expand Down
Loading