By default the lookup of libraries first searches for haswell libs. However,
when we build the libs with %libdir% /usr/lib64/haswell directory, it will
hardcode the library path for non LD_LIBRARY lookups in the library itself.
For example, glibc breaks when shipping select haswell libraries (there's no
need to duplicate most of them), as /usr/lib64/haswell/locale/locale-archive
becomes hardcoded path which does not exist.
Same applies to %libdir%/gconv/gconv-modules.
This patch ensures that libraries are built without haswell paths relying only
on LD_LIBRARY lookups to select the faster avx2 library versions where they
exist.
The sole drawback would be packages making full path symlinks would be broken.
This should be very rare (libnss and pulseaudio only on my system) which are
from symlinks we create in the build, so easily fixable.
By default the lookup of libraries first searches for haswell libs. However, when we build the libs with %libdir% /usr/lib64/haswell directory, it will hardcode the library path for non LD_LIBRARY lookups in the library itself. For example, glibc breaks when shipping select haswell libraries (there's no need to duplicate most of them), as /usr/lib64/haswell/locale/locale-archive becomes hardcoded path which does not exist.
Same applies to %libdir%/gconv/gconv-modules.
This patch ensures that libraries are built without haswell paths relying only on LD_LIBRARY lookups to select the faster avx2 library versions where they exist.
The sole drawback would be packages making full path symlinks would be broken. This should be very rare (libnss and pulseaudio only on my system) which are from symlinks we create in the build, so easily fixable.
Signed-off-by: Peter O'Connor peter@solus-project.com