Do not use mold on i686, support for it has been dropped

This commit is contained in:
Andreas Schneider 2023-11-15 14:38:09 +01:00
parent 4f9b479032
commit c92b2eb22b
1 changed files with 9 additions and 3 deletions

View File

@ -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