From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: ComixHe <heyuming@deepin.org>, linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH] build: support building static library liberofsfuse
Date: Thu, 6 Jun 2024 14:31:11 +0800 [thread overview]
Message-ID: <aa50914c-855e-4c6d-892d-7b219ed90970@linux.alibaba.com> (raw)
In-Reply-To: <64B0656069715534+20240606041826.46688-1-heyuming@deepin.org>
Hi,
On 2024/6/6 12:18, ComixHe wrote:
I guess we may leave a commit message like:
In order to directly import erofsfuse with a new static library.
> Signed-off-by: ComixHe <heyuming@deepin.org>
> ---
> configure.ac | 10 ++++++++++
> fuse/Makefile.am | 10 ++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 1989bca..3efbb70 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -147,6 +147,12 @@ AC_ARG_ENABLE(fuse,
> [AS_HELP_STRING([--enable-fuse], [enable erofsfuse @<:@default=no@:>@])],
> [enable_fuse="$enableval"], [enable_fuse="no"])
>
> +AC_ARG_ENABLE([static-fuse],
> + [AS_HELP_STRING([--enable-static-fuse],
> + [build erofsfuse as a static library @<:@default=no@:>@])],
> + [enable_static_fuse="$enableval"],
> + [enable_static_fuse="no"])
> +
> AC_ARG_WITH(uuid,
> [AS_HELP_STRING([--without-uuid],
> [Ignore presence of libuuid and disable uuid support @<:@default=enabled@:>@])])
> @@ -525,6 +531,10 @@ AM_CONDITIONAL([ENABLE_FUSE], [test "x${have_fuse}" = "xyes"])
> AM_CONDITIONAL([ENABLE_LIBLZMA], [test "x${have_liblzma}" = "xyes"])
> AM_CONDITIONAL([ENABLE_LIBDEFLATE], [test "x${have_libdeflate}" = "xyes"])
> AM_CONDITIONAL([ENABLE_LIBZSTD], [test "x${have_libzstd}" = "xyes"])
> +AM_CONDITIONAL([ENABLE_STATIC_FUSE], [test "x${enable_static_fuse}" = "xyes"])
> +AM_CONDITIONAL([ENABLE_STATIC_MKFS], [test "x${enable_static_mkfs}" = "xyes"])
> +AM_CONDITIONAL([ENABLE_STATIC_DUMP], [test "x${enable_static_dump}" = "xyes"])
> +AM_CONDITIONAL([ENABLE_STATIC_FSCK], [test "x${enable_static_fsck}" = "xyes"])
Maybe only leave this line here?
AM_CONDITIONAL([ENABLE_STATIC_FUSE], [test "x${enable_static_fuse}" = "xyes"])
>
> if test "x$have_uuid" = "xyes"; then
> AC_DEFINE([HAVE_LIBUUID], 1, [Define to 1 if libuuid is found])
> diff --git a/fuse/Makefile.am b/fuse/Makefile.am
> index 7eae5f6..120d3e1 100644
> --- a/fuse/Makefile.am
> +++ b/fuse/Makefile.am
> @@ -8,3 +8,13 @@ erofsfuse_CFLAGS = -Wall -I$(top_srcdir)/include
> erofsfuse_CFLAGS += ${libfuse2_CFLAGS} ${libfuse3_CFLAGS} ${libselinux_CFLAGS}
> erofsfuse_LDADD = $(top_builddir)/lib/liberofs.la ${libfuse2_LIBS} ${libfuse3_LIBS} ${liblz4_LIBS} \
> ${libselinux_LIBS} ${liblzma_LIBS} ${zlib_LIBS} ${libdeflate_LIBS} ${libzstd_LIBS}
> +
> +
> +if ENABLE_STATIC_FUSE
> +lib_LTLIBRARIES = liberofsfuse.la
> +liberofsfuse_la_SOURCES = main.c
> +liberofsfuse_la_CFLAGS = -Wall -I$(top_srcdir)/include
> +liberofsfuse_la_CFLAGS += -Dmain=erofsfuse_main -static ${libfuse2_CFLAGS} ${libfuse3_CFLAGS} ${libselinux_CFLAGS}
> +liberofsfuse_la_LIBADD = $(top_builddir)/lib/liberofs.la ${libfuse2_LIBS} ${libfuse3_LIBS} ${liblz4_LIBS} \
> + ${libselinux_LIBS} ${liblzma_LIBS} ${zlib_LIBS} ${libdeflate_LIBS} ${libzstd_LIBS}
Maybe the following way also works?
lib_LIBRARIES = liberofsfuse.a
liberofsfuse_a_CFLAGS = ...
liberofsfuse_a_CFLAGS += -Dmain=erofsfuse_main ${libfuse2_CFLAGS} ${libfuse3_CFLAGS} ${libselinux_CFLAGS}
liberofsfuse_la_LIBADD =
I guess we don't need -static + la IMHO...
Thanks,
Gao Xiang
> +endif
next prev parent reply other threads:[~2024-06-06 6:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 7:31 [PATCH] build: support building static library ComixHe
2024-05-23 8:05 ` Gao Xiang
2024-06-06 2:13 ` Chen Linxuan
2024-06-06 2:22 ` Gao Xiang
2024-06-06 2:25 ` Chen Linxuan
2024-06-06 2:45 ` Gao Xiang
2024-06-06 3:06 ` Chen Linxuan
2024-06-06 3:13 ` Gao Xiang
2024-06-06 3:17 ` Chen Linxuan
2024-06-06 3:22 ` Gao Xiang
2024-06-06 4:18 ` [PATCH] build: support building static library liberofsfuse ComixHe
2024-06-06 6:31 ` Gao Xiang [this message]
2024-06-06 7:39 ` [PATCH v2] " ComixHe
2024-06-06 7:53 ` Gao Xiang
2024-06-11 9:23 ` Gao Xiang
[not found] <7415F0DDF0F65F38+20240523061237.45994-1-heyuming@deepin.org>
2024-06-06 4:04 ` [PATCH] " ComixHe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa50914c-855e-4c6d-892d-7b219ed90970@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=heyuming@deepin.org \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.