diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2021-07-09 15:29:57 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2021-07-14 15:54:13 +0100 |
commit | ba4dd2aabc35bc5385739e13f14e3a10a223ede0 (patch) | |
tree | 00ca2a431338e166f52eb405252773be6f4398e4 /configure | |
parent | 9b8e4298517fc265b7dea93d79eb53a9b3315ddc (diff) |
tcg/plugins: enable by default for most TCG builds
Aside from a minor bloat to file size the ability to have TCG plugins
has no real impact on performance unless a plugin is actively loaded.
Even then the libempty.so plugin shows only a minor degradation in
performance caused by the extra book keeping the TCG has to do to keep
track of instructions. As it's a useful feature lets just enable it by
default and reduce our testing matrix a little.
We need to move our linker testing earlier so we can be sure we can
enable the loader module required. As we have ruled out static &
plugins in an earlier patch we can also reduce the indent a little.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210709143005.1554-33-alex.bennee@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 124 |
1 files changed, 67 insertions, 57 deletions
@@ -429,7 +429,7 @@ libxml2="auto" debug_mutex="no" libpmem="auto" default_devices="true" -plugins="no" +plugins="$default_feature" fuzzing="no" rng_none="no" secret_keyring="$default_feature" @@ -2209,6 +2209,8 @@ if test "$static" = "yes" ; then fi if test "$plugins" = "yes"; then error_exit "static and plugins are mutually incompatible" + else + plugins="no" fi fi @@ -3103,6 +3105,69 @@ for drv in $audio_drv_list; do done ########################################## +# plugin linker support probe + +if test "$plugins" != "no"; then + + ######################################### + # See if --dynamic-list is supported by the linker + + ld_dynamic_list="no" + cat > $TMPTXT <<EOF +{ + foo; +}; +EOF + + cat > $TMPC <<EOF +#include <stdio.h> +void foo(void); + +void foo(void) +{ + printf("foo\n"); +} + +int main(void) +{ + foo(); + return 0; +} +EOF + + if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then + ld_dynamic_list="yes" + fi + + ######################################### + # See if -exported_symbols_list is supported by the linker + + ld_exported_symbols_list="no" + cat > $TMPTXT <<EOF + _foo +EOF + + if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then + ld_exported_symbols_list="yes" + fi + + if test "$ld_dynamic_list" = "no" && + test "$ld_exported_symbols_list" = "no" ; then + if test "$plugins" = "yes"; then + error_exit \ + "Plugin support requires dynamic linking and specifying a set of symbols " \ + "that are exported to plugins. Unfortunately your linker doesn't " \ + "support the flag (--dynamic-list or -exported_symbols_list) used " \ + "for this purpose." + else + plugins="no" + fi + else + plugins="yes" + fi +fi + +########################################## # glib support probe glib_req_ver=2.56 @@ -3110,7 +3175,7 @@ glib_modules=gthread-2.0 if test "$modules" = yes; then glib_modules="$glib_modules gmodule-export-2.0" fi -if test "$plugins" = yes; then +if test "$plugins" = "yes"; then glib_modules="$glib_modules gmodule-2.0" fi @@ -3935,61 +4000,6 @@ if compile_prog "" "" ; then atomic64=yes fi -######################################### -# See if --dynamic-list is supported by the linker -ld_dynamic_list="no" -if test "$static" = "no" ; then - cat > $TMPTXT <<EOF -{ - foo; -}; -EOF - - cat > $TMPC <<EOF -#include <stdio.h> -void foo(void); - -void foo(void) -{ - printf("foo\n"); -} - -int main(void) -{ - foo(); - return 0; -} -EOF - - if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then - ld_dynamic_list="yes" - fi -fi - -######################################### -# See if -exported_symbols_list is supported by the linker - -ld_exported_symbols_list="no" -if test "$static" = "no" ; then - cat > $TMPTXT <<EOF - _foo -EOF - - if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then - ld_exported_symbols_list="yes" - fi -fi - -if test "$plugins" = "yes" && - test "$ld_dynamic_list" = "no" && - test "$ld_exported_symbols_list" = "no" ; then - error_exit \ - "Plugin support requires dynamic linking and specifying a set of symbols " \ - "that are exported to plugins. Unfortunately your linker doesn't " \ - "support the flag (--dynamic-list or -exported_symbols_list) used " \ - "for this purpose." -fi - ######################################## # check if getauxval is available. |