diff options
author | Dmitry Safonov <dsafonov@virtuozzo.com> | 2016-08-08 15:57:15 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@virtuozzo.com> | 2017-03-14 23:58:08 +0300 |
commit | 31d394bc55ad9663c1479e472f11da280108256d (patch) | |
tree | e218dc7df2c108859bc0f8f886678430f0bdff21 /Makefile.config | |
parent | b6b2290f8726a7bff329480914a869d3d1e0d01f (diff) |
feature-test: add CONFIG_COMPAT compile option
I'll wrap all compatible code in this CONFIG_COMPAT define.
As I'll wrap also compatible parasite generation in this,
it's also makefile variable, rather than just C define.
The test itself consists of including stubs-32.h, which is
glibc6-i686 presence test and is compiled with -m32 option,
which is test for gcc-multilib.
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Diffstat (limited to 'Makefile.config')
-rw-r--r-- | Makefile.config | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.config b/Makefile.config index e0d49d2ff..42b2d94e6 100644 --- a/Makefile.config +++ b/Makefile.config @@ -19,6 +19,14 @@ CONFIG_FILE = $(SRC_DIR)/.config $(CONFIG_FILE): touch $(CONFIG_FILE) +ifeq ($(SRCARCH),x86) +# CONFIG_COMPAT is only for x86 now, no need for compile-test other archs +ifeq ($(call try-cc,$(FEATURE_TEST_X86_COMPAT),-m32),true) + export CONFIG_COMPAT := y + FEATURE_DEFINES += -DCONFIG_COMPAT +endif +endif + export DEFINES += $(FEATURE_DEFINES) export CFLAGS += $(FEATURE_DEFINES) |