Skip to contentSkip to conversation

build: don't add -lm -lpci -lz to APP_LDLIBS

PATCH In review Juergen Gross 2 participants 2 messages Aug 13 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: don't add -lm -lpci -lz to APP_LDLIBS

libm, libpci and libz are not always needed, so don't add them to APP_LDLIBS just because libc is selected.

In case they will be needed by someone, they should be added via a dedicated CONFIG option.

Note that none of the currently supported Xen stubdoms is using them.

---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)
Makefile +0 -3
index a64913a..7510d5d 100644
@@ -164,9 +164,6 @@ ifeq ($(CONFIG_LIBXENMANAGE),y)
 APP_LDLIBS += -L$(MANAGE_PATH) -whole-archive -lxenmanage -no-whole-archive
 LIBS += $(MANAGE_PATH)/libxenmanage.a
 endif
-APP_LDLIBS += -lpci
-APP_LDLIBS += -lz
-APP_LDLIBS += -lm
 LDLIBS += -lc
 endif
 
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw

Juergen Gross, le jeu. 13 août 2026 16:35:36 +0200, a ecrit:

Quoted 9 lines

libm, libpci and libz are not always needed, so don't add them to APP_LDLIBS just because libc is selected.

In case they will be needed by someone, they should be added via a dedicated CONFIG option.

Note that none of the currently supported Xen stubdoms is using them.

Agreed,

Quoted 21 lines
---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)
Makefile +0 -3
index a64913a..7510d5d 100644
@@ -164,9 +164,6 @@ ifeq ($(CONFIG_LIBXENMANAGE),y)
 APP_LDLIBS += -L$(MANAGE_PATH) -whole-archive -lxenmanage -no-whole-archive
 LIBS += $(MANAGE_PATH)/libxenmanage.a
 endif
-APP_LDLIBS += -lpci
-APP_LDLIBS += -lz
-APP_LDLIBS += -lm
 LDLIBS += -lc
 endif
 
Signature · 1 line
2.55.0