Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / tools / build / feature / Makefile
index 1c0d69f445524ed75b61dd1ad9d9dcfa9bcfb1d9..74ca42093d70d72fac5a4b1776237be9873f480a 100644 (file)
@@ -70,8 +70,13 @@ test-libelf.bin:
 test-glibc.bin:
        $(BUILD)
 
+DWARFLIBS := -ldw
+ifeq ($(findstring -static,${LDFLAGS}),-static)
+DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
+endif
+
 test-dwarf.bin:
-       $(BUILD) -ldw
+       $(BUILD) $(DWARFLIBS)
 
 test-libelf-mmap.bin:
        $(BUILD) -lelf