Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] nilfs-utils: fix build with static toolchains
Date: Sat, 6 Jan 2018 15:47:46 +0100	[thread overview]
Message-ID: <20180106154746.06464750@windsurf> (raw)
In-Reply-To: <1515060652-22472-2-git-send-email-dev.kurt@vandijck-laurijssen.be>

Hello,

On Thu,  4 Jan 2018 11:10:52 +0100, Kurt Van Dijck wrote:
> This commit adds a patch to respect the dependency libmount->libblkid->libuuid
> properly in autoconf. This becomes necessary for static builds.
> 
> Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>

Thanks for working on this! It looks a lot better. I have a few
minor/comments, see below.

Also, could you submit this patch upstream?

> + # Check for conditional libraries and headers.
> + if test "${with_libmount}" = "yes"; then
> +-   AC_CHECK_LIB(mount, mnt_context_do_mount, [LIB_MOUNT="-lmount"],
> ++   PKG_CHECK_MODULES([MOUNT], [mount],,
> +    	AC_MSG_ERROR([Mount library is enabled but libmount not found]))

I believe you could drop entirely the AC_MSG_ERROR() message here.
PKG_CHECK_MODULES([MOUNT], [mount]) already aborts with an error
message if the "mount" pkg-config description cannot be found.

> + if test "${with_selinux}" = "yes"; then
> +    AC_CHECK_LIB(selinux, getprevcon,
> +@@ -125,15 +123,12 @@ fi
> + AC_SUBST([LIB_SELINUX])
> + 
> + if test "${with_blkid}" = "yes"; then
> +-   AC_CHECK_LIB(blkid, blkid_new_probe_from_filename,
> ++   PKG_CHECK_MODULES([BLKID], [blkid],
> +    		[AC_DEFINE(HAVE_LIBBLKID, 1,
> + 		    [Define to 1 if you have the 'blkid' library (-lblkid).])
> +-		 LIB_BLKID="-lblkid"
> + 		],
> + 		AC_MSG_ERROR([BLKID library not found]))

Ditto here.

> +diff --git a/sbin/mount/mount_libmount.c b/sbin/mount/mount_libmount.c
> +index ef40e68..a7fec00 100644
> +--- a/sbin/mount/mount_libmount.c
> ++++ b/sbin/mount/mount_libmount.c
> +@@ -67,9 +67,7 @@
> + #include <syslog.h>
> + #endif	/* HAVE_SYSLOG_H */
> + 
> +-#if HAVE_LIBMOUNT_LIBMOUNT_H
> +-#include <libmount/libmount.h>
> +-#endif	/* HAVE_LIBMOUNT_H */
> ++#include <libmount.h>

So you're dropping the HAVE_LIBMOUNT_LIBMOUNT_H condition because this
file is anyway only built when libmount support is enabled. Correct ?

> +diff --git a/sbin/mount/umount_libmount.c b/sbin/mount/umount_libmount.c
> +index ae5a337..2987f5d 100644
> +--- a/sbin/mount/umount_libmount.c
> ++++ b/sbin/mount/umount_libmount.c
> +@@ -59,9 +59,7 @@
> + #include <syslog.h>
> + #endif	/* HAVE_SYSLOG_H */
> + 
> +-#if HAVE_LIBMOUNT_LIBMOUNT_H
> + #include <libmount/libmount.h>
> +-#endif	/* HAVE_LIBMOUNT_H */

In the previous file, you change <libmount/libmount.h> to <libmount.h>,
but not here. Why?

Could you fix those minor issues and send an updated version?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2018-01-06 14:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 10:10 [Buildroot] [PATCH 1/2] nilfs-utils: need NPTL threads Kurt Van Dijck
2018-01-04 10:10 ` [Buildroot] [PATCH 2/2] nilfs-utils: fix build with static toolchains Kurt Van Dijck
2018-01-06 14:47   ` Thomas Petazzoni [this message]
2018-01-06 20:30     ` Kurt Van Dijck
2018-01-04 10:19 ` [Buildroot] [PATCH 1/2] nilfs-utils: need NPTL threads Baruch Siach
2018-01-04 10:33   ` Thomas Petazzoni
2018-01-04 10:51     ` Baruch Siach
2018-01-04 11:28       ` Kurt Van Dijck
2018-01-04 15:52         ` Yann E. MORIN
2018-01-04 17:23           ` Baruch Siach
     [not found]             ` <20180104201958.GB5130@waldemar-brodkorb.de>
2018-01-05  5:23               ` Baruch Siach
2018-01-05 10:17                 ` Kurt Van Dijck
2018-01-05 10:31                   ` Thomas Petazzoni
2018-01-05 11:24                   ` Baruch Siach
2018-01-05 13:20                     ` Kurt Van Dijck
2018-01-05 14:03                       ` Baruch Siach
2018-01-07 20:08                 ` Waldemar Brodkorb
2018-01-05 19:56   ` Kurt Van Dijck
2018-01-06 14:35 ` Thomas Petazzoni
2018-01-06 20:32   ` Kurt Van Dijck

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=20180106154746.06464750@windsurf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox