make, soccr: let CRIU depend on libsoccr

As -lsoccr now is in $(LIBS) in Makefile.packages, it should be
build before criu objects. Otherwise, we try to compile
feature-tests with $(LIBS) and the succesful features fails with:
  <stdin>:1:25: warning: extra tokens at end of #include directive
  /usr/bin/ld: cannot find -lsoccr
  collect2: error: ld returned 1 exit status
Which lead to later problems:
  criu/sk-tcp.c:50:8: error: redefinition of 'struct tcp_repair_opt'
   struct tcp_repair_opt {
          ^
  In file included from criu/sk-tcp.c:1:0:
  /usr/include/netinet/tcp.h:259:8: note: originally defined here
   struct tcp_repair_opt
Because of fails in really-sucessful feture-tests.

P.S.
Maybe we should unbound feature-tests compilation from $(LIBS),
specified in Makefile.packages - that looks right after all.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Dmitry Safonov 2016-09-23 15:21:51 +03:00 committed by Andrei Vagin
parent e44320ec77
commit e2fb30d076

View file

@ -188,8 +188,7 @@ endif
#
# Configure variables.
CONFIG_HEADER_REL := criu/include/config.h
export CONFIG_HEADER := $(SRC_DIR)/$(CONFIG_HEADER_REL)
export CONFIG_HEADER := criu/include/config.h
ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),)
include $(SRC_DIR)/Makefile.config
endif
@ -211,7 +210,7 @@ include Makefile.compel
SOCCR_A := soccr/libsoccr.a
SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h
$(SOCCR_CONFIG): $(CONFIG_HEADER)
$(Q) test -f $@ || ln -s ../$(CONFIG_HEADER_REL) $@
$(Q) test -f $@ || ln -s ../$(CONFIG_HEADER) $@
soccr/%: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr $@
soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
@ -226,9 +225,9 @@ $(SOCCR_A): |soccr/built-in.o
#
# But note that we're already included
# the nmk so we can reuse it there.
criu/%: images/built-in.o compel/compel-host $(VERSION_HEADER) $(CONFIG_HEADER) .FORCE
criu/%: images/built-in.o compel/compel-host $(VERSION_HEADER) .FORCE
$(Q) $(MAKE) $(build)=criu $@
criu: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER) $(CONFIG_HEADER)
criu: images/built-in.o compel/compel-host $(SOCCR_A) $(VERSION_HEADER)
$(Q) $(MAKE) $(build)=criu all
.PHONY: criu