* [RFC PATCH] powerpc: crypto/vmx: clean up generated files
@ 2016-11-15 17:05 Naveen N. Rao
2016-11-16 10:02 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Naveen N. Rao @ 2016-11-15 17:05 UTC (permalink / raw)
To: Leonidas S. Barbosa, Herbert Xu
Cc: Paulo Flabiano Smorigo, linux-crypto, linuxppc-dev, Michael Ellerman
..as stray .S files result in build errors, especially when using
cross-compilers.
More specifically, the generated .S files are endian-specific and will break
subsequent builds targeting the other endian architecture.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
drivers/crypto/vmx/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
index de6e241..31b25cb 100644
--- a/drivers/crypto/vmx/Makefile
+++ b/drivers/crypto/vmx/Makefile
@@ -16,4 +16,4 @@ $(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
$(call cmd,perl)
-.PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
+clean-files := aesp8-ppc.S ghashp8-ppc.S
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC PATCH] powerpc: crypto/vmx: clean up generated files
2016-11-15 17:05 [RFC PATCH] powerpc: crypto/vmx: clean up generated files Naveen N. Rao
@ 2016-11-16 10:02 ` Michael Ellerman
2016-11-16 11:27 ` Naveen N. Rao
0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2016-11-16 10:02 UTC (permalink / raw)
To: Naveen N. Rao, Leonidas S. Barbosa, Herbert Xu
Cc: Paulo Flabiano Smorigo, linux-crypto, linuxppc-dev
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
> ..as stray .S files result in build errors, especially when using
> cross-compilers.
They should be cleaned on make clean, so adding them to clean-files
seems correct.
> More specifically, the generated .S files are endian-specific and will break
> subsequent builds targeting the other endian architecture.
But that indicates we're missing an if_changed somewhere, ie. switching
endian should cause them to be regenerated.
Also they should be generated into $(obj) not $(src) I think.
How about this?
diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
index de6e241..52f6ae9 100644
--- a/drivers/crypto/vmx/Makefile
+++ b/drivers/crypto/vmx/Makefile
@@ -10,10 +10,10 @@ endif
quiet_cmd_perl = PERL $@
cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
-$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
- $(call cmd,perl)
+$(obj)/aesp8-ppc.S: $(src)/aesp8-ppc.pl FORCE
+ $(call if_changed,perl)
-$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
- $(call cmd,perl)
+$(obj)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl FORCE
+ $(call if_changed,perl)
.PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
cheers
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC PATCH] powerpc: crypto/vmx: clean up generated files
2016-11-16 10:02 ` Michael Ellerman
@ 2016-11-16 11:27 ` Naveen N. Rao
0 siblings, 0 replies; 4+ messages in thread
From: Naveen N. Rao @ 2016-11-16 11:27 UTC (permalink / raw)
To: Michael Ellerman
Cc: Leonidas S. Barbosa, linuxppc-dev, Herbert Xu,
Paulo Flabiano Smorigo, linux-crypto
On 2016/11/16 09:02PM, Michael Ellerman wrote:
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>
> > ..as stray .S files result in build errors, especially when using
> > cross-compilers.
>
> They should be cleaned on make clean, so adding them to clean-files
> seems correct.
>
> > More specifically, the generated .S files are endian-specific and will break
> > subsequent builds targeting the other endian architecture.
>
> But that indicates we're missing an if_changed somewhere, ie. switching
> endian should cause them to be regenerated.
>
> Also they should be generated into $(obj) not $(src) I think.
>
> How about this?
Nice!
>
> diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
> index de6e241..52f6ae9 100644
> --- a/drivers/crypto/vmx/Makefile
> +++ b/drivers/crypto/vmx/Makefile
> @@ -10,10 +10,10 @@ endif
> quiet_cmd_perl = PERL $@
> cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
>
Looks like we also need:
targets += aesp8-ppc.S ghashp8-ppc.S
> -$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
> - $(call cmd,perl)
> +$(obj)/aesp8-ppc.S: $(src)/aesp8-ppc.pl FORCE
> + $(call if_changed,perl)
>
> -$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
> - $(call cmd,perl)
> +$(obj)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl FORCE
> + $(call if_changed,perl)
>
> .PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
I will send a v2 with these changes.
Thanks,
Naveen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC PATCH] powerpc: crypto/vmx: clean up generated files
@ 2016-11-16 11:27 ` Naveen N. Rao
0 siblings, 0 replies; 4+ messages in thread
From: Naveen N. Rao @ 2016-11-16 11:27 UTC (permalink / raw)
To: Michael Ellerman
Cc: Leonidas S. Barbosa, Herbert Xu, linuxppc-dev, linux-crypto,
Paulo Flabiano Smorigo
On 2016/11/16 09:02PM, Michael Ellerman wrote:
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>
> > ..as stray .S files result in build errors, especially when using
> > cross-compilers.
>
> They should be cleaned on make clean, so adding them to clean-files
> seems correct.
>
> > More specifically, the generated .S files are endian-specific and will break
> > subsequent builds targeting the other endian architecture.
>
> But that indicates we're missing an if_changed somewhere, ie. switching
> endian should cause them to be regenerated.
>
> Also they should be generated into $(obj) not $(src) I think.
>
> How about this?
Nice!
>
> diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
> index de6e241..52f6ae9 100644
> --- a/drivers/crypto/vmx/Makefile
> +++ b/drivers/crypto/vmx/Makefile
> @@ -10,10 +10,10 @@ endif
> quiet_cmd_perl = PERL $@
> cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
>
Looks like we also need:
targets += aesp8-ppc.S ghashp8-ppc.S
> -$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
> - $(call cmd,perl)
> +$(obj)/aesp8-ppc.S: $(src)/aesp8-ppc.pl FORCE
> + $(call if_changed,perl)
>
> -$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
> - $(call cmd,perl)
> +$(obj)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl FORCE
> + $(call if_changed,perl)
>
> .PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
I will send a v2 with these changes.
Thanks,
Naveen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-16 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 17:05 [RFC PATCH] powerpc: crypto/vmx: clean up generated files Naveen N. Rao
2016-11-16 10:02 ` Michael Ellerman
2016-11-16 11:27 ` Naveen N. Rao
2016-11-16 11:27 ` Naveen N. Rao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.