aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch')
-rw-r--r--meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch78
1 files changed, 41 insertions, 37 deletions
diff --git a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
index ff093a72b3..15ced551db 100644
--- a/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
+++ b/meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-makedumpfile-replace-hardcode-CFLAGS.patch
@@ -1,6 +1,6 @@
-From af97e2ad643334b4c7c3d66f971ce9ebb2b596af Mon Sep 17 00:00:00 2001
+From 71b5a3905d5cd0feca88a0d61d7657ba5296a052 Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
-Date: Thu, 21 Jul 2016 18:06:21 +0800
+Date: Sun, 24 Apr 2022 17:25:33 +0800
Subject: [PATCH] makedumpfile: replace hardcode CFLAGS
* Create alias for target such as powerpc as powerpc32
@@ -10,15 +10,19 @@ Subject: [PATCH] makedumpfile: replace hardcode CFLAGS
* Forcibly to link dynamic library as the poky build
system doesn't build static library by default
-Upstream-Status: Inappropriate[oe specific]
+Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+[2021-11-18] Patch updated to use CFLAGS_COMMON for zstd
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+
+Rebase to 1.7.1
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
- Makefile | 45 +++++++++++++++++++++++----------------------
- 1 file changed, 23 insertions(+), 22 deletions(-)
+ Makefile | 42 ++++++++++++++++++++++--------------------
+ 1 file changed, 22 insertions(+), 20 deletions(-)
-diff --git a/Makefile b/Makefile
-index 1fdb628..5dce589 100644
--- a/Makefile
+++ b/Makefile
@@ -8,12 +8,6 @@ ifeq ($(strip $CC),)
@@ -34,19 +38,13 @@ index 1fdb628..5dce589 100644
HOST_ARCH := $(shell uname -m)
# Use TARGET as the target architecture if specified.
# Defaults to uname -m
-@@ -21,29 +15,36 @@ ifeq ($(strip($TARGET)),)
- TARGET := $(HOST_ARCH)
- endif
-
--ARCH := $(shell echo ${TARGET} | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
-- -e s/arm.*/arm/ -e s/sa110/arm/ \
-- -e s/s390x/s390/ -e s/parisc64/parisc/ \
+@@ -24,26 +18,34 @@ endif
+ ARCH := $(shell echo ${TARGET} | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ \
- -e s/ppc64/powerpc64/ -e s/ppc/powerpc32/)
-+ARCH := $(shell echo __${TARGET}__ | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
-+ -e s/arm.*/arm/ -e s/sa110/arm/ \
-+ -e s/s390x/s390/ -e s/parisc64/parisc/ \
-+ -e s/ppc64/powerpc64/ -e s/ppc/powerpc32/ \
-+ -e s/_powerpc_/_powerpc32_/)
++ -e s/ppc64/powerpc64/ -e s/ppc/powerpc32/ \
++ -e s/_powerpc_/_powerpc32_/)
CROSS :=
ifneq ($(TARGET), $(HOST_ARCH))
@@ -54,8 +52,7 @@ index 1fdb628..5dce589 100644
endif
-CFLAGS += -D__$(ARCH)__ $(CROSS)
--CFLAGS_ARCH += -D__$(ARCH)__ $(CROSS)
-+CFLAGS_ARCH += -D$(ARCH) $(CROSS)
+ CFLAGS_ARCH += -D__$(ARCH)__ $(CROSS)
-ifeq ($(ARCH), powerpc64)
-CFLAGS += -m64
@@ -78,15 +75,16 @@ index 1fdb628..5dce589 100644
+ -DVERSION='"$(VERSION)"' \
+ -DRELEASE_DATE='"$(DATE)"'
+
++
SRC_BASE = makedumpfile.c makedumpfile.h diskdump_mod.h sadump_mod.h sadump_info.h
- SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c
+ SRC_PART = print_info.c dwarf_info.c elf_info.c erase_info.c sadump_info.c cache.c tools.c printk.c detect_cycle.c
OBJ_PART=$(patsubst %.c,%.o,$(SRC_PART))
-@@ -52,17 +53,17 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH))
+@@ -52,12 +54,12 @@ OBJ_ARCH=$(patsubst %.c,%.o,$(SRC_ARCH))
LIBS = -ldw -lbz2 -ldl -lelf -lz
ifneq ($(LINKTYPE), dynamic)
--LIBS := -static $(LIBS)
-+LIBS := $(LIBS)
+-LIBS := -static $(LIBS) -llzma
++LIBS := $(LIBS) -llzma
endif
ifeq ($(USELZO), on)
@@ -96,13 +94,22 @@ index 1fdb628..5dce589 100644
endif
ifeq ($(USESNAPPY), on)
- LIBS := -lsnappy $(LIBS)
+@@ -65,12 +67,12 @@ LIBS := -lsnappy $(LIBS)
+ ifneq ($(LINKTYPE), dynamic)
+ LIBS := $(LIBS) -lstdc++
+ endif
-CFLAGS += -DUSESNAPPY
+CFLAGS_COMMON += -DUSESNAPPY
endif
- LIBS := -lpthread $(LIBS)
-@@ -87,14 +88,14 @@ LIBS := $(LIBS) $(call try-run,\
+ ifeq ($(USEZSTD), on)
+ LIBS := -lzstd $(LIBS)
+-CFLAGS += -DUSEZSTD
++CFLAGS_COMMON += -DUSEZSTD
+ endif
+
+ ifeq ($(DEBUG), on)
+@@ -104,14 +106,14 @@ LIBS := $(LIBS) $(call try-run,\
all: makedumpfile
$(OBJ_PART): $(SRC_PART)
@@ -116,18 +123,15 @@ index 1fdb628..5dce589 100644
makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ_PART) $(OBJ_ARCH) -rdynamic -o $@ $< $(LIBS)
+ $(CC) $(CFLAGS_COMMON) $(LDFLAGS) $(OBJ_PART) $(OBJ_ARCH) -rdynamic -o $@ $< $(LIBS)
- echo .TH MAKEDUMPFILE 8 \"$(DATE)\" \"makedumpfile v$(VERSION)\" \"Linux System Administrator\'s Manual\" > temp.8
- grep -v "^.TH MAKEDUMPFILE 8" $(VPATH)makedumpfile.8 >> temp.8
- mv temp.8 makedumpfile.8
-@@ -105,7 +106,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(OBJ_ARCH)
- gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
+ @sed -e "s/@DATE@/$(DATE)/" \
+ -e "s/@VERSION@/$(VERSION)/" \
+ $(VPATH)makedumpfile.8.in > $(VPATH)makedumpfile.8
+@@ -120,7 +122,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
+ $(VPATH)makedumpfile.conf.5.in > $(VPATH)makedumpfile.conf.5
eppic_makedumpfile.so: extension_eppic.c
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
+ $(CC) $(CFLAGS_COMMON) $(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
---
-2.21.0
-
+ rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8 makedumpfile.conf.5