Commit 90284132 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

make: propagate config DEFINES in CFLAGS

The problem:
$(DEFINES) array added to $(CFLAGS) in a global Makefile.
But, in criu/Makefile we include Makefile.config, which
adds feature-based config options to $(DEFINES).
We need to propagate this new defines again to CFLAGS array.

Previously, I added:
ccflags-y		+= $(DEFINES)
to Makefile.crtools, but those $(DEFINES) are useful not only
in the crtools makefile.

Let's just propagate this feature defines to CFLAGS and DEFINES
in place.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1d72d801
...@@ -4,14 +4,17 @@ include $(SRC_DIR)/scripts/feature-tests.mak ...@@ -4,14 +4,17 @@ include $(SRC_DIR)/scripts/feature-tests.mak
ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true) ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
LIBS += -lbsd LIBS += -lbsd
DEFINES += -DCONFIG_HAS_LIBBSD FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
endif endif
ifeq ($(call pkg-config-check,libselinux),y) ifeq ($(call pkg-config-check,libselinux),y)
LIBS += -lselinux LIBS += -lselinux
DEFINES += -DCONFIG_HAS_SELINUX FEATURE_DEFINES += -DCONFIG_HAS_SELINUX
endif endif
export DEFINES += $(FEATURE_DEFINES)
export CFLAGS += $(FEATURE_DEFINES)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \ FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW
......
ccflags-y += -iquote criu/$(ARCH) ccflags-y += -iquote criu/$(ARCH)
ccflags-y += $(DEFINES)
obj-y += action-scripts.o obj-y += action-scripts.o
obj-y += aio.o obj-y += aio.o
obj-y += bfd.o obj-y += bfd.o
......
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