All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/Makefile: remove all temporary files for every architecture
@ 2017-03-23  1:31 Luca Miccio
  2017-03-23 11:07 ` Wei Liu
  2017-03-24 11:49 ` Wei Liu
  0 siblings, 2 replies; 6+ messages in thread
From: Luca Miccio @ 2017-03-23  1:31 UTC (permalink / raw)
  To: xen-devel
  Cc: sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
	ian.jackson, tim, jbeulich, Luca Miccio, xen-devel

Execute the clean target for both arm and x86 architecture.

When trying to build Xen for a different architecture in the same
tree, the command make clean will only remove temporary files for
the host architecture.
This will lead a compilation error when trying to build ARM64 and
ARM32 Xen in the same tree.
(See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)

Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
---
 xen/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index dc6862e04d..fcd5c7e9d6 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -115,7 +115,8 @@ _clean: delete-unfresh-files
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
-	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
+	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean
+	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C test clean
 	$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean
 	find . \( -name "*.o" -o -name ".*.d" -o -name "*.gcno" \) -exec rm -f {} \;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/Makefile: remove all temporary files for every architecture
  2017-03-23  1:31 [PATCH] xen/Makefile: remove all temporary files for every architecture Luca Miccio
@ 2017-03-23 11:07 ` Wei Liu
  2017-03-23 11:20   ` Wei Liu
  2017-03-24 11:49 ` Wei Liu
  1 sibling, 1 reply; 6+ messages in thread
From: Wei Liu @ 2017-03-23 11:07 UTC (permalink / raw)
  To: Luca Miccio
  Cc: sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
	ian.jackson, tim, jbeulich, xen-devel, xen-devel

On Thu, Mar 23, 2017 at 02:31:37AM +0100, Luca Miccio wrote:
> Execute the clean target for both arm and x86 architecture.
> 
> When trying to build Xen for a different architecture in the same
> tree, the command make clean will only remove temporary files for
> the host architecture.
> This will lead a compilation error when trying to build ARM64 and
> ARM32 Xen in the same tree.
> (See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
> 
> Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
> ---
>  xen/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/Makefile b/xen/Makefile
> index dc6862e04d..fcd5c7e9d6 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -115,7 +115,8 @@ _clean: delete-unfresh-files
>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
> -	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean
> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean

A more future-proof way of doing this is to use find to collect a list
of directory under arch/ and iterate.

But I don't see a new architecture support coming any time soon, so
this is just a suggestion.

>  	$(MAKE) -f $(BASEDIR)/Rules.mk -C test clean
>  	$(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) clean
>  	find . \( -name "*.o" -o -name ".*.d" -o -name "*.gcno" \) -exec rm -f {} \;
> -- 
> 2.11.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/Makefile: remove all temporary files for every architecture
  2017-03-23 11:07 ` Wei Liu
@ 2017-03-23 11:20   ` Wei Liu
  2017-03-23 12:48     ` Luca Miccio
  0 siblings, 1 reply; 6+ messages in thread
From: Wei Liu @ 2017-03-23 11:20 UTC (permalink / raw)
  To: Luca Miccio
  Cc: sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
	ian.jackson, tim, jbeulich, xen-devel, xen-devel

