diff mbox series

[2/4] libsemanage/Makefile: add -fno-semantic-interposition

Message ID 20200323175037.19170-3-william.c.roberts@intel.com (mailing list archive)
State Accepted
Headers show
Series [1/4] libsemanage: drop hidden | expand

Commit Message

William Roberts March 23, 2020, 5:50 p.m. UTC
From: William Roberts <william.c.roberts@intel.com>

Add -fno-semantic-interposition to CFLAGS. This will restore
the DSO infrastructures protections to insure internal callers
of exported symbols call into libselinux and not something loading first
in the library list.

Clang has this enabled by default.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
 libsemanage/src/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index f6780dc6048e..606ce1c6152a 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -53,7 +53,8 @@  SRCS= $(filter-out $(GENERATED),$(sort $(wildcard *.c)))
 OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o
 LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo
-CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute
+CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute \
+	  -fno-semantic-interposition
 SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \