mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
tools: gpio: Correctly add make dependencies for gpio_utils
gpio tools fail to build correctly with make parallelization: $ make -s -j24 ld: gpio-utils.o: file not recognized: file truncated make[1]: *** [/home/labbott/linux_upstream/tools/build/Makefile.build:145: lsgpio-in.o] Error 1 make: *** [Makefile:43: lsgpio-in.o] Error 2 make: *** Waiting for unfinished jobs.... This is because gpio-utils.o is used across multiple targets. Fix this by making gpio-utios.o a proper dependency. Cc: <stable@vger.kernel.org> Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
f88c117b6d
commit
0161a94e2d
@ -1,3 +1,4 @@
|
||||
gpio-utils-y += gpio-utils.o
|
||||
lsgpio-y += lsgpio.o gpio-utils.o
|
||||
gpio-hammer-y += gpio-hammer.o gpio-utils.o
|
||||
gpio-event-mon-y += gpio-event-mon.o gpio-utils.o
|
||||
|
@ -35,11 +35,15 @@ $(OUTPUT)include/linux/gpio.h: ../../include/uapi/linux/gpio.h
|
||||
|
||||
prepare: $(OUTPUT)include/linux/gpio.h
|
||||
|
||||
GPIO_UTILS_IN := $(output)gpio-utils-in.o
|
||||
$(GPIO_UTILS_IN): prepare FORCE
|
||||
$(Q)$(MAKE) $(build)=gpio-utils
|
||||
|
||||
#
|
||||
# lsgpio
|
||||
#
|
||||
LSGPIO_IN := $(OUTPUT)lsgpio-in.o
|
||||
$(LSGPIO_IN): prepare FORCE
|
||||
$(LSGPIO_IN): prepare FORCE $(OUTPUT)gpio-utils-in.o
|
||||
$(Q)$(MAKE) $(build)=lsgpio
|
||||
$(OUTPUT)lsgpio: $(LSGPIO_IN)
|
||||
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
@ -48,7 +52,7 @@ $(OUTPUT)lsgpio: $(LSGPIO_IN)
|
||||
# gpio-hammer
|
||||
#
|
||||
GPIO_HAMMER_IN := $(OUTPUT)gpio-hammer-in.o
|
||||
$(GPIO_HAMMER_IN): prepare FORCE
|
||||
$(GPIO_HAMMER_IN): prepare FORCE $(OUTPUT)gpio-utils-in.o
|
||||
$(Q)$(MAKE) $(build)=gpio-hammer
|
||||
$(OUTPUT)gpio-hammer: $(GPIO_HAMMER_IN)
|
||||
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
@ -57,7 +61,7 @@ $(OUTPUT)gpio-hammer: $(GPIO_HAMMER_IN)
|
||||
# gpio-event-mon
|
||||
#
|
||||
GPIO_EVENT_MON_IN := $(OUTPUT)gpio-event-mon-in.o
|
||||
$(GPIO_EVENT_MON_IN): prepare FORCE
|
||||
$(GPIO_EVENT_MON_IN): prepare FORCE $(OUTPUT)gpio-utils-in.o
|
||||
$(Q)$(MAKE) $(build)=gpio-event-mon
|
||||
$(OUTPUT)gpio-event-mon: $(GPIO_EVENT_MON_IN)
|
||||
$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
|
Loading…
Reference in New Issue
Block a user