linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64/crypto: fix makefile rule for aes-glue-%.o
Date: Mon, 28 Jul 2014 19:00:17 +0200	[thread overview]
Message-ID: <CAKv+Gu_1FXj8fOckrFbxEz7figdKmcvN+gnpvBC8g8QArpO+3Q@mail.gmail.com> (raw)
In-Reply-To: <20140727184010.GA26029@ravnborg.org>

On 27 July 2014 20:40, Sam Ravnborg <sam@ravnborg.org> wrote:
>>
>> > Btw. the current solution is already faulty - even with the fix.
>> > There are no support for make C=2 arch/.../crypto/
>> >
>>
>> So can you elaborate on how it is faulty?
>
> When you run "make C=2 arch/.../crypto/" then sparse shall be run
> for all .c files also if they are already built.
> But due to the re-implementation of some parts of the kbuild logic
> in the makefile this does not happen with the -glue file.
>
> A minor detail - but this may not be the only wreckage we see over time.
>

I agree. Any suggestions for a generic way to solve this? Perhaps
something like this in scripts/Makefile.build

template_rule = $(obj)/$(tmpl)%.c: $(src)/$(tmpl).c ; @cp $$(^) $$(@)
$(eval $(foreach tmpl,$(TEMPLATES),$(template_rule)))

so that arch/arm64/crypto/Makefile only has to define

TEMPLATES += aes-glue

so that all dependencies on aes-glueXXX.c are satisfied by aes-glue.c?

BTW, while looking into this issue, I noticed something else that is strange:
after touch'ing sha1-ce-glue.c in arch/arm64/crypto and re-executing
'make V=2', this is what I get

make[1]: Entering directory `/home/ard/linux-arm64-build'
  CHK     include/config/kernel.release
  Using /home/ard/linux-2.6 as source for kernel
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    /home/ard/linux-2.6/scripts/checksyscalls.sh - due to target missing
  CHK     include/generated/compile.h
  CC      arch/arm64/crypto/sha1-ce-glue.o - due to:
/home/ard/linux-2.6/arch/arm64/crypto/sha1-ce-glue.c
  LD      arch/arm64/crypto/sha1-ce.o - due to: arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/sha2-ce.o - due to: arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/ghash-ce.o - due to:
arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/aes-ce-ccm.o - due to:
arch/arm64/crypto/sha1-ce-glue.o
  LD      arch/arm64/crypto/built-in.o - due to:
arch/arm64/crypto/sha1-ce.o arch/arm64/crypto/sha2-ce.o
arch/arm64/crypto/ghash-ce.o arch/arm64/crypto/aes-ce-ccm.o
  CHK     kernel/config_data.h
  LINK    vmlinux - due to: arch/arm64/crypto/built-in.o

IOW, unrelated object files are detected as being out of date. (This
is after running make mrproper, and with the aes-glue-% related rules
and definitions commented out, just to make sure this is not related
to the issue you have identified)

Any ideas?

-- 
Ard.

  reply	other threads:[~2014-07-28 17:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 13:14 [PATCH] arm64/crypto: fix makefile rule for aes-glue-%.o Andreas Schwab
2014-06-30 13:38 ` Ard Biesheuvel
2014-06-30 13:56   ` Andreas Schwab
2014-06-30 14:08     ` Ard Biesheuvel
2014-07-24 12:29       ` Andreas Schwab
2014-07-24 12:35         ` Ard Biesheuvel
2014-07-24 12:53           ` Ard Biesheuvel
2014-07-24 13:26             ` Andreas Schwab
2014-07-24 13:29               ` Ard Biesheuvel
2014-07-24 13:40                 ` Andreas Schwab
2014-07-24 14:18                   ` Ard Biesheuvel
2014-07-24 14:24                     ` Ard Biesheuvel
2014-07-24 16:12                       ` Sam Ravnborg
2014-07-24 19:25                         ` Ard Biesheuvel
2014-07-24 20:45                           ` Sam Ravnborg
2014-07-25  6:28                             ` Ard Biesheuvel
2014-07-27 18:40                               ` Sam Ravnborg
2014-07-28 17:00                                 ` Ard Biesheuvel [this message]
2014-07-28 19:06                                   ` Sam Ravnborg
2014-07-24 16:03 Ard Biesheuvel
2014-07-24 16:47 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu_1FXj8fOckrFbxEz7figdKmcvN+gnpvBC8g8QArpO+3Q@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).