lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMpxmJX_haxjkY+vmm+ajC6hi-aa6k6m0o+d=RmTz5xjPXuo-g@mail.gmail.com>
Date:   Wed, 13 Nov 2019 13:47:19 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Laura Abbott <labbott@...hat.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tools: gpio: Correctly add make dependencies for gpio_utils

wt., 12 lis 2019 o 23:10 Laura Abbott <labbott@...hat.com> napisaƂ(a):
>
>
> 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.
>
> Signed-off-by: Laura Abbott <labbott@...hat.com>
> ---
> I made a similar fix to iio tools
> lore.kernel.org/r/20191018172908.3761-1-labbott@...hat.com
> ---
>  tools/gpio/Build    |  1 +
>  tools/gpio/Makefile | 10 +++++++---
>  2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/tools/gpio/Build b/tools/gpio/Build
> index 620c1937d957..4141f35837db 100644
> --- a/tools/gpio/Build
> +++ b/tools/gpio/Build
> @@ -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
> diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
> index 1178d302757e..6080de58861f 100644
> --- a/tools/gpio/Makefile
> +++ b/tools/gpio/Makefile
> @@ -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 $@
> --
> 2.21.0
>

Applied for fixes, thanks!

Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