lix-releng-staging/mk
Sergei Trofimovich 579dcbabd5 mk: prefert inplace library paths to system ones (take 2)
It's a second attempt to merge the change. Previous attempt
was reverted in b976b34a5b.
Since then underlying failure exposed by original change was
fixed by https://github.com/NixOS/nix/pull/5354.

Below goes description of original change:

The link failure happens on a system with stable nix-2.3.15
installed in /usr/lib64 (it's libutil.so API differs from master):

```
LANG=C make V=1
g++ -o /home/slyfox/dev/git/nix/src/libstore/libnixstore.so \
    -shared -L/usr/lib64 -Wl,--no-copy-dt-needed-entries \
    src/libstore/binary-cache-store.o ... src/libstore/uds-remote-store.o \
    -lsqlite3 -lcurl -lsodium -pthread -ldl -lseccomp -Wl,-z,defs -Wl,-soname=libnixstore.so
      -Wl,-rpath,/home/slyfox/dev/git/nix/src/libutil -Lsrc/libutil -lnixutil
ld: src/libstore/binary-cache-store.o: in function `nix::BinaryCacheStore::BinaryCacheStore(
    std::map<std::__cxx11::basic_string<char, std::char_traits<char>, ...
nix/src/libstore/binary-cache-store.cc:30: undefined reference to `nix::readFile(
    std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' ...
...
```

This happens due to `-L/usr/lib64 -Lsrc/libutil` search path ordering.
The change turns it into `-Lsrc/libutil -L/usr/lib64`.

Closes: https://github.com/NixOS/nix/issues/3087
2022-02-07 23:39:33 +00:00
..
clean.mk Add 'mk/' from commit '1eff3ad37fdb9dcf9f8528fdacea0ebf0e79d545' 2014-02-01 14:38:28 +01:00
functions.mk Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
install.mk Sync with make-rules repo 2014-04-03 17:37:14 +02:00
lib.mk Apply OS checks to host platform, not build 2021-06-23 15:00:36 +00:00
libraries.mk mk: prefert inplace library paths to system ones (take 2) 2022-02-07 23:39:33 +00:00
patterns.mk mk: add support for CPPFLAGS 2021-02-26 22:56:51 +00:00
precompiled-headers.mk mk/precompiled-headers.mk: Remove special handling for clang 2020-10-06 13:27:09 +02:00
programs.mk mk: prefert inplace library paths to system ones (take 2) 2022-02-07 23:39:33 +00:00
run_test.sh Move the CA tests to a sub-directory 2021-03-01 11:08:01 +01:00
templates.mk Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
tests.mk mk/tests.mk: document 'check' and 'installcheck' in 'make help' 2021-10-02 11:09:55 +01:00
tracing.mk Revert "Add support for building JARs from Java sources" 2021-02-26 23:06:58 +00:00