selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libsepol: drop dso question on CFLAGS (package maintainers weigh in please)
@ 2020-03-06 14:51 William Roberts
  2020-03-06 16:25 ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: William Roberts @ 2020-03-06 14:51 UTC (permalink / raw)
  To: SElinux list

The libsepol/src/Makefile has the below lines for CFLAGS:

CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2

override CFLAGS += -I. -I../include -D_GNU_SOURCE

Does anyone have a preference where I add the -fno-semantic-interposition?

I was thinking the conditional assignment because of the comment made
about packagers overriding things on the selinux drop dso patch
series.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libsepol: drop dso question on CFLAGS (package maintainers weigh in please)
  2020-03-06 14:51 libsepol: drop dso question on CFLAGS (package maintainers weigh in please) William Roberts
@ 2020-03-06 16:25 ` Stephen Smalley
  2020-03-06 17:46   ` William Roberts
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2020-03-06 16:25 UTC (permalink / raw)
  To: William Roberts; +Cc: SElinux list

On Fri, Mar 6, 2020 at 9:52 AM William Roberts <bill.c.roberts@gmail.com> wrote:
>
> The libsepol/src/Makefile has the below lines for CFLAGS:
>
> CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2
>
> override CFLAGS += -I. -I../include -D_GNU_SOURCE
>
> Does anyone have a preference where I add the -fno-semantic-interposition?
>
> I was thinking the conditional assignment because of the comment made
> about packagers overriding things on the selinux drop dso patch
> series.

I am not a package maintainer but regardless of how this gets added
(and I think in the libselinux case
it ends up being part of the conditional assignment), we need to make
sure that maintainers are strongly
encouraged to add it to their builds to preserve existing behavior.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libsepol: drop dso question on CFLAGS (package maintainers weigh in please)
  2020-03-06 16:25 ` Stephen Smalley
@ 2020-03-06 17:46   ` William Roberts
  0 siblings, 0 replies; 3+ messages in thread
From: William Roberts @ 2020-03-06 17:46 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SElinux list

On Fri, Mar 6, 2020 at 10:24 AM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
>
> On Fri, Mar 6, 2020 at 9:52 AM William Roberts <bill.c.roberts@gmail.com> wrote:
> >
> > The libsepol/src/Makefile has the below lines for CFLAGS:
> >
> > CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2
> >
> > override CFLAGS += -I. -I../include -D_GNU_SOURCE
> >
> > Does anyone have a preference where I add the -fno-semantic-interposition?
> >
> > I was thinking the conditional assignment because of the comment made
> > about packagers overriding things on the selinux drop dso patch
> > series.
>
> I am not a package maintainer but regardless of how this gets added
> (and I think in the libselinux case
> it ends up being part of the conditional assignment), we need to make
> sure that maintainers are strongly
> encouraged to add it to their builds to preserve existing behavior.

Definitely.

The same would go for libselinux, its on EXTRA_CFLAGS which eventually
gets conditionally assigned to CFLAGS.

I would imagine if you set custom CFLAGS when building a package, you better
make sure it's perfect. You won't necessarily get a wrong lib, but you could get
something undesirable for a host of reasons (hardening flags omitted, etc).

I could definitely see an argument to add this no matter what for gcc builds
(omit for clang) and make it non-override-able. But the package folks seemed
to frown on that.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-06 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 14:51 libsepol: drop dso question on CFLAGS (package maintainers weigh in please) William Roberts
2020-03-06 16:25 ` Stephen Smalley
2020-03-06 17:46   ` William Roberts

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 NNTP newsgroup(s).