From patchwork Sun Sep 25 12:16:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Iooss X-Patchwork-Id: 9349697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1E6E607F0 for ; Sun, 25 Sep 2016 12:19:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A241B28A18 for ; Sun, 25 Sep 2016 12:19:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 971C628D47; Sun, 25 Sep 2016 12:19:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from emsm-gh1-uea11.nsa.gov (smtp.nsa.gov [8.44.101.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1023D28A18 for ; Sun, 25 Sep 2016 12:19:40 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.30,393,1470700800"; d="scan'208";a="19529000" IronPort-PHdr: =?us-ascii?q?9a23=3AWa6HWR3Ac20ULQgJsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?segTK/ad9pjvdHbS+e9qxAeQG96KsbQd0qGJ6ejJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMz?= =?us-ascii?q?fbWvXNeLxJvtn8mJuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM8?= =?us-ascii?q?5fxGdvOE7B102kvpT4wYRnuxh0l7phspcYEPayQ6NtVrFcDTI7I0gp9cbrsl/F?= =?us-ascii?q?VgLJ6XwCAUsMlR8dJQnO6xXzRd/QtSzhraIp3iiROsn/VvY1XjO59I9uFA+ujz?= =?us-ascii?q?0IYW1quFrLg9B92foI6CmqoAZylsuNOIw=3D?= X-IPAS-Result: =?us-ascii?q?A2E6BQARwOdX/wHyM5BdHQEFAQsBFwEXAQwBgn4BAQEBAR6?= =?us-ascii?q?BU7p7IodBTAEBAQEBAQEBAgECWyeCMgQDEwWCEQIEAQI3FCAOAwkBARcpCAgDA?= =?us-ascii?q?S0VEQ4LBRgEiCoEAbZShyGGN4hqEQFohRIFmXaBZY15igeFbpBnVIUHcIRgeIE?= =?us-ascii?q?nAQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 25 Sep 2016 12:19:39 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u8PCJdwo015598; Sun, 25 Sep 2016 08:19:39 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u8PCGhL5238096 for ; Sun, 25 Sep 2016 08:16:43 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u8PCGdhP015441 for ; Sun, 25 Sep 2016 08:16:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1CRAQCdv+dXhyIeaIFdg2sBAQEBAYFxpS6RQ4Qnh0ZMAQIBAQEBAQITAQEBCgsJCRmFEQaBCVFXGYhLBAG2VochhjeJZIUSAQSZdoFljXmPdZBngx0MgjJwhn8BAQE X-IPAS-Result: A1CRAQCdv+dXhyIeaIFdg2sBAQEBAYFxpS6RQ4Qnh0ZMAQIBAQEBAQITAQEBCgsJCRmFEQaBCVFXGYhLBAG2VochhjeJZIUSAQSZdoFljXmPdZBngx0MgjJwhn8BAQE X-IronPort-AV: E=Sophos;i="5.30,393,1470715200"; d="scan'208";a="5727349" Received: from emsm-gh1-uea10.corp.nsa.gov (HELO emsm-gh1-uea10.nsa.gov) ([10.208.41.36]) by goalie.tycho.ncsc.mil with ESMTP; 25 Sep 2016 08:16:43 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A/sCB1BabmePojBMSd/lzcC3/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZpc+8bnLW6fgltlLVR4KTs6sC0LuM9fm5EjNaqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZv?= =?us-ascii?q?IaytQ8iJ3p7xjrn5pMebSj4LrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYe?= =?us-ascii?q?VcyDAgD1uSmxHh+pX4p8Y7oGwD884motVNVaT8YrQQUa1TDDNgNXs8osLsq0rt?= =?us-ascii?q?VwyKs10dWWISmwEAIg/C9wqyCpHwuSz+v/E72S6dJtbeSOwkHzO44PE4G1fTlC?= =?us-ascii?q?4bOmthoynsgctqgfcDrQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0HGAQCdv+dXhyIeaIFdRgEBARUBAQEFA?= =?us-ascii?q?QEDAQEBgn0BAQEBAYFxpS6RQ4Qnh0ZMAQEBAQEBAQECAQIQAQEBCgsJCRkvgjI?= =?us-ascii?q?YghgGgQlRVxmISwQBtlaHIYY3iWSFEgEEmXaBZY15j3WQZ4MdDIIycIZ/AQEB?= X-IPAS-Result: =?us-ascii?q?A0HGAQCdv+dXhyIeaIFdRgEBARUBAQEFAQEDAQEBgn0BAQE?= =?us-ascii?q?BAYFxpS6RQ4Qnh0ZMAQEBAQEBAQECAQIQAQEBCgsJCRkvgjIYghgGgQlRVxmIS?= =?us-ascii?q?wQBtlaHIYY3iWSFEgEEmXaBZY15j3WQZ4MdDIIycIZ/AQEB?= X-IronPort-AV: E=Sophos;i="5.30,393,1470700800"; d="scan'208";a="17941984" Received: from mx1.polytechnique.org ([129.104.30.34]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2016 12:16:42 +0000 Received: from localhost.localdomain (32.206.133.77.rev.sfr.net [77.133.206.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 34E78564E1F for ; Sun, 25 Sep 2016 14:16:41 +0200 (CEST) From: Nicolas Iooss To: selinux@tycho.nsa.gov Subject: [PATCH 3/3] policycoreutils: Remove LDFLAGS from CFLAGS Date: Sun, 25 Sep 2016 14:16:09 +0200 Message-Id: <20160925121609.14516-3-nicolas.iooss@m4x.org> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160925121609.14516-1-nicolas.iooss@m4x.org> References: <20160925121609.14516-1-nicolas.iooss@m4x.org> X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Sep 25 14:16:41 2016 +0200 (CEST)) X-Org-Mail: nicolas.iooss.2010@polytechnique.org X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP 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 646cd4dd7214..8b41428cbbbc 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 a4861eab52b6..2716d691d81b 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