From: Bruno Haible <bruno@clisp.org>
To: Assaf Gordon <assafgordon@gmail.com>
Cc: bug-gnulib@gnu.org
Subject: Re: selinux: insufficient M4 detection with building static binaries
Date: Tue, 09 Apr 2019 02:19:31 +0200 [thread overview]
Message-ID: <3847996.Tf4MXWre7B@omega> (raw)
In-Reply-To: <4abc5534-6644-635c-35b9-4a78ba0460b9@gmail.com>
Hi Assaf,
> > It would be better to instead set LIB_SELINUX to
> > "-lselinux -lpcre -lsepol -lpthread" (in the static case).
>
> This is a better solution, sadly I do not know how to
> implement this in M4 (e.g. detecting a static build,
> then deducing the required static libraries...).
I would not try do implement this by detecting a static build.
I would try to do it by first trying to link only with '-lselinux',
and if that fails, try with '-lselinux -lpcre -lsepol -lpthread'.
Basically, replace
AC_SEARCH_LIBS([setfilecon], [selinux],
[test "$ac_cv_search_setfilecon" = "none required" ||
LIB_SELINUX=$ac_cv_search_setfilecon])
with two AC_LINK_IFELSE invocations. And with the function
'matchpathcon_init_prefix' instead of 'setfilecon', of course.
Bruno
prev parent reply other threads:[~2019-04-09 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-07 6:33 selinux: insufficient M4 detection with building static binaries Assaf Gordon
2019-04-07 11:08 ` Bruno Haible
2019-04-08 22:13 ` Assaf Gordon
2019-04-09 0:19 ` Bruno Haible [this message]
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3847996.Tf4MXWre7B@omega \
--to=bruno@clisp.org \
--cc=assafgordon@gmail.com \
--cc=bug-gnulib@gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).