Commit fb67795a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: config -- Drop try-build helper

Don't need it, also add DEFINES into try-cc,
after all we define a number of things in
this variable and it's better to pass it
to tests for conditional compilation.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Tested-by: 's avatarRuslan Kuprieiv <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 796a34d1
# try-cc # try-cc
# Usage: option = $(call try-cc, source-to-build, cc-options) # Usage: option = $(call try-cc, source-to-build, cc-options)
try-cc = $(shell sh -c \ try-cc = $(shell sh -c \
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \ 'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
echo "$(1)" | \ echo "$(1)" | \
$(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \ $(CC) $(DEFINES) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
rm -f "$$TMP"') rm -f "$$TMP"')
# try-build
# Usage: option = $(call try-build, source-to-build, cc-options, link-options)
try-build = $(shell sh -c \
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
echo "$(1)" | \
$(CC) -x c - $(2) $(3) -o "$$TMP" > /dev/null 2>&1 && echo y; \
rm -f "$$TMP"')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment