Skip to content

Commit a630508

Browse files
committed
configure, meson: move CONFIG_HOST_DSOSUF to Meson
This is just a constant string, there is no need to pass it in config-host.mak. Reviewed-by: Marc-André Lureau <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 9c29b74 commit a630508

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

configure

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ bigendian="no"
351351
mingw32="no"
352352
gcov="no"
353353
EXESUF=""
354-
HOST_DSOSUF=".so"
355354
modules="no"
356355
module_upgrades="no"
357356
prefix="/usr/local"
@@ -594,9 +593,6 @@ fi
594593
# cross-compiling to one of these OSes then you'll need to specify
595594
# the correct CPU with the --cpu option.
596595
case $targetos in
597-
Darwin)
598-
HOST_DSOSUF=".dylib"
599-
;;
600596
SunOS)
601597
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
602598
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
@@ -785,7 +781,6 @@ fi
785781

786782
if test "$mingw32" = "yes" ; then
787783
EXESUF=".exe"
788-
HOST_DSOSUF=".dll"
789784
# MinGW needs -mthreads for TLS and macro _MT.
790785
CONFIGURE_CFLAGS="-mthreads $CONFIGURE_CFLAGS"
791786
write_c_skeleton;
@@ -4638,7 +4633,6 @@ echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
46384633
echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
46394634
echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
46404635
echo "EXESUF=$EXESUF" >> $config_host_mak
4641-
echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
46424636
echo "LIBS_QGA=$libs_qga" >> $config_host_mak
46434637
if test "$gcov" = "yes" ; then
46444638
echo "CONFIG_GCOV=y" >> $config_host_mak

meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ iokit = []
250250
emulator_link_args = []
251251
nvmm =not_found
252252
hvf = not_found
253+
host_dsosuf = '.so'
253254
if targetos == 'windows'
254255
socket = cc.find_library('ws2_32')
255256
winmm = cc.find_library('winmm')
@@ -258,9 +259,11 @@ if targetos == 'windows'
258259
version_res = win.compile_resources('version.rc',
259260
depend_files: files('pc-bios/qemu-nsis.ico'),
260261
include_directories: include_directories('.'))
262+
host_dsosuf = '.dll'
261263
elif targetos == 'darwin'
262264
coref = dependency('appleframeworks', modules: 'CoreFoundation')
263265
iokit = dependency('appleframeworks', modules: 'IOKit', required: false)
266+
host_dsosuf = '.dylib'
264267
elif targetos == 'sunos'
265268
socket = [cc.find_library('socket'),
266269
cc.find_library('nsl'),
@@ -1458,6 +1461,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
14581461
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
14591462
config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
14601463

1464+
config_host_data.set_quoted('CONFIG_HOST_DSOSUF', host_dsosuf)
14611465
config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
14621466

14631467
# has_header
@@ -1603,10 +1607,9 @@ config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles('''
16031607
return printf("%zu", SIZE_MAX);
16041608
}''', args: ['-Werror']))
16051609

1606-
16071610
ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
16081611
arrays = ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
1609-
strings = ['HOST_DSOSUF', 'CONFIG_IASL']
1612+
strings = ['CONFIG_IASL']
16101613
foreach k, v: config_host
16111614
if ignored.contains(k)
16121615
# do nothing
@@ -1618,9 +1621,6 @@ foreach k, v: config_host
16181621
elif k == 'ARCH'
16191622
config_host_data.set('HOST_' + v.to_upper(), 1)
16201623
elif strings.contains(k)
1621-
if not k.startswith('CONFIG_')
1622-
k = 'CONFIG_' + k.to_upper()
1623-
endif
16241624
config_host_data.set_quoted(k, v)
16251625
elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('HOST_')
16261626
config_host_data.set(k, v == 'y' ? 1 : v)

0 commit comments

Comments
 (0)