* [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder
@ 2016-02-12 19:21 Andrew Cooper
2016-02-15 11:57 ` Wei Liu
2016-02-15 15:21 ` Roger Pau Monné
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cooper @ 2016-02-12 19:21 UTC (permalink / raw)
To: Xen-devel
Cc: Andrew Cooper, Wei Liu, Ian Jackson, Ian Campbell,
Roger Pau Monne
c/s de0f8c7c changed the use of zlib-options, and moved it from being locally
generated to coming from ./configure.
However, it neglected to modify the users of zlib-options. The curious use of
$(call ...) was to select either the -D or -l options as appropriate, but c/s
de0f8c7c broke this by loosing the `grep`.
Instead, use $(filter ...) to pick out either the -D or -l options. This
fixes the build with Clang, which complains at passing '-llzma' when trying
to compile xc_dom_bzimageloader.c to xc_dom_bzimageloader.o.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Roger Pau Monne <roger.pau@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
tools/libxc/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 0a8614c..608404f 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -226,10 +226,10 @@ else
zlib-options = $(ZLIB)
endif
-xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
-xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
+xc_dom_bzimageloader.o: CFLAGS += $(filter -D%,$(zlib-options))
+xc_dom_bzimageloader.opic: CFLAGS += $(filter -D%,$(zlib-options))
-libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l)
+libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(filter -l%,$(zlib-options))
libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder
2016-02-12 19:21 [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder Andrew Cooper
@ 2016-02-15 11:57 ` Wei Liu
2016-02-15 15:21 ` Roger Pau Monné
1 sibling, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-02-15 11:57 UTC (permalink / raw)
To: Andrew Cooper
Cc: Wei Liu, Roger Pau Monne, Ian Jackson, Ian Campbell, Xen-devel
On Fri, Feb 12, 2016 at 07:21:31PM +0000, Andrew Cooper wrote:
> c/s de0f8c7c changed the use of zlib-options, and moved it from being locally
> generated to coming from ./configure.
>
Wow, this is ancient commit.
> However, it neglected to modify the users of zlib-options. The curious use of
> $(call ...) was to select either the -D or -l options as appropriate, but c/s
> de0f8c7c broke this by loosing the `grep`.
>
> Instead, use $(filter ...) to pick out either the -D or -l options. This
> fixes the build with Clang, which complains at passing '-llzma' when trying
> to compile xc_dom_bzimageloader.c to xc_dom_bzimageloader.o.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> CC: Roger Pau Monne <roger.pau@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/libxc/Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
> index 0a8614c..608404f 100644
> --- a/tools/libxc/Makefile
> +++ b/tools/libxc/Makefile
> @@ -226,10 +226,10 @@ else
> zlib-options = $(ZLIB)
> endif
>
> -xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
> -xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
> +xc_dom_bzimageloader.o: CFLAGS += $(filter -D%,$(zlib-options))
> +xc_dom_bzimageloader.opic: CFLAGS += $(filter -D%,$(zlib-options))
>
> -libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l)
> +libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(filter -l%,$(zlib-options))
> libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
> $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
>
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder
2016-02-12 19:21 [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder Andrew Cooper
2016-02-15 11:57 ` Wei Liu
@ 2016-02-15 15:21 ` Roger Pau Monné
2016-02-15 17:06 ` Ian Jackson
1 sibling, 1 reply; 4+ messages in thread
From: Roger Pau Monné @ 2016-02-15 15:21 UTC (permalink / raw)
To: Andrew Cooper, Xen-devel; +Cc: Wei Liu, Ian Jackson, Ian Campbell
El 12/2/16 a les 20:21, Andrew Cooper ha escrit:
> c/s de0f8c7c changed the use of zlib-options, and moved it from being locally
> generated to coming from ./configure.
>
> However, it neglected to modify the users of zlib-options. The curious use of
> $(call ...) was to select either the -D or -l options as appropriate, but c/s
> de0f8c7c broke this by loosing the `grep`.
>
> Instead, use $(filter ...) to pick out either the -D or -l options. This
> fixes the build with Clang, which complains at passing '-llzma' when trying
> to compile xc_dom_bzimageloader.c to xc_dom_bzimageloader.o.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Wow, good catch, thanks.
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Roger.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder
2016-02-15 15:21 ` Roger Pau Monné
@ 2016-02-15 17:06 ` Ian Jackson
0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-02-15 17:06 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: Andrew Cooper, Wei Liu, Ian Campbell, Xen-devel
Roger Pau Monné writes ("Re: [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder"):
> El 12/2/16 a les 20:21, Andrew Cooper ha escrit:
> > c/s de0f8c7c changed the use of zlib-options, and moved it from being locally
> > generated to coming from ./configure.
> >
> > However, it neglected to modify the users of zlib-options. The curious use of
> > $(call ...) was to select either the -D or -l options as appropriate, but c/s
> > de0f8c7c broke this by loosing the `grep`.
> >
> > Instead, use $(filter ...) to pick out either the -D or -l options. This
> > fixes the build with Clang, which complains at passing '-llzma' when trying
> > to compile xc_dom_bzimageloader.c to xc_dom_bzimageloader.o.
> >
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Wow, good catch, thanks.
>
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-15 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 19:21 [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder Andrew Cooper
2016-02-15 11:57 ` Wei Liu
2016-02-15 15:21 ` Roger Pau Monné
2016-02-15 17:06 ` Ian Jackson
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).