diff --git a/glibc.changes b/glibc.changes index 6cfd806..aadc590 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 7 10:28:36 UTC 2025 - Andreas Schwab + +- Correctly determine livepatching support + ------------------------------------------------------------------- Sun Jan 5 11:43:47 UTC 2025 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index 56578b9..d4fa25a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -61,13 +61,6 @@ %define with_gcc 13 %endif -# Enable support for livepatching. -%ifarch x86_64 -%bcond_without livepatching -%else -%bcond_with livepatching -%endif - %bcond_with build_all %define build_main 1 %define build_utils %{with build_all} @@ -103,6 +96,24 @@ ExclusiveArch: do_not_build %endif %define host_arch %{?cross_cpu}%{!?cross_cpu:%{_target_cpu}} +# Enable support for livepatching. +%define have_livepatching_support 0 +%if %{build_cross} +%if "%{cross_arch}" == "x86_64" +%define have_livepatching_support 1 +%endif +%else +%ifarch x86_64 +%define have_livepatching_support 1 +%endif +%endif + +%if %{have_livepatching_support} +%bcond_without livepatching +%else +%bcond_with livepatching +%endif + %if %{build_main} %define name_suffix %{nil} %else