SELinux Archive on lore.kernel.org
 help / color / Atom feed
From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: Michael Shigorin <mike@altlinux.org>
Cc: SElinux list <selinux@vger.kernel.org>,
	Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [PATCH] non-gcc-specific exception.sh
Date: Mon, 7 Oct 2019 18:27:29 +0200
Message-ID: <CAJfZ7==pXUGZ_tEz0PuCR8-P2jm9hjO7vD4R++y2BHeBR_++LA@mail.gmail.com> (raw)
In-Reply-To: <20191007132020.GG4928@imap.altlinux.org>

On Mon, Oct 7, 2019 at 3:20 PM Michael Shigorin <mike@altlinux.org> wrote:
>
>         Hello,
> please find attached the patch to (hopefully) improve
> self-surgery script that uses gcc-specific -aux-info now.
> Should help clang, icc and the like (in my case there's
> no proper gcc port for the target platform just yet).
>
> --
>  ---- WBR, Michael Shigorin / http://altlinux.org
>   ------ http://opennet.ru / http://anna-news.info

Hello,
How did you test this patch? On my system (Arch Linux x86-64), I get
the following differences in the generated list of functions, for
libselinux:

+select
+pselect
-selinuxfs_exists

This is because /usr/include/sys/select.h contains "extern int select
(int __nfds, fd_set *__restrict __readfds," and "extern int pselect
(int __nfds, fd_set *__restrict __readfds,", and because
libselinux/include/selinux/selinux.h contains "int
selinuxfs_exists(void);" without "extern". Your patch therefore
changes things in a way that seems unintended.

I nevertheless agree that making the build system use clang when
CC=clang is a good idea. As the regular expression you sent is quite
fragile, a possible way of preventing issues such as the differences I
found is to try using both methods (-aux-info and -E) in a "make test"
target and fail with a fatal error when they do not produce the same
output (this fatal error would be caught by a continuous-integration
system, which would make the developers aware of something wrong).

Moreover, please send your patch inline, if possible (for example with
"git send-email"), and add a "Signed-off-by:" line as documented in
https://github.com/SELinuxProject/selinux/blob/master/CONTRIBUTING.md#contributing-code.

Thanks,
Nicolas


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 13:20 Michael Shigorin
2019-10-07 16:27 ` Nicolas Iooss [this message]
2019-10-07 19:21   ` Michael Shigorin
2019-10-12 16:55     ` Nicolas Iooss
2019-10-12 17:23       ` Michael Shigorin

Reply instructions:

You may reply publically 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='CAJfZ7==pXUGZ_tEz0PuCR8-P2jm9hjO7vD4R++y2BHeBR_++LA@mail.gmail.com' \
    --to=nicolas.iooss@m4x.org \
    --cc=dwalsh@redhat.com \
    --cc=mike@altlinux.org \
    --cc=selinux@vger.kernel.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

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org
	public-inbox-index selinux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git