aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Thierry <julien.thierry@arm.com>2018-07-13 09:04:03 +0100
committerWill Deacon <will.deacon@arm.com>2018-07-13 10:28:31 +0100
commit58ba12ba4e42d4daf8dcc02b02d4e9fafd8b8327 (patch)
tree6ab91c105b345d2bea22c14767adc23f64206635
parent665f1b7228b421da420c4244d5374f5ebb14644a (diff)
downloadkvmtool-58ba12ba4e42d4daf8dcc02b02d4e9fafd8b8327.tar.gz
Makefile: fix skipped dependencies
For some optional dependencies, both static and dynamic linking is tested. But if the first one being tested fails, the dependency is added to the NOTFOUND list and reported as being skipped while it might still be built with another linkage. Add optional dependencies to NOTFOUND only if both linkage are invalid. Signed-off-by: Julien Thierry <julien.thierry@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index dfa0b62d..d5352046 100644
--- a/Makefile
+++ b/Makefile
@@ -254,22 +254,24 @@ ifeq ($(call try-build,$(SOURCE_ZLIB),$(CFLAGS),$(LDFLAGS) -lz),y)
CFLAGS_DYNOPT += -DCONFIG_HAS_ZLIB
LIBS_DYNOPT += -lz
else
- NOTFOUND += zlib
-endif
-ifeq ($(call try-build,$(SOURCE_ZLIB),$(CFLAGS),$(LDFLAGS) -lz -static),y)
- CFLAGS_STATOPT += -DCONFIG_HAS_ZLIB
- LIBS_STATOPT += -lz
+ ifeq ($(call try-build,$(SOURCE_ZLIB),$(CFLAGS),$(LDFLAGS) -lz -static),y)
+ CFLAGS_STATOPT += -DCONFIG_HAS_ZLIB
+ LIBS_STATOPT += -lz
+ else
+ NOTFOUND += zlib
+ endif
endif
ifeq ($(call try-build,$(SOURCE_AIO),$(CFLAGS),$(LDFLAGS) -laio),y)
CFLAGS_DYNOPT += -DCONFIG_HAS_AIO
LIBS_DYNOPT += -laio
else
- NOTFOUND += aio
-endif
-ifeq ($(call try-build,$(SOURCE_AIO),$(CFLAGS),$(LDFLAGS) -laio -static),y)
- CFLAGS_STATOPT += -DCONFIG_HAS_AIO
- LIBS_STATOPT += -laio
+ ifeq ($(call try-build,$(SOURCE_AIO),$(CFLAGS),$(LDFLAGS) -laio -static),y)
+ CFLAGS_STATOPT += -DCONFIG_HAS_AIO
+ LIBS_STATOPT += -laio
+ else
+ NOTFOUND += aio
+ endif
endif
ifeq ($(LTO),1)