Skip to content

Commit ff66ee5

Browse files
committed
configure: do not duplicate CPU_CFLAGS into QEMU_LDFLAGS
Since commit 4dba278 ("configure, meson: move CPU_CFLAGS out of QEMU_CFLAGS"), CPU_CFLAGS is included in the link commands both during configure and (via config-meson.cross) during meson. It need not be added separately to QEMU_LDFLAGS. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 605a927 commit ff66ee5

File tree

1 file changed

+14
-39
lines changed

1 file changed

+14
-39
lines changed

configure

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,45 +1263,20 @@ firmwarepath="${firmwarepath:-$datadir/qemu-firmware}"
12631263
localedir="${localedir:-$datadir/locale}"
12641264

12651265
case "$cpu" in
1266-
ppc)
1267-
CPU_CFLAGS="-m32"
1268-
QEMU_LDFLAGS="-m32 $QEMU_LDFLAGS"
1269-
;;
1270-
ppc64)
1271-
CPU_CFLAGS="-m64"
1272-
QEMU_LDFLAGS="-m64 $QEMU_LDFLAGS"
1273-
;;
1274-
sparc)
1275-
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
1276-
QEMU_LDFLAGS="-m32 -mv8plus $QEMU_LDFLAGS"
1277-
;;
1278-
sparc64)
1279-
CPU_CFLAGS="-m64 -mcpu=ultrasparc"
1280-
QEMU_LDFLAGS="-m64 $QEMU_LDFLAGS"
1281-
;;
1282-
s390)
1283-
CPU_CFLAGS="-m31"
1284-
QEMU_LDFLAGS="-m31 $QEMU_LDFLAGS"
1285-
;;
1286-
s390x)
1287-
CPU_CFLAGS="-m64"
1288-
QEMU_LDFLAGS="-m64 $QEMU_LDFLAGS"
1289-
;;
1290-
i386)
1291-
CPU_CFLAGS="-m32"
1292-
QEMU_LDFLAGS="-m32 $QEMU_LDFLAGS"
1293-
;;
1294-
x86_64)
1295-
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
1296-
# If we truly care, we should simply detect this case at
1297-
# runtime and generate the fallback to serial emulation.
1298-
CPU_CFLAGS="-m64 -mcx16"
1299-
QEMU_LDFLAGS="-m64 $QEMU_LDFLAGS"
1300-
;;
1301-
x32)
1302-
CPU_CFLAGS="-mx32"
1303-
QEMU_LDFLAGS="-mx32 $QEMU_LDFLAGS"
1304-
;;
1266+
ppc) CPU_CFLAGS="-m32" ;;
1267+
ppc64) CPU_CFLAGS="-m64" ;;
1268+
sparc) CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
1269+
sparc64) CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
1270+
s390) CPU_CFLAGS="-m31" ;;
1271+
s390x) CPU_CFLAGS="-m64" ;;
1272+
i386) CPU_CFLAGS="-m32" ;;
1273+
x32) CPU_CFLAGS="-mx32" ;;
1274+
1275+
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
1276+
# If we truly care, we should simply detect this case at
1277+
# runtime and generate the fallback to serial emulation.
1278+
x86_64) CPU_CFLAGS="-m64 -mcx16" ;;
1279+
13051280
# No special flags required for other host CPUs
13061281
esac
13071282

0 commit comments

Comments
 (0)