diff options
author | Pingfan Liu <piliu@redhat.com> | 2019-11-29 09:09:05 +0800 |
---|---|---|
committer | Kazuhito Hagio <k-hagio@ab.jp.nec.com> | 2019-12-09 15:37:53 -0500 |
commit | 71e798cb1b85e4879a19607ebb0a061cbc92f70f (patch) | |
tree | 9dd9e589dc3a1d2accb68e33f0a11e80288db5e2 | |
parent | 82e6cce2219a8fe32d34a50b7e0d3dd620d739f1 (diff) |
[PATCH] Makefile: remove -lebl from LIBS when no libebl.a
Since the following commit, -lebl has been removed from elfutils.
(elfutils-0.178 or later contains the commit.)
commit b833c731359af12af9f16bcb621b3cdc170eafbc
Author: Mark Wielaard <mark@klomp.org>
Date: Thu Aug 29 23:34:11 2019 +0200
libebl: Don't install libebl.a, libebl.h and remove backends from spec.
All archive members from libebl.a are now in libdw.a. We don't generate
separate backend shared libraries anymore. So remove them from the
elfutils.spec file.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Without the patch, building process fails with the following error.
/usr/bin/ld: cannot find -lebl
collect2: error: ld returned 1 exit status
make: *** [makedumpfile] Error 1
So remove it from LIBS for makedumpfile when elfutils does not have
libebl.a.
Signed-off-by: Pingfan Liu <piliu@redhat.com>
Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -50,7 +50,7 @@ OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART)) SRC_ARCH = arch/arm.c arch/arm64.c arch/x86.c arch/x86_64.c arch/ia64.c arch/ppc64.c arch/s390x.c arch/ppc.c arch/sparc64.c OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH)) -LIBS = -ldw -lbz2 -lebl -ldl -lelf -lz +LIBS = -ldw -lbz2 -ldl -lelf -lz ifneq ($(LINKTYPE), dynamic) LIBS := -static $(LIBS) endif @@ -79,6 +79,11 @@ LINK_TEST_PROG="int clock_gettime(); int main(){ return clock_gettime(); }" LIBS := $(LIBS) $(call try-run,\ echo $(LINK_TEST_PROG) | $(CC) $(CFLAGS) -o "$$TMP" -x c -,,-lrt) +# elfutils-0.178 or later does not install libebl.a. +LINK_TEST_PROG="int main() { return 0; }" +LIBS := $(LIBS) $(call try-run,\ + echo $(LINK_TEST_PROG) | $(CC) -o "$$TMP" -x c - -lebl,-lebl,) + all: makedumpfile $(OBJ_PART): $(SRC_PART) |