* [PATCH] makedumpfile/Makefile: remove -lebl from LIBS
@ 2019-11-29 1:09 Pingfan Liu
2019-12-04 22:36 ` Kazuhito Hagio
0 siblings, 1 reply; 6+ messages in thread
From: Pingfan Liu @ 2019-11-29 1:09 UTC (permalink / raw)
To: kexec; +Cc: Kazuhito Hagio
since the following commit, -lebl has been removed from elfutils.
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>
So remove it from LIBS for makedumpfile
Signed-off-by: Pingfan Liu <piliu@redhat.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 1fdb628..df21b93 100644
--- a/Makefile
+++ b/Makefile
@@ -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
--
2.7.5
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH] makedumpfile/Makefile: remove -lebl from LIBS 2019-11-29 1:09 [PATCH] makedumpfile/Makefile: remove -lebl from LIBS Pingfan Liu @ 2019-12-04 22:36 ` Kazuhito Hagio 2019-12-06 5:54 ` piliu 0 siblings, 1 reply; 6+ messages in thread From: Kazuhito Hagio @ 2019-12-04 22:36 UTC (permalink / raw) To: Pingfan Liu, kexec@lists.infradead.org Hi Pingfan, Thank you for the patch. > -----Original Message----- > since the following commit, -lebl has been removed from elfutils. > 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> > > So remove it from LIBS for makedumpfile It seems that this is ok with the latest elfutils, but with older ones? Is it possible to remove -lebl when elfutils does not have libebl.a? Thanks, Kazu > > Signed-off-by: Pingfan Liu <piliu@redhat.com> > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 1fdb628..df21b93 100644 > --- a/Makefile > +++ b/Makefile > @@ -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 > -- > 2.7.5 > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] makedumpfile/Makefile: remove -lebl from LIBS 2019-12-04 22:36 ` Kazuhito Hagio @ 2019-12-06 5:54 ` piliu 2019-12-06 16:28 ` Kazuhito Hagio 0 siblings, 1 reply; 6+ messages in thread From: piliu @ 2019-12-06 5:54 UTC (permalink / raw) To: Kazuhito Hagio, kexec@lists.infradead.org On 12/05/2019 06:36 AM, Kazuhito Hagio wrote: > Hi Pingfan, > > Thank you for the patch. > >> -----Original Message----- >> since the following commit, -lebl has been removed from elfutils. >> 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> >> >> So remove it from LIBS for makedumpfile > > It seems that this is ok with the latest elfutils, but with older ones? > Is it possible to remove -lebl when elfutils does not have libebl.a? I have no idea about it for now. The method to check version depends on distribution. Is it doable by checking /usr/lib64/libebl ? Thanks, Pingfan > > Thanks, > Kazu > >> >> Signed-off-by: Pingfan Liu <piliu@redhat.com> >> --- >> Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index 1fdb628..df21b93 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -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 >> -- >> 2.7.5 >> > > > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] makedumpfile/Makefile: remove -lebl from LIBS 2019-12-06 5:54 ` piliu @ 2019-12-06 16:28 ` Kazuhito Hagio 2019-12-09 6:04 ` piliu 0 siblings, 1 reply; 6+ messages in thread From: Kazuhito Hagio @ 2019-12-06 16:28 UTC (permalink / raw) To: piliu; +Cc: kexec@lists.infradead.org > -----Original Message----- > > On 12/05/2019 06:36 AM, Kazuhito Hagio wrote: > > Hi Pingfan, > > > > Thank you for the patch. > > > >> -----Original Message----- > >> since the following commit, -lebl has been removed from elfutils. > >> 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> > >> > >> So remove it from LIBS for makedumpfile > > > > It seems that this is ok with the latest elfutils, but with older ones? > > Is it possible to remove -lebl when elfutils does not have libebl.a? > I have no idea about it for now. The method to check version depends on > distribution. Is it doable by checking /usr/lib64/libebl ? We have 'try-run' function written by Petr in the Makefile, which checks if clock_gettime() requies -lrt. How about utilizing it like this? diff --git a/Makefile b/Makefile index 1fdb6286e85d..d4d1fb563209 100644 --- a/Makefile +++ b/Makefile @@ -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) If libebl.a does not exist (gcc with -lebl fails), it will not append -lebl to LIBS. Thanks, Kazu > > Thanks, > Pingfan > > > > Thanks, > > Kazu > > > >> > >> Signed-off-by: Pingfan Liu <piliu@redhat.com> > >> --- > >> Makefile | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/Makefile b/Makefile > >> index 1fdb628..df21b93 100644 > >> --- a/Makefile > >> +++ b/Makefile > >> @@ -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 > >> -- > >> 2.7.5 > >> > > > > > > > > _______________________________________________ > > kexec mailing list > > kexec@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/kexec > > > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] makedumpfile/Makefile: remove -lebl from LIBS 2019-12-06 16:28 ` Kazuhito Hagio @ 2019-12-09 6:04 ` piliu 2019-12-09 20:49 ` Kazuhito Hagio 0 siblings, 1 reply; 6+ messages in thread From: piliu @ 2019-12-09 6:04 UTC (permalink / raw) To: Kazuhito Hagio; +Cc: kexec@lists.infradead.org On 12/07/2019 12:28 AM, Kazuhito Hagio wrote: >> -----Original Message----- >> >> On 12/05/2019 06:36 AM, Kazuhito Hagio wrote: >>> Hi Pingfan, >>> >>> Thank you for the patch. >>> >>>> -----Original Message----- >>>> since the following commit, -lebl has been removed from elfutils. >>>> 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> >>>> >>>> So remove it from LIBS for makedumpfile >>> >>> It seems that this is ok with the latest elfutils, but with older ones? >>> Is it possible to remove -lebl when elfutils does not have libebl.a? >> I have no idea about it for now. The method to check version depends on >> distribution. Is it doable by checking /usr/lib64/libebl ? > > We have 'try-run' function written by Petr in the Makefile, which checks > if clock_gettime() requies -lrt. How about utilizing it like this? > > diff --git a/Makefile b/Makefile > index 1fdb6286e85d..d4d1fb563209 100644 > --- a/Makefile > +++ b/Makefile > @@ -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) > > > If libebl.a does not exist (gcc with -lebl fails), it will not append > -lebl to LIBS. > Yes, it sounds a good idea. Should I sumbit another patch or you will do by yourself? Thanks, Pingfan _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] makedumpfile/Makefile: remove -lebl from LIBS 2019-12-09 6:04 ` piliu @ 2019-12-09 20:49 ` Kazuhito Hagio 0 siblings, 0 replies; 6+ messages in thread From: Kazuhito Hagio @ 2019-12-09 20:49 UTC (permalink / raw) To: piliu; +Cc: kexec@lists.infradead.org > -----Original Message----- > > On 12/07/2019 12:28 AM, Kazuhito Hagio wrote: > >> -----Original Message----- > >> > >> On 12/05/2019 06:36 AM, Kazuhito Hagio wrote: > >>> Hi Pingfan, > >>> > >>> Thank you for the patch. > >>> > >>>> -----Original Message----- > >>>> since the following commit, -lebl has been removed from elfutils. > >>>> 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> > >>>> > >>>> So remove it from LIBS for makedumpfile > >>> > >>> It seems that this is ok with the latest elfutils, but with older ones? > >>> Is it possible to remove -lebl when elfutils does not have libebl.a? > >> I have no idea about it for now. The method to check version depends on > >> distribution. Is it doable by checking /usr/lib64/libebl ? > > > > We have 'try-run' function written by Petr in the Makefile, which checks > > if clock_gettime() requies -lrt. How about utilizing it like this? > > > > diff --git a/Makefile b/Makefile > > index 1fdb6286e85d..d4d1fb563209 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -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) > > > > > > If libebl.a does not exist (gcc with -lebl fails), it will not append > > -lebl to LIBS. > > > Yes, it sounds a good idea. > > Should I sumbit another patch or you will do by yourself? Modified and applied. https://sourceforge.net/p/makedumpfile/code/ci/71e798cb1b85e4879a19607ebb0a061cbc92f70f/ Thanks! Kazu > > Thanks, > Pingfan > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-12-09 20:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-11-29 1:09 [PATCH] makedumpfile/Makefile: remove -lebl from LIBS Pingfan Liu 2019-12-04 22:36 ` Kazuhito Hagio 2019-12-06 5:54 ` piliu 2019-12-06 16:28 ` Kazuhito Hagio 2019-12-09 6:04 ` piliu 2019-12-09 20:49 ` Kazuhito Hagio
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox