Backport from the following commit from upstream makedumpfile:
commit 45fc42c Author: WANG Chao chaowang@redhat.com Date: Tue Jun 10 14:11:27 2014 +0900
[PATCH] Fix Makefile for eppic_makedumpfile.so build.
When libeppic isn't installed on a standard location, building eppic_makedumpfile.so with -leppic directly doesn't work.
Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir -Idir" to tell where to search for libeppic library and its header files.
For example, if eppic source is installed on the same directory level with makedumpfile as the following:
makedumpfile |--- arch +--- eeppic_scripts eppic |--- applications +--- libeppic
After compiling libeppic, one can use the following command to build eppic_makedumpfile.so:
make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
Signed-off-by: WANG Chao chaowang@redhat.com
With this patch, we don't need use a fedora-specific patch for building eppic_makedumpfile.so.
Signed-off-by: WANG Chao chaowang@redhat.com --- ....3-build-makedumpfile-eppic-shared-object.patch | 20 --------- ...-Makefile-for-eppic_makedumpfile.so-build.patch | 48 ++++++++++++++++++++++ kexec-tools.spec | 5 ++- 3 files changed, 51 insertions(+), 22 deletions(-) delete mode 100644 kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch create mode 100644 kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch
diff --git a/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch b/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch deleted file mode 100644 index 775511a..0000000 --- a/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- kexec-tools-2.0.6/makedumpfile-1.5.6/Makefile.orig -+++ kexec-tools-2.0.6/makedumpfile-1.5.6/Makefile -@@ -66,7 +66,7 @@ - CFLAGS += -DUSESNAPPY - endif - --all: makedumpfile -+all: makedumpfile eppic_makedumpfile.so - - $(OBJ_PART): $(SRC_PART) - $(CC) $(CFLAGS) -c -o ./$@ $(VPATH)$(@:.o=.c) -@@ -87,7 +87,7 @@ - gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz - - eppic_makedumpfile.so: extension_eppic.c -- $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo -+ $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -I../eppic/libeppic -fPIC ../eppic/libeppic/libeppic.a -ltinfo - - clean: - rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz diff --git a/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch b/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch new file mode 100644 index 0000000..5960331 --- /dev/null +++ b/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch @@ -0,0 +1,48 @@ +From 45fc42c5c980e2d5b755ed24a6983f44798d958e Mon Sep 17 00:00:00 2001 +From: WANG Chao chaowang@redhat.com +Date: Tue, 10 Jun 2014 14:11:27 +0900 +Subject: [PATCH] [PATCH] Fix Makefile for eppic_makedumpfile.so build. + +When libeppic isn't installed on a standard location, building +eppic_makedumpfile.so with -leppic directly doesn't work. + +Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir +-Idir" to tell where to search for libeppic library and its header +files. + +For example, if eppic source is installed on the same directory level +with makedumpfile as the following: + +makedumpfile + |--- arch + +--- eeppic_scripts +eppic + |--- applications + +--- libeppic + +After compiling libeppic, one can use the following command to build +eppic_makedumpfile.so: + +make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so + +Signed-off-by: WANG Chao chaowang@redhat.com +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d87638b..0cc07ef 100644 +--- a/Makefile ++++ b/Makefile +@@ -87,7 +87,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH) + gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz + + eppic_makedumpfile.so: extension_eppic.c +- $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo + + clean: + rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz +-- +1.9.3 + diff --git a/kexec-tools.spec b/kexec-tools.spec index c2434b9..9230ccf 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -75,7 +75,7 @@ ExcludeArch: aarch64 # Patches 601 onward are generic patches # Patch601: kexec-tools-2.0.3-disable-kexec-test.patch -Patch604: kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch +Patch602: kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -112,7 +112,7 @@ tar -z -x -v -f %{SOURCE23}
%patch601 -p1 -%patch604 -p1 +%patch602 -p1
tar -z -x -v -f %{SOURCE13}
@@ -137,6 +137,7 @@ make %ifarch %{ix86} x86_64 ppc64 s390x make -C eppic/libeppic make -C makedumpfile-1.5.6 LINKTYPE=dynamic USELZO=on USESNAPPY=on +make -C makedumpfile-1.5.6 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so %endif make -C kexec-tools-po make -C kdump-anaconda-addon/po
On Wed, Jun 11, 2014 at 06:07:17PM +0800, WANG Chao wrote:
Backport from the following commit from upstream makedumpfile:
commit 45fc42c Author: WANG Chao chaowang@redhat.com Date: Tue Jun 10 14:11:27 2014 +0900
[PATCH] Fix Makefile for eppic_makedumpfile.so build. When libeppic isn't installed on a standard location, building eppic_makedumpfile.so with -leppic directly doesn't work. Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir -Idir" to tell where to search for libeppic library and its header files. For example, if eppic source is installed on the same directory level with makedumpfile as the following: makedumpfile |--- arch +--- eeppic_scripts eppic |--- applications +--- libeppic After compiling libeppic, one can use the following command to build eppic_makedumpfile.so: make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so Signed-off-by: WANG Chao <chaowang@redhat.com>
With this patch, we don't need use a fedora-specific patch for building eppic_makedumpfile.so.
Signed-off-by: WANG Chao chaowang@redhat.com
Acked-by: Vivek Goyal vgoyal@redhat.com
Vivek
....3-build-makedumpfile-eppic-shared-object.patch | 20 --------- ...-Makefile-for-eppic_makedumpfile.so-build.patch | 48 ++++++++++++++++++++++ kexec-tools.spec | 5 ++- 3 files changed, 51 insertions(+), 22 deletions(-) delete mode 100644 kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch create mode 100644 kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch
diff --git a/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch b/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch deleted file mode 100644 index 775511a..0000000 --- a/kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- kexec-tools-2.0.6/makedumpfile-1.5.6/Makefile.orig -+++ kexec-tools-2.0.6/makedumpfile-1.5.6/Makefile -@@ -66,7 +66,7 @@
- CFLAGS += -DUSESNAPPY
- endif
--all: makedumpfile -+all: makedumpfile eppic_makedumpfile.so
- $(OBJ_PART): $(SRC_PART)
- $(CC) $(CFLAGS) -c -o ./$@ $(VPATH)$(@:.o=.c)
-@@ -87,7 +87,7 @@
- gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
- eppic_makedumpfile.so: extension_eppic.c
-- $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo -+ $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -I../eppic/libeppic -fPIC ../eppic/libeppic/libeppic.a -ltinfo
- clean:
- rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
diff --git a/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch b/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch new file mode 100644 index 0000000..5960331 --- /dev/null +++ b/kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch @@ -0,0 +1,48 @@ +From 45fc42c5c980e2d5b755ed24a6983f44798d958e Mon Sep 17 00:00:00 2001 +From: WANG Chao chaowang@redhat.com +Date: Tue, 10 Jun 2014 14:11:27 +0900 +Subject: [PATCH] [PATCH] Fix Makefile for eppic_makedumpfile.so build.
+When libeppic isn't installed on a standard location, building +eppic_makedumpfile.so with -leppic directly doesn't work.
+Add LDFLAGS to build arguments, so that one can pass LDFLAGS="-Ldir +-Idir" to tell where to search for libeppic library and its header +files.
+For example, if eppic source is installed on the same directory level +with makedumpfile as the following:
+makedumpfile
- |--- arch
- +--- eeppic_scripts
+eppic
- |--- applications
- +--- libeppic
+After compiling libeppic, one can use the following command to build +eppic_makedumpfile.so:
+make LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
+Signed-off-by: WANG Chao chaowang@redhat.com +---
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+diff --git a/Makefile b/Makefile +index d87638b..0cc07ef 100644 +--- a/Makefile ++++ b/Makefile +@@ -87,7 +87,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH)
- gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
- eppic_makedumpfile.so: extension_eppic.c
+- $(CC) $(CFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
- clean:
- rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
+-- +1.9.3
diff --git a/kexec-tools.spec b/kexec-tools.spec index c2434b9..9230ccf 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -75,7 +75,7 @@ ExcludeArch: aarch64 # Patches 601 onward are generic patches # Patch601: kexec-tools-2.0.3-disable-kexec-test.patch -Patch604: kexec-tools-2.0.3-build-makedumpfile-eppic-shared-object.patch +Patch602: kexec-tools-2.0.4-makedumpfile-Fix-Makefile-for-eppic_makedumpfile.so-build.patch
%description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -112,7 +112,7 @@ tar -z -x -v -f %{SOURCE23}
%patch601 -p1 -%patch604 -p1 +%patch602 -p1
tar -z -x -v -f %{SOURCE13}
@@ -137,6 +137,7 @@ make %ifarch %{ix86} x86_64 ppc64 s390x make -C eppic/libeppic make -C makedumpfile-1.5.6 LINKTYPE=dynamic USELZO=on USESNAPPY=on +make -C makedumpfile-1.5.6 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so %endif make -C kexec-tools-po make -C kdump-anaconda-addon/po -- 1.9.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec