From patchwork Mon Oct 17 20:24:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Roberts, William C" X-Patchwork-Id: 9380507 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 66EB9608A7 for ; Mon, 17 Oct 2016 20:29:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C24828F34 for ; Mon, 17 Oct 2016 20:29:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50FAC28F41; Mon, 17 Oct 2016 20:29:22 +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 (emsm-gh1-uea11.nsa.gov [8.44.101.9]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8E7428F3F for ; Mon, 17 Oct 2016 20:29:21 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.31,358,1473120000"; d="scan'208";a="20137968" IronPort-PHdr: =?us-ascii?q?9a23=3A/dKGuxESwzmLtYfqkoz2Ap1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ75rs6wAkXT6L1XgUPTWs2DsrQf2rCQ7vqrADdRqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZv?= =?us-ascii?q?IaytQ8iJ3p7xirr5osaCKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP?= =?us-ascii?q?5Xz247bXianhL7+9vitMU7q3cYhuglv/Jkfe26Ov1gDO8QMDNzKG0x5cv2pTHf?= =?us-ascii?q?XACP4T0aSWxQnR1WR0De4Rj8Uo32sye/sutmxAGGLMb2SvYyQj3k4KB1DFfzhD?= =?us-ascii?q?wvKy8y8GaRjNd5yq1cvkGPvRt6lpHVZIWUPf84deXHetkXX3ZadsdXSyFFRIi7?= =?us-ascii?q?athcR9EdNPpV+tGu72AFqgGzUEz1XO4=3D?= X-IPAS-Result: =?us-ascii?q?A2GvBgAtNAVY/wHyM5BbGwEBAQMBAQEJAQEBFwEBBAEBCgE?= =?us-ascii?q?BgxEBAQEBAR2BU6Q6gVuUWyeHdEwBAQEBAQEBAQIBAlsngjIEAxMFghECBAECN?= =?us-ascii?q?xQgDgMJAQEXCCEICAMBLRURBwcLBRgEiDHCSgwBJYhChmcCEQGFewWaBpAEAol?= =?us-ascii?q?+hXWQe1SFW1YBhlEPF2GBKAEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 17 Oct 2016 20:28:44 +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 u9HKSgIr000985; Mon, 17 Oct 2016 16:28:43 -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 u9HKOuQR165447 for ; Mon, 17 Oct 2016 16:24:56 -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 u9HKOuRV032743; Mon, 17 Oct 2016 16:24:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1AhBAC1MgVY/yNjr8ZbGgEBAQECAQEBAQgBAQEBgzwBAQEBAR2BU6Q6kimEF4YiAoFtTAECAQEBAQECXoUJAgR5ECAxVwcSiFLCSAEBAQEGAiaIQoZnhg8FmgaQBAKPc5B7VIVbIjQBhlGCLwEBAQ X-IPAS-Result: A1AhBAC1MgVY/yNjr8ZbGgEBAQECAQEBAQgBAQEBgzwBAQEBAR2BU6Q6kimEF4YiAoFtTAECAQEBAQECXoUJAgR5ECAxVwcSiFLCSAEBAQEGAiaIQoZnhg8FmgaQBAKPc5B7VIVbIjQBhlGCLwEBAQ X-IronPort-AV: E=Sophos;i="5.31,358,1473134400"; d="scan'208";a="5767603" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 17 Oct 2016 16:24:55 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AJgPlKBT+nDmhi5aq60KXdBZHQ9psv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa65ZRON2/xhgRfzUJnB7Loc0qyN4vqmBDZLuM3Q+Fk5M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJP?= =?us-ascii?q?K/jvHcaK1oLshrr0pseYOl4ZzBOGIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu?= =?us-ascii?q?5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ7djh7Z?= =?us-ascii?q?UQaD3HYXU31M2loUW0mWpC39C4z8tir8q/pVxDiRPcqwS6s9Hzul8eMjUxLhji?= =?us-ascii?q?sdMD81tWXWkdBYkLNQoBXnoQd2hYHTfsXdL/ZlVr/MdtMdA2xaV4BeUDISLJm7?= =?us-ascii?q?at4QDu4FPO9d6YK7vVwEoAGiHiGtAv/iznlDgXqljuUBz+09HFSej0QbFNUUvS?= =?us-ascii?q?GR8o34?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0G2BQAxMwVY/yNjr8ZbGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFwEBBAEBCgEBgxEBAQEBAR2BU6Q6gVuQToQXhiICgW1MAQEBAQEBAQE?= =?us-ascii?q?CAQJbJ4IyBAEVBYIRAgR5ECAxVwcSiFLCSAEBAQEGAgEliEKGZ4YPBZoGkAQCj?= =?us-ascii?q?3OQe1SFWyI0AYZRboFBAQEB?= X-IPAS-Result: =?us-ascii?q?A0G2BQAxMwVY/yNjr8ZbGgEBAQECAQEBAQgBAQEBFwEBBAE?= =?us-ascii?q?BCgEBgxEBAQEBAR2BU6Q6gVuQToQXhiICgW1MAQEBAQEBAQECAQJbJ4IyBAEVB?= =?us-ascii?q?YIRAgR5ECAxVwcSiFLCSAEBAQEGAgEliEKGZ4YPBZoGkAQCj3OQe1SFWyI0AYZ?= =?us-ascii?q?RboFBAQEB?= X-IronPort-AV: E=Sophos;i="5.31,358,1473120000"; d="scan'208";a="20137871" Received: from fmsmga002-icc.fm.intel.com ([198.175.99.35]) by emsm-gh1-uea11.nsa.gov with ESMTP; 17 Oct 2016 20:24:46 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga002-icc.fm.intel.com with ESMTP; 17 Oct 2016 13:24:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,358,1473145200"; d="scan'208"; a="1046007536" Received: from mcohen2-mobl.amr.corp.intel.com (HELO wcrobert-MOBL1.amr.corp.intel.com) ([10.254.186.130]) by orsmga001.jf.intel.com with ESMTP; 17 Oct 2016 13:24:44 -0700 From: william.c.roberts@intel.com To: selinux@tycho.nsa.gov, seandroid-list@tycho.nsa.gov, sds@tycho.nsa.gov Subject: [PATCH 2/8] libsepol: build on mac Date: Mon, 17 Oct 2016 16:24:04 -0400 Message-Id: <1476735850-7844-2-git-send-email-william.c.roberts@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476735850-7844-1-git-send-email-william.c.roberts@intel.com> References: <1476735850-7844-1-git-send-email-william.c.roberts@intel.com> 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 From: William Roberts Correct the build issues on mac, mostly flags for tools. libsepol and cil now build completley on Mac with a simple make command. Signed-off-by: William Roberts --- libsepol/src/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile index b0c901f..7856213 100644 --- a/libsepol/src/Makefile +++ b/libsepol/src/Makefile @@ -30,6 +30,13 @@ LOBJS += $(sort $(patsubst %.c,%.lo,$(sort $(wildcard $(CILDIR)/src/*.c)) $(CIL_ override CFLAGS += -I$(CILDIR)/include endif +LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=$(LIBMAP),-z,defs + +OS := $(shell uname) +ifeq ($(OS), Darwin) +LD_SONAME_FLAGS=-install_name,$(LIBSO) +LDFLAGS += -undefined dynamic_lookup +endif all: $(LIBA) $(LIBSO) $(LIBPC) @@ -39,7 +46,7 @@ $(LIBA): $(OBJS) $(RANLIB) $@ $(LIBSO): $(LOBJS) $(LIBMAP) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(LOBJS) -Wl,-soname,$(LIBSO),--version-script=$(LIBMAP),-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(LOBJS) -Wl,$(LD_SONAME_FLAGS) ln -sf $@ $(TARGET) $(LIBPC): $(LIBPC).in ../VERSION