From d977330c9871c5e3767e82731cc7a83d450a68cb Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sun, 25 Sep 2016 14:16:09 +0200 Subject: [PATCH] policycoreutils: Remove LDFLAGS from CFLAGS Mixing LDFLAGS in CFLAGS can lead to compiler errors. For example in policycoreutils/sandbox: $ make CC=clang LDFLAGS='-Wl,-as-needed,-no-undefined' clang -Wl,-as-needed,-no-undefined -I/usr/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W -c -o seunshare.o seunshare.c clang-3.8: error: -Wl,-as-needed,-no-undefined: 'linker' input unused Signed-off-by: Nicolas Iooss --- policycoreutils/newrole/Makefile | 2 +- policycoreutils/sandbox/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile index 646cd4dd..8b41428c 100644 --- a/policycoreutils/newrole/Makefile +++ b/policycoreutils/newrole/Makefile @@ -22,7 +22,7 @@ VERSION = $(shell cat ../VERSION) CFLAGS ?= -Werror -Wall -W EXTRA_OBJS = -override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" +override CFLAGS += -DVERSION=\"$(VERSION)\" -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\"" LDLIBS += -lselinux -L$(PREFIX)/lib ifeq ($(PAMH), /usr/include/security/pam_appl.h) override CFLAGS += -DUSE_PAM diff --git a/policycoreutils/sandbox/Makefile b/policycoreutils/sandbox/Makefile index a4861eab..2716d691 100644 --- a/policycoreutils/sandbox/Makefile +++ b/policycoreutils/sandbox/Makefile @@ -9,7 +9,7 @@ SBINDIR ?= $(PREFIX)/sbin MANDIR ?= $(PREFIX)/share/man LOCALEDIR ?= /usr/share/locale SHAREDIR ?= $(PREFIX)/share/sandbox -override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W +override CFLAGS += -I$(PREFIX)/include -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W LDLIBS += -lselinux -lcap-ng -L$(LIBDIR) SEUNSHARE_OBJS = seunshare.o