On Thu, Mar 23, 2017 at 11:07:04AM +0000, Wei Liu wrote:
> On Thu, Mar 23, 2017 at 02:31:37AM +0100, Luca Miccio wrote:
> > Execute the clean target for both arm and x86 architecture.
> > 
> > When trying to build Xen for a different architecture in the same
> > tree, the command make clean will only remove temporary files for
> > the host architecture.
> > This will lead a compilation error when trying to build ARM64 and
> > ARM32 Xen in the same tree.
> > (See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
> > 
> > Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
> > ---
> >  xen/Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/xen/Makefile b/xen/Makefile
> > index dc6862e04d..fcd5c7e9d6 100644
> > --- a/xen/Makefile
> > +++ b/xen/Makefile
> > @@ -115,7 +115,8 @@ _clean: delete-unfresh-files
> >  	$(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
> >  	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
> >  	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
> > -	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
> > +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean
> > +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean
> 
> A more future-proof way of doing this is to use find to collect a list
> of directory under arch/ and iterate.
> 
> But I don't see a new architecture support coming any time soon, so
> this is just a suggestion.
> 

Also, you seem to have missed overriding TARGET_ARCH and TARGET_SUBARCH.
I believe there are references to them in arch-specific Makefiles.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/Makefile: remove all temporary files for every architecture
  2017-03-23 11:20   ` Wei Liu
@ 2017-03-23 12:48     ` Luca Miccio
  2017-03-23 12:52       ` Wei Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Miccio @ 2017-03-23 12:48 UTC (permalink / raw)
  To: Wei Liu
  Cc: Stefano Stabellini, George.Dunlap, andrew.cooper3, ian.jackson,
	tim, jbeulich, xen-devel, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2481 bytes --]


> Il giorno 23 mar 2017, alle ore 12:20, Wei Liu <wei.liu2@citrix.com> ha scritto:
> 
> On Thu, Mar 23, 2017 at 11:07:04AM +0000, Wei Liu wrote:
>> On Thu, Mar 23, 2017 at 02:31:37AM +0100, Luca Miccio wrote:
>>> Execute the clean target for both arm and x86 architecture.
>>> 
>>> When trying to build Xen for a different architecture in the same
>>> tree, the command make clean will only remove temporary files for
>>> the host architecture.
>>> This will lead a compilation error when trying to build ARM64 and
>>> ARM32 Xen in the same tree.
>>> (See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
>>> 
>>> Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
>>> ---
>>> xen/Makefile | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>> 
>>> diff --git a/xen/Makefile b/xen/Makefile
>>> index dc6862e04d..fcd5c7e9d6 100644
>>> --- a/xen/Makefile
>>> +++ b/xen/Makefile
>>> @@ -115,7 +115,8 @@ _clean: delete-unfresh-files
>>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
>>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
>>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
>>> -	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
>>> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean
>>> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean
>> 
>> A more future-proof way of doing this is to use find to collect a list
>> of directory under arch/ and iterate.
>> 
>> But I don't see a new architecture support coming any time soon, so
>> this is just a suggestion.
>> 

I had the same doubt, but, as you said there is no new architecture support coming soon.
However i could add this option.
> 
> Also, you seem to have missed overriding TARGET_ARCH and TARGET_SUBARCH.
> I believe there are references to them in arch-specific Makefiles.
> 
> Wei.
I don’t get your point/suggestion. When we use “make clean”, with my patch applied, we 
simply execute the clean target for every architecture supported for now. 
I took a look at the clean target used both from the arm and the x86 Makefile and i didn’t find
any references to TARGET_ARCH and TARGET_SUBARCH.

Also, with the current command:
$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
The target clean is called only for the $TARGET_ARCH architecture, which, if it’s not set ( "make clean | distclean" at the xen root directory),
is the host one.

Maybe i’m missing something.

Luca.


[-- Attachment #1.2: Type: text/html, Size: 7349 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/Makefile: remove all temporary files for every architecture
  2017-03-23 12:48     ` Luca Miccio
@ 2017-03-23 12:52       ` Wei Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2017-03-23 12:52 UTC (permalink / raw)
  To: Luca Miccio
  Cc: Stefano Stabellini, Wei Liu, George.Dunlap, andrew.cooper3,
	ian.jackson, tim, jbeulich, xen-devel, xen-devel

On Thu, Mar 23, 2017 at 01:48:24PM +0100, Luca Miccio wrote:
> 
> > Il giorno 23 mar 2017, alle ore 12:20, Wei Liu <wei.liu2@citrix.com> ha scritto:
> > 
> > On Thu, Mar 23, 2017 at 11:07:04AM +0000, Wei Liu wrote:
> >> On Thu, Mar 23, 2017 at 02:31:37AM +0100, Luca Miccio wrote:
> >>> Execute the clean target for both arm and x86 architecture.
> >>> 
> >>> When trying to build Xen for a different architecture in the same
> >>> tree, the command make clean will only remove temporary files for
> >>> the host architecture.
> >>> This will lead a compilation error when trying to build ARM64 and
> >>> ARM32 Xen in the same tree.
> >>> (See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
> >>> 
> >>> Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
> >>> ---
> >>> xen/Makefile | 3 ++-
> >>> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>> 
> >>> diff --git a/xen/Makefile b/xen/Makefile
> >>> index dc6862e04d..fcd5c7e9d6 100644
> >>> --- a/xen/Makefile
> >>> +++ b/xen/Makefile
> >>> @@ -115,7 +115,8 @@ _clean: delete-unfresh-files
> >>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
> >>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
> >>> 	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
> >>> -	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
> >>> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/arm clean
> >>> +	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/x86 clean
> >> 
> >> A more future-proof way of doing this is to use find to collect a list
> >> of directory under arch/ and iterate.
> >> 
> >> But I don't see a new architecture support coming any time soon, so
> >> this is just a suggestion.
> >> 
> 
> I had the same doubt, but, as you said there is no new architecture support coming soon.
> However i could add this option.
> > 
> > Also, you seem to have missed overriding TARGET_ARCH and TARGET_SUBARCH.
> > I believe there are references to them in arch-specific Makefiles.
> > 
> > Wei.
> I don’t get your point/suggestion. When we use “make clean”, with my patch applied, we 
> simply execute the clean target for every architecture supported for now. 
> I took a look at the clean target used both from the arm and the x86 Makefile and i didn’t find
> any references to TARGET_ARCH and TARGET_SUBARCH.
> 

OK. I think this is fine then.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen/Makefile: remove all temporary files for every architecture
  2017-03-23  1:31 [PATCH] xen/Makefile: remove all temporary files for every architecture Luca Miccio
  2017-03-23 11:07 ` Wei Liu
@ 2017-03-24 11:49 ` Wei Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Wei Liu @ 2017-03-24 11:49 UTC (permalink / raw)
  To: Luca Miccio
  Cc: sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
	ian.jackson, tim, jbeulich, xen-devel, xen-devel

On Thu, Mar 23, 2017 at 02:31:37AM +0100, Luca Miccio wrote:
> Execute the clean target for both arm and x86 architecture.
> 
> When trying to build Xen for a different architecture in the same
> tree, the command make clean will only remove temporary files for
> the host architecture.
> This will lead a compilation error when trying to build ARM64 and
> ARM32 Xen in the same tree.
> (See also: https://lists.xenproject.org/archives/html/xen-devel/2016-11/msg02176.html)
> 
> Signed-off-by: Luca Miccio <lucmiccio@gmail.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-24 11:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23  1:31 [PATCH] xen/Makefile: remove all temporary files for every architecture Luca Miccio
2017-03-23 11:07 ` Wei Liu
2017-03-23 11:20   ` Wei Liu
2017-03-23 12:48     ` Luca Miccio
2017-03-23 12:52       ` Wei Liu
2017-03-24 11:49 ` Wei Liu

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.