Commit 58ba12ba authored by Julien Thierry's avatar Julien Thierry Committed by Will Deacon
Browse files

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: default avatarJulien Thierry <julien.thierry@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 665f1b72
......@@ -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)
......
Supports Markdown
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