From cc8b4905ef5b5ed7b97db58a545814be464a288b Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Wed, 7 Sep 2022 07:49:24 -0500 Subject: [PATCH] trivial: only build thunderbolt for x86 architectures It's true that the USB4 spec won't require x86, but a recent autopkgtest failure on powerpc doesn't make sense to debug. You won't ever see TBT in a powerpc machine. We can loosen this to any non-x86 architectures later that DO prove to have support for USB4 add-in cards. --- contrib/fwupd.spec.in | 9 +++++++++ plugins/thunderbolt/meson.build | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index 1e11b68a6..7bde34c9e 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -47,6 +47,11 @@ %global have_pci_psp 1 %endif +# Until we actually have seen it outside x86 +%ifarch i686 x86_64 +%global have_thunderbolt 1 +%endif + # only available recently %if 0%{?fedora} >= 30 %global have_modem_manager 1 @@ -340,7 +345,9 @@ done %config(noreplace)%{_sysconfdir}/fwupd/uefi_capsule.conf %endif %config(noreplace)%{_sysconfdir}/fwupd/redfish.conf +%if 0%{?have_thunderbolt} %config(noreplace)%{_sysconfdir}/fwupd/thunderbolt.conf +%endif %dir %{_libexecdir}/fwupd %{_libexecdir}/fwupd/fwupd %ifarch i686 x86_64 @@ -510,7 +517,9 @@ done %{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_invalid.so %endif %{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_thelio_io.so +%if 0%{?have_thunderbolt} %{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_thunderbolt.so +%endif %if 0%{?have_uefi} %{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_tpm.so %{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_bios.so diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build index 42b4a5cd7..a42a4d31c 100644 --- a/plugins/thunderbolt/meson.build +++ b/plugins/thunderbolt/meson.build @@ -1,4 +1,4 @@ -if gudev.found() +if gudev.found() and (host_cpu == 'x86' or host_cpu == 'x86_64') cargs = ['-DG_LOG_DOMAIN="FuPluginThunderbolt"'] plugin_quirks += join_paths(meson.current_source_dir(), 'thunderbolt.quirk')