1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Fix library ordering in Makefiles

The existing ordering linked `libutil` before `libstore`, which causes
link failures when building statically. This is due to `libstore` using
functions from `libutil`, and the fact that symbol resolution works
"forward" - i.e. if you pass `-lfoo -lbar -lbaz`, any symbols that
`libbar` uses from `libbaz` will be resolved, but symbols from `libfoo`
will not since it comes first in the command line.

All this to say: this commit reorders the libraries which fixes the link
errors.
This commit is contained in:
Andrew Dunham 2018-04-21 21:10:52 -07:00
parent 040acdcee2
commit 3a918014b2
3 changed files with 3 additions and 3 deletions

View file

@ -4,6 +4,6 @@ build-remote_DIR := $(d)
build-remote_INSTALL_DIR := $(libexecdir)/nix
build-remote_LIBS = libmain libutil libformat libstore
build-remote_LIBS = libmain libformat libstore libutil
build-remote_SOURCES := $(d)/build-remote.cc