Skip to content
  • Daniel P. Berrangé's avatar
    8b843725
    hw/display: avoid creating empty loadable modules · 8b843725
    Daniel P. Berrangé authored
    When using --disable-virglrenderer, QEMU still creates
    
      hw-display-virtio-gpu-gl.so
      hw-display-virtio-vga-gl.so
      hw-display-virtio-gpu-pci-gl.so
    
    but when these are loaded, they provide no functionality as the code
    which registers types is not compiled in. Funtionally this is
    relatively harmless, because QEMU is fine loading a module with no
    types.
    
    This is rather confusing for users and OS distro maintainers though,
    as they think they have the GL functionality built, but in fact the
    module they are looking at provides nothing of value.
    
    The root cause is the use of 'when/if_true' rules when adding sources
    to the module source set. If all the rules evaluate to false, then we
    have declared the module, but not added anything to it.  We need to
    put declaration of the entire module inside a condition based on
    existance of the 3rd party library deps that are mandatory.
    
    Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1352
    
    
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Message-Id: <20221219125830.2369169-1-berrange@redhat.com>
    [Do not check for pixman. - Paolo]
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    8b843725
    hw/display: avoid creating empty loadable modules
    Daniel P. Berrangé authored
    When using --disable-virglrenderer, QEMU still creates
    
      hw-display-virtio-gpu-gl.so
      hw-display-virtio-vga-gl.so
      hw-display-virtio-gpu-pci-gl.so
    
    but when these are loaded, they provide no functionality as the code
    which registers types is not compiled in. Funtionally this is
    relatively harmless, because QEMU is fine loading a module with no
    types.
    
    This is rather confusing for users and OS distro maintainers though,
    as they think they have the GL functionality built, but in fact the
    module they are looking at provides nothing of value.
    
    The root cause is the use of 'when/if_true' rules when adding sources
    to the module source set. If all the rules evaluate to false, then we
    have declared the module, but not added anything to it.  We need to
    put declaration of the entire module inside a condition based on
    existance of the 3rd party library deps that are mandatory.
    
    Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1352
    
    
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Message-Id: <20221219125830.2369169-1-berrange@redhat.com>
    [Do not check for pixman. - Paolo]
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading