* [PATCH] include: fix build without C++ compiler installed
@ 2017-05-12 6:52 Jan Beulich
2017-05-12 16:20 ` Wei Liu
2017-05-15 13:56 ` Julien Grall
0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2017-05-12 6:52 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
Ian Jackson, Tim Deegan, Julien Grall
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
The rule for headers++.chk wants to move headers++.chk.new to the
designated target, which means we have to create that file in the first
place.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -120,7 +120,10 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Mak
headers++.chk: $(PUBLIC_HEADERS) Makefile
rm -f $@.new
- $(CXX) -v >/dev/null 2>&1 || exit 0; \
+ if ! $(CXX) -v >/dev/null 2>&1; then \
+ touch $@.new; \
+ exit 0; \
+ fi; \
$(foreach i, $(filter %.h,$^), \
echo "#include "\"$(i)\" \
| $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
[-- Attachment #2: build-include-no-C++.patch --]
[-- Type: text/plain, Size: 1035 bytes --]
include: fix build without C++ compiler installed
The rule for headers++.chk wants to move headers++.chk.new to the
designated target, which means we have to create that file in the first
place.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -120,7 +120,10 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Mak
headers++.chk: $(PUBLIC_HEADERS) Makefile
rm -f $@.new
- $(CXX) -v >/dev/null 2>&1 || exit 0; \
+ if ! $(CXX) -v >/dev/null 2>&1; then \
+ touch $@.new; \
+ exit 0; \
+ fi; \
$(foreach i, $(filter %.h,$^), \
echo "#include "\"$(i)\" \
| $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
[-- Attachment #3: 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] 5+ messages in thread
* Re: [PATCH] include: fix build without C++ compiler installed
2017-05-12 6:52 [PATCH] include: fix build without C++ compiler installed Jan Beulich
@ 2017-05-12 16:20 ` Wei Liu
2017-05-15 7:02 ` Jan Beulich
2017-05-15 13:56 ` Julien Grall
1 sibling, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-05-12 16:20 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
Ian Jackson, Tim Deegan, Julien Grall, xen-devel
On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote:
> The rule for headers++.chk wants to move headers++.chk.new to the
> designated target, which means we have to create that file in the first
> place.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
If I were to fix it I would just skip the check altogether if CXX isn't
available. But this approach is fine, too.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] include: fix build without C++ compiler installed
2017-05-12 16:20 ` Wei Liu
@ 2017-05-15 7:02 ` Jan Beulich
2017-05-15 17:01 ` Wei Liu
0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2017-05-15 7:02 UTC (permalink / raw)
To: Wei Liu
Cc: Stefano Stabellini, George Dunlap, Andrew Cooper, IanJackson,
TimDeegan, Julien Grall, xen-devel
>>> On 12.05.17 at 18:20, <wei.liu2@citrix.com> wrote:
> On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote:
>> The rule for headers++.chk wants to move headers++.chk.new to the
>> designated target, which means we have to create that file in the first
>> place.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Thanks.
> If I were to fix it I would just skip the check altogether if CXX isn't
> available. But this approach is fine, too.
I may not be understanding what you mean: The test is being skipped;
the destination file is being touched so that on an incremental re-build
the rule wouldn't be re-run. What else are you imagining? Suppressing
the headers++.chk target altogether would likely be more code churn,
with an overall harder to read Makefile as a result. Yet if you have
something neat and lightweight in mind, I'm all ears (likely for post-4.9
then).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] include: fix build without C++ compiler installed
2017-05-12 6:52 [PATCH] include: fix build without C++ compiler installed Jan Beulich
2017-05-12 16:20 ` Wei Liu
@ 2017-05-15 13:56 ` Julien Grall
1 sibling, 0 replies; 5+ messages in thread
From: Julien Grall @ 2017-05-15 13:56 UTC (permalink / raw)
To: Jan Beulich, xen-devel
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
Ian Jackson, Tim Deegan
Hi Jan,
On 12/05/17 07:52, Jan Beulich wrote:
> The rule for headers++.chk wants to move headers++.chk.new to the
> designated target, which means we have to create that file in the first
> place.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
>
> --- a/xen/include/Makefile
> +++ b/xen/include/Makefile
> @@ -120,7 +120,10 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Mak
>
> headers++.chk: $(PUBLIC_HEADERS) Makefile
> rm -f $@.new
> - $(CXX) -v >/dev/null 2>&1 || exit 0; \
> + if ! $(CXX) -v >/dev/null 2>&1; then \
> + touch $@.new; \
> + exit 0; \
> + fi; \
> $(foreach i, $(filter %.h,$^), \
> echo "#include "\"$(i)\" \
> | $(CXX) -x c++ -std=gnu++98 -Wall -Werror -D__XEN_TOOLS__ \
>
>
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] include: fix build without C++ compiler installed
2017-05-15 7:02 ` Jan Beulich
@ 2017-05-15 17:01 ` Wei Liu
0 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2017-05-15 17:01 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
IanJackson, TimDeegan, Julien Grall, xen-devel
On Mon, May 15, 2017 at 01:02:48AM -0600, Jan Beulich wrote:
> >>> On 12.05.17 at 18:20, <wei.liu2@citrix.com> wrote:
> > On Fri, May 12, 2017 at 12:52:54AM -0600, Jan Beulich wrote:
> >> The rule for headers++.chk wants to move headers++.chk.new to the
> >> designated target, which means we have to create that file in the first
> >> place.
> >>
> >> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> >
> > Reviewed-by: Wei Liu <wei.liu2@citrix.com>
>
> Thanks.
>
> > If I were to fix it I would just skip the check altogether if CXX isn't
> > available. But this approach is fine, too.
>
> I may not be understanding what you mean: The test is being skipped;
> the destination file is being touched so that on an incremental re-build
> the rule wouldn't be re-run. What else are you imagining? Suppressing
> the headers++.chk target altogether would likely be more code churn,
Yes that's what I was thinking. But as you said it's going to be more
code churn.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-15 17:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 6:52 [PATCH] include: fix build without C++ compiler installed Jan Beulich
2017-05-12 16:20 ` Wei Liu
2017-05-15 7:02 ` Jan Beulich
2017-05-15 17:01 ` Wei Liu
2017-05-15 13:56 ` Julien Grall
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.