2023-05-08 07:00:14 +00:00
|
|
|
From 6be4f19f32bfa6d5a52580b733afca8a5b849c23 Mon Sep 17 00:00:00 2001
|
2022-11-19 04:10:25 +00:00
|
|
|
From: Kazuhito Hagio <k-hagio-ab@nec.com>
|
|
|
|
Date: Mon, 22 Aug 2022 11:59:46 +0900
|
2023-05-08 07:00:14 +00:00
|
|
|
Subject: [PATCH 31/89] Makefile: Fix unnecessary re-patching with
|
2022-11-19 04:10:25 +00:00
|
|
|
coreutils-9.0
|
|
|
|
|
|
|
|
"sum" command in coreutils-9.0 (e.g. Fedora 36) started to output a file
|
|
|
|
name. As a result, "make" always detects a change of gdb-10.2.patch
|
|
|
|
wrongly and re-applies it unnecessarily.
|
|
|
|
|
|
|
|
Use standard input to fix it and "md5sum" to improve detection.
|
|
|
|
|
|
|
|
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
|
|
|
|
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
|
|
|
---
|
|
|
|
Makefile | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/Makefile b/Makefile
|
2023-05-08 07:00:14 +00:00
|
|
|
index c031db4ca23f..2549d1d39273 100644
|
2022-11-19 04:10:25 +00:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -269,7 +269,7 @@ rebuild:
|
|
|
|
@if [ ! -f ${GDB}/${GDB}.patch ]; then \
|
|
|
|
touch ${GDB}/${GDB}.patch; fi
|
|
|
|
@if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ] && \
|
|
|
|
- [ "`sum ${GDB}.patch`" != "`sum ${GDB}/${GDB}.patch`" ]; then \
|
|
|
|
+ [ "`md5sum < ${GDB}.patch`" != "`md5sum < ${GDB}/${GDB}.patch`" ]; then \
|
|
|
|
(sh -x ${GDB}.patch ${TARGET}; patch -N -p0 -r- --fuzz=0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; cd ${GDB}; \
|
|
|
|
$(MAKE) CRASH_TARGET=${TARGET}) \
|
|
|
|
else (cd ${GDB}/gdb; $(MAKE) CRASH_TARGET=${TARGET}); fi
|
|
|
|
--
|
|
|
|
2.37.1
|
|
|
|
|