Skip to contentSkip to conversation

Remove udev from PKGCONFIG_LIBS in Makefile

PATCH Applied Alyssa Ross 2 participants 2 messages Sep 3, 2024 – Sep 4, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove udev from PKGCONFIG_LIBS in Makefile

libudev.pc is the pkg-config file for the udev libraries. udev.pc is just there to define the directory that rules etc. should be installed into. It therefore doesn't need to be included in the list of libraries passed to pkg-config --cflags or pkg-config --libs.

At least one implementation of the libudev API, libudev-zero, does not provide a udev.pc file, because it does not implement the udev rules language, just the library API. With this change, it's possible to build bcachefs-tools against libudev-zero by pointing PKGCONFIG_UDEVDIR somewhere on the make command line.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 23122fd6..c0261c35 100644
@@ -74,7 +74,7 @@ CFLAGS+=$(call cc-disable-warning, shift-overflow)
 CFLAGS+=$(call cc-disable-warning, enum-conversion)
 CFLAGS+=$(call cc-disable-warning, gnu-variable-sized-type-not-at-end)
 
-PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd libudev libkeyutils udev"
+PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd libudev libkeyutils"
 ifdef BCACHEFS_FUSE
 	PKGCONFIG_LIBS+="fuse3 >= 3.7"
 	CFLAGS+=-DBCACHEFS_FUSE
Signature · 1 line
2.45.2
#1 lore raw
Quoted 5 lines · Alyssa Ross

libudev.pc is the pkg-config file for the udev libraries. udev.pc is just there to define the directory that rules etc. should be installed into. It therefore doesn't need to be included in the list of libraries passed to pkg-config --cflags or pkg-config --libs.

Quoted 7 lines

At least one implementation of the libudev API, libudev-zero, does not provide a udev.pc file, because it does not implement the udev rules language, just the library API. With this change, it's possible to build bcachefs-tools against libudev-zero by pointing PKGCONFIG_UDEVDIR somewhere on the make command line.

Applied