[Buildroot] [PATCH 1/1] package/umtprd: fix make shuffle build

James Hilliard james.hilliard1 at gmail.com
Tue Oct 18 15:01:19 UTC 2022


Backport a patch fixing a makefile dependency issue that
breaks when using make 4.4's shuffle mode.

Fixes:
 - http://autobuild.buildroot.net/results/c7ce975d398190fc191ccc03813f8ec0b3464c7d

Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
---
 .../0001-Fix-output_dir-make-dependency.patch | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 package/umtprd/0001-Fix-output_dir-make-dependency.patch

diff --git a/package/umtprd/0001-Fix-output_dir-make-dependency.patch b/package/umtprd/0001-Fix-output_dir-make-dependency.patch
new file mode 100644
index 0000000000..2d4d6980f4
--- /dev/null
+++ b/package/umtprd/0001-Fix-output_dir-make-dependency.patch
@@ -0,0 +1,47 @@
+From d84216a678edaca81c0899318231cdcca2100d38 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1 at gmail.com>
+Date: Mon, 17 Oct 2022 16:39:56 -0600
+Subject: [PATCH] Fix output_dir make dependency
+
+Object file targets need to depend on the output_dir target.
+
+Fixes:
+make --shuffle=reverse -j1
+cc -o obj/mtp_op_truncateobject.o src/mtp_operations/mtp_op_truncateobject.c -c  -I./inc -lpthread -Wall -O3
+Assembler messages:
+Fatal error: can't create obj/mtp_op_truncateobject.o: No such file or directory
+make: *** [Makefile:19: obj/mtp_op_truncateobject.o] Error 1 shuffle=reverse
+
+Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
+[james.hilliard1 at gmail.com: backport from upstream commit
+d84216a678edaca81c0899318231cdcca2100d38]
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7c98b63..c28e186 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,15 +7,15 @@ objects := $(sources:src/%.c=obj/%.o)
+ ops_sources := $(wildcard src/mtp_operations/*.c)
+ ops_objects := $(ops_sources:src/mtp_operations/%.c=obj/%.o)
+ 
+-all: output_dir umtprd
++all: umtprd
+ 
+ umtprd: $(objects) $(ops_objects)
+ 	${CC} -o $@    $^ $(LDFLAGS) -lpthread
+ 
+-$(objects): obj/%.o: src/%.c
++$(objects): obj/%.o: src/%.c | output_dir
+ 	${CC} -o $@ $^ -c $(CPPFLAGS) $(CFLAGS)
+ 
+-$(ops_objects): obj/%.o: src/mtp_operations/%.c
++$(ops_objects): obj/%.o: src/mtp_operations/%.c | output_dir
+ 	${CC} -o $@ $^ -c $(CPPFLAGS) $(CFLAGS)
+ 
+ output_dir:
+-- 
+2.34.1
+
-- 
2.34.1




More information about the buildroot mailing list