Skip to contentSkip to conversation

makedumpfile/Makefile: remove -lebl from LIBS

PATCH In review Pingfan Liu 2 participants 6 messages Nov 29, 2019 – Dec 9, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 makedumpfile/Makefile: remove -lebl from LIBS

since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
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.

So remove it from LIBS for makedumpfile

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 1fdb628..df21b93 100644
@@ -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
Signature · 7 lines
2.7.5


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Hi Pingfan,

Thank you for the patch.

Quoted 8 lines

-----Original Message-----
since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
Date:   Thu Aug 29 23:34:11 2019 +0200

libebl: Don't install libebl.a, libebl.h and remove backends from spec.

Quoted 7 lines

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.

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

Quoted 21 lines
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 1fdb628..df21b93 100644
@@ -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))

Makefile +1 -2
-LIBS = -ldw -lbz2 -lebl -ldl -lelf -lz
+LIBS = -ldw -lbz2 -ldl -lelf -lz
 ifneq ($(LINKTYPE), dynamic)
 LIBS := -static $(LIBS)
 endif
--
Quoted 2 lines

2.7.5

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#2 lore raw
Quoted 16 lines · Kazuhito Hagio

Hi Pingfan,

Thank you for the patch.

Quoted 12 lines

-----Original Message-----
since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
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.

Quoted 6 lines
Quoted 3 lines

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

Quoted 19 lines

Thanks,
Kazu

Quoted 15 lines
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 1fdb628..df21b93 100644
@@ -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))

Quoted 16 lines
Quoted 8 lines
Makefile +1 -2
-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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw
Quoted 19 lines

-----Original Message-----

Quoted 16 lines · Kazuhito Hagio

Hi Pingfan,

Thank you for the patch.

Quoted 12 lines

-----Original Message-----
since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
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.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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?

Makefile +6 -1
index 1fdb6286e85d..d4d1fb563209 100644
@@ -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

Quoted 39 lines

Thanks,
Pingfan

Quoted 35 lines

Thanks,
Kazu

Quoted 21 lines
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index 1fdb628..df21b93 100644
@@ -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))

Makefile +1 -2
-LIBS = -ldw -lbz2 -lebl -ldl -lelf -lz
+LIBS = -ldw -lbz2 -ldl -lelf -lz
 ifneq ($(LINKTYPE), dynamic)
 LIBS := -static $(LIBS)
 endif
--
Quoted 2 lines

2.7.5

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

author
#4 lore raw
Quoted 58 lines · Kazuhito Hagio
Quoted 19 lines

-----Original Message-----

Quoted 16 lines · Kazuhito Hagio

Hi Pingfan,

Thank you for the patch.

Quoted 12 lines

-----Original Message-----
since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
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.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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?

Makefile +6 -1
index 1fdb6286e85d..d4d1fb563209 100644
@@ -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)
Quoted 3 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#5 lore raw
Quoted 62 lines

-----Original Message-----

Quoted 36 lines · Kazuhito Hagio
Quoted 19 lines

-----Original Message-----

Quoted 16 lines · Kazuhito Hagio

Hi Pingfan,

Thank you for the patch.

Quoted 12 lines

-----Original Message-----
since the following commit, -lebl has been removed from elfutils. commit b833c731359af12af9f16bcb621b3cdc170eafbc

Author: Mark Wielaard <[email protected]>
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.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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?

Makefile +0 -0
index 1fdb6286e85d..d4d1fb563209 100644

Makefile OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART)) · line 50

Quoted 1 line
Makefile +0 -0
@@ -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

Quoted 21 lines
Makefile +6 -1
 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)
Quoted 6 lines
Quoted 3 lines

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

Quoted 4 lines

Thanks,
Pingfan

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec