On 08/08/2025 3:55 pm, Anthony PERARD wrote: > diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile > index b690d92159..fa2a338c2b 100644 > --- a/tools/libs/light/Makefile > +++ b/tools/libs/light/Makefile > @@ -166,7 +166,8 @@ LDLIBS-$(CONFIG_Linux) += -luuid > LDLIBS-$(CONFIG_Linux) += -lrt > LDLIBS-$(CONFIG_ARM) += -lfdt > LDLIBS-y += $(PTHREAD_LIBS) > -LDLIBS-y += -lyajl > +LDLIBS-y += $(YAJL_LIBS) > +LDLIBS-y += $(LIBJSONC_LIBS) > LDLIBS += $(LDLIBS-y) > > $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): CFLAGS += $(CFLAGS_LIBXL) -include > $(XEN_ROOT)/tools/config.h > @@ -246,7 +247,7 @@ libxenlight_test.so: $(PIC_OBJS) $(LIBXL_TEST_OBJS) > $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) > $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) > > test_%: test_%.o test_common.o libxenlight_test.so > - $(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, > $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) > -lyajl $(APPEND_LDFLAGS) > + $(CC) $(LDFLAGS) -o $@ $^ $(filter-out %libxenlight.so, > $(LDLIBS_libxenlight)) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) > $(YAJL_LIBS) $(LIBJSONC_LIBS) $(APPEND_LDFLAGS) > > libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so > $(CC) $(LDFLAGS) -o $@ $(SAVE_HELPER_OBJS) $(LDLIBS_libxentoollog) > $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxentoolcore) > $(APPEND_LDFLAGS) > diff --git a/tools/xl/Makefile b/tools/xl/Makefile > index ad577cdd70..ff7a5aee94 100644 > --- a/tools/xl/Makefile > +++ b/tools/xl/Makefile > @@ -33,7 +33,7 @@ $(XL_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h # > libxl_json.h needs i > all: xl > > xl: $(XL_OBJS) > - $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxenutil) > $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) -lyajl > $(APPEND_LDFLAGS) > + $(CC) $(LDFLAGS) -o $@ $(XL_OBJS) $(LDLIBS_libxenutil) > $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxenstore) > $(YAJL_LIBS) $(LIBJSONC_LIBS) $(APPEND_LDFLAGS) > > .PHONY: install > install: all
Specifying both isn't entirely great when one is supposed to be empty. Could we not have XEN_JSON_LIB(s) which is set to either $YAJL_LIBS or $LIBJSONC_LIBS as appropriate? ~Andrew