tools/libxc: Fix use of zlib-options when building the domain builder
PATCH 1/1 tools/libxc: Fix use of zlib-options when building the domain builder
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.
---
CC: Roger Pau Monne <[email protected]>
CC: Ian Campbell <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
--- tools/libxc/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/libxc/Makefile +3 -3
@@ -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)
Signature · 1 line
2.1.4
Quoted 3 lines · Andrew Cooper
c/s
de0f8c7cchanged the use of zlib-options, and moved it from being locally generated to coming from ./configure.
Wow, this is ancient commit.
Quoted 9 lines
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
de0f8c7cbroke this by loosing thegrep.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.cto xc_dom_bzimageloader.o.Signed-off-by Andrew Cooper <[email protected]>
Quoted 30 lines
---
CC: Roger Pau Monne <[email protected]>
CC: Ian Campbell <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>--- tools/libxc/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)tools/libxc/Makefile +3
-3@@ -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)Signature · 1 line
2.1.4
El 12/2/16 a les 20:21, Andrew Cooper ha escrit:
Quoted 7 lines
c/s
de0f8c7cchanged 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
de0f8c7cbroke this by loosing thegrep.
Quoted 5 lines
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.cto xc_dom_bzimageloader.o.Signed-off-by Andrew Cooper <[email protected]>
Wow, good catch, thanks.
Roger.
Roger Pau Monné writes ("Re: [PATCH] tools/libxc: Fix use of zlib-options when building the domain builder"):
Quoted 12 lines
El 12/2/16 a les 20:21, Andrew Cooper ha escrit:
Quoted 11 lines
c/s
de0f8c7cchanged 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
de0f8c7cbroke this by loosing thegrep.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.cto xc_dom_bzimageloader.o.
Quoted 5 lines
Quoted 1 line
Signed-off-by Andrew Cooper <[email protected]>Wow, good catch, thanks.
Acked-by Roger Pau Monné <[email protected]>