1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

Fix libdevmapper deferred removal detection

When linking, position of `-l` flags is important since
they muse come _after_ any object files which uses symbols
from a specified library, that is due to --as-needed binutils
ld flag enabled by default

Signed-off-by: Maxim Ivanov <ivanov.maxim@gmail.com>
Upstream-commit: 24152a4231d56886928265339d15884e1cfe1038
Component: engine
This commit is contained in:
Maxim Ivanov
2016-02-17 23:34:21 +00:00
parent 28d01ce1bc
commit 1c1053a5c6

View File

@@ -135,7 +135,7 @@ fi
# functionality.
if \
command -v gcc &> /dev/null \
&& ! ( echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -ldevmapper -xc - -o /dev/null &> /dev/null ) \
&& ! ( echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -xc - -ldevmapper -o /dev/null &> /dev/null ) \
; then
DOCKER_BUILDTAGS+=' libdm_no_deferred_remove'
fi