diff --git a/samba.spec b/samba.spec index 6b42dad..bb7d1eb 100644 --- a/samba.spec +++ b/samba.spec @@ -336,9 +336,11 @@ BuildRequires: zlib-devel >= 1.2.3 BuildRequires: pkgconfig(libsystemd) +%ifnarch i686 %if 0%{?fedora} >= 37 BuildRequires: mold %endif +%endif %if %{with vfs_glusterfs} BuildRequires: glusterfs-api-devel >= 3.4.0.16 @@ -1267,12 +1269,16 @@ rm -f lib/crypto/{aes,rijndael}*.c # TODO: resolve underlinked python modules export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" -# Use the mold linker +# Use the mold linker if possible +export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" + +%ifnarch i686 %if 0%{?fedora} >= 37 export LDFLAGS="%{__global_ldflags} -fuse-ld=mold" export python_LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-z,defs//g')" -%else -export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" +#endif fedora >= 37 +%endif +#endif narch i686 %endif # Add support for mock ccache plugin