Skip to contentSkip to conversation

mkfs: link using libf2fs.la

PATCH In review [email protected] 2 participants 2 messages Jun 3, 2025 – Jun 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkfs: link using libf2fs.la

From: orbea <[email protected]>

With slibtool the build will fail with 'cannot find -lf2fs'.

To fix this it is better to use the canonical method of linking internal dependencies which is to use the generated .la files where the libtool implementation will know what to do with it.

Gentoo-Issue: https://bugs.gentoo.org/929070

---
 mkfs/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mkfs/Makefile.am +2 -2
index bfffd88..9273eb6 100644
@@ -11,8 +11,8 @@ mkfs_f2fs_LDADD = ${libuuid_LIBS} ${libblkid_LIBS} $(top_builddir)/lib/libf2fs.l
 lib_LTLIBRARIES = libf2fs_format.la
 libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
 libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD -D_FILE_OFFSET_BITS=64
-libf2fs_format_la_LDFLAGS = ${libblkid_LIBS} ${libuuid_LIBS} -L$(top_builddir)/lib -lf2fs \
-	-version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
+libf2fs_format_la_LIBADD = ${libblkid_LIBS} ${libuuid_LIBS} $(top_builddir)/lib/libf2fs.la
+libf2fs_format_la_LDFLAGS = -version-info $(FMT_CURRENT):$(FMT_REVISION):$(FMT_AGE)
 
 install-exec-hook:
 	if test -n "$(root_libdir)" -a "$(libdir)" != "$(root_libdir)" -a \
Signature · 8 lines
2.49.0



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by Chao Yu on v1 1/1
#1 lore raw
Quoted 10 lines · On 6/3/25 21:59, [email protected] wrote:

From: orbea <[email protected]>

With slibtool the build will fail with 'cannot find -lf2fs'.

To fix this it is better to use the canonical method of linking internal dependencies which is to use the generated .la files where the libtool implementation will know what to do with it.

Gentoo-Issue: https://bugs.gentoo.org/929070

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel