From patchwork Thu Sep 22 19:48:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bowgo Tsai X-Patchwork-Id: 9346849 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 AC8FE607D0 for ; Thu, 22 Sep 2016 19:53:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 974892ACDD for ; Thu, 22 Sep 2016 19:53:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B98A2ACDF; Thu, 22 Sep 2016 19:53:59 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 435602ACDD for ; Thu, 22 Sep 2016 19:53:57 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.30,379,1470700800"; d="scan'208";a="19484815" IronPort-PHdr: =?us-ascii?q?9a23=3AwrQO/x0NzmuUu/bxsmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?segSI/ad9pjvdHbS+e9qxAeQG96KsbQc16GP7/iocFdDyK7JiGoFfp1IWk1Nou?= =?us-ascii?q?QttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIs?= =?us-ascii?q?YL+kQMiK04/ui7j60qaQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdr?= =?us-ascii?q?ce72ppIVWOg0S0vZ/or9Ze6SAYh9YNv44FCP27LOwESulDATAnNX0lzNH6vhnE?= =?us-ascii?q?Cw2U7z0TVXtFvABPBl3v6w71Wd/NqSL7/r533zaVOtHtRLEcVjOl4KNmDhTvjX?= =?us-ascii?q?FUZHYC7GjLh5ko3+pgqxW7qkk6mtbZ?= X-IPAS-Result: =?us-ascii?q?A2G1AgA+NuRX/wHyM5BeHAEBBAEBCgEBFwEBBAEBCgEBgxA?= =?us-ascii?q?BAQEBAR5XfLoeBRg6IAOBeIV2TAEBAQEBAQEBAgECWyeCMgQDEwUEASIBFgswA?= =?us-ascii?q?QEBAQEBAQEBASACDSIVKgEEAg8oBgEBDCALAQIDCQIXCCABCAgDAS0DAQUBCx8?= =?us-ascii?q?LBRgEAYgpoWyBMj4yilaFMAEBBYgXAQEBGwgQhBeCEIhqEQGFeo8vikuEWYFOi?= =?us-ascii?q?T8CgWxOhxwlhW+HBogcMYERVCWCZoIHZYRweIEnAQEB?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 22 Sep 2016 19:53:43 +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 u8MJp6xh015037; Thu, 22 Sep 2016 15:52:05 -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 u8MJmEpG148185 for ; Thu, 22 Sep 2016 15:48:14 -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 u8MJmDWh014410 for ; Thu, 22 Sep 2016 15:48:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1AsAAAhNORXhyvcVdFeg2sBAQEBAXV8tmmDNQVZHIYCgWxMAQIBAQEBAQITAQEBCA0JCRmFEwEVLgEBNwEvIEUBBQE1IogpoWSBMj4yilaFMAEBBYd+AQsdCBCEF4IQi2QLgwePL4pLhFmBTok/AoFsTocchhSHBogcMYEReYMFgWgxNIcPAQEB X-IPAS-Result: A1AsAAAhNORXhyvcVdFeg2sBAQEBAXV8tmmDNQVZHIYCgWxMAQIBAQEBAQITAQEBCA0JCRmFEwEVLgEBNwEvIEUBBQE1IogpoWSBMj4yilaFMAEBBYd+AQsdCBCEF4IQi2QLgwePL4pLhFmBTok/AoFsTocchhSHBogcMYEReYMFgWgxNIcPAQEB X-IronPort-AV: E=Sophos;i="5.30,379,1470715200"; d="scan'208";a="5723394" 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; 22 Sep 2016 15:48:13 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3A/ZE/ZBG6wfk5u3Bpp/LreJ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ75pMiwAkXT6L1XgUPTWs2DsrQf2rCQ6/yrADBYqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZv?= =?us-ascii?q?IaytQ8iJ3p7xj7z5osGLKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP?= =?us-ascii?q?5Xz247bXianhL7+9vitMU7q3cY6Lod8JtbXKH7ebkoZaBJBzQhdWYu7YvksgeQ?= =?us-ascii?q?YxGI4y42VXoZlVJ0GAHEpEXwWYj+tTfhv+tV1y6dMsn7C7szXGLxvO9QVBb0hX?= =?us-ascii?q?JfZHYC+2bNh5kogQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0EHAQDRNORXhyvcVdFeSAYMgxEBAQEBA?= =?us-ascii?q?XV8tmmDNQUYQRyBeIQKgWxMAQEBAQEBAQECAQIQAQEBCA0JCRkvgjIYCwEiARY?= =?us-ascii?q?LMAEBAQEBAQEBAQEgAg0iFSoBFS4BATcBLyBFAQUBNSKIKaFpgTI+MopWhTABA?= =?us-ascii?q?QWHfgELARwIEIQXghCLZAuDB48vikuEWYFOiT8CgWxOhxyGFIcGiBwxgRF5gwW?= =?us-ascii?q?BaDE0hw8BAQE?= X-IPAS-Result: =?us-ascii?q?A0EHAQDRNORXhyvcVdFeSAYMgxEBAQEBAXV8tmmDNQUYQRy?= =?us-ascii?q?BeIQKgWxMAQEBAQEBAQECAQIQAQEBCA0JCRkvgjIYCwEiARYLMAEBAQEBAQEBA?= =?us-ascii?q?QEgAg0iFSoBFS4BATcBLyBFAQUBNSKIKaFpgTI+MopWhTABAQWHfgELARwIEIQ?= =?us-ascii?q?XghCLZAuDB48vikuEWYFOiT8CgWxOhxyGFIcGiBwxgRF5gwWBaDE0hw8BAQE?= X-IronPort-AV: E=Sophos;i="5.30,379,1470700800"; d="scan'208";a="17882793" Received: from mail-pa0-f43.google.com ([209.85.220.43]) by emsm-gh1-uea10.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 22 Sep 2016 19:48:11 +0000 Received: by mail-pa0-f43.google.com with SMTP id hm5so32269415pac.0 for ; Thu, 22 Sep 2016 12:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=FIiFPqDha+05BA6KR4tze2dFtf2PJDw4pWz+mib5yUg=; b=en+ZE3rYlPJf5L0rejRg2JQ7rpntHjR1VSRFtOhj+kp8ZgsMwNGm7f1kd7sRCDIMBr rFt1zhDfzWE1JtTVX65XA90Epzwu+SCRTWWjFznk6KfxM1CAI0YKxpGuaFrj/w6IGid3 1r73cqMhWhIVwIcCA1yjQHrBDglQh0D/junpui7cOIiJd7hLy8Xh3yrK0T12uLjJFE8c s+OoElVhTYkP4it6EXyG7mY7DepHFXeYPZsKZuV7PuvTqkXX01GUjL+1S60rPY2oS/Cs +2dA1jvFKfSiA4RVKy6qt7dIn3up6OeMjDLkORmuDbezPhpXt1yWWgAkE0XeQZwVgve3 xL0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FIiFPqDha+05BA6KR4tze2dFtf2PJDw4pWz+mib5yUg=; b=QGaEjtS8m91aa2tg/C7T4D1zVkZa1AvDkJ4w+5PBAIPg6g7+yRhEQvwbMzoisN/uV+ 7XsIpf7C+fd5qbGW7RfVT0N3lo1GCflL9qIvwS/evS4FmFbT1X6KtonAISF3tA8zKjvP Aap/JJXvs0ZN9GlK63HiV0zVbNnOwgRiAaAjfFzoyPWUXuonju4r8wgSQ9S6rempjOKc kopfa71XohSxq5r1MX9Lnctkw8hc+7i7/VjROGy7L1SUSNMn7Oc3CtiI/7pHrD8iZrqB u58d1qONNKC82pjY9S6//6Mu9hqrDZJ24kBGoV/BcpV5aBzQbN54ijoNLDLMvaxmxE+1 nlqw== X-Gm-Message-State: AE9vXwO+B68m31Tn99efDJ2FcC2WiGmcDLj63w4T086WY/fjwM6gTYSY1PKMkOa+68ZzRESt X-Received: by 10.66.126.46 with SMTP id mv14mr6129862pab.166.1474573690430; Thu, 22 Sep 2016 12:48:10 -0700 (PDT) Received: from bowgotsai-z840.tpe.corp.google.com ([172.30.210.152]) by smtp.gmail.com with ESMTPSA id f16sm5908237pfd.84.2016.09.22.12.48.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Sep 2016 12:48:09 -0700 (PDT) From: Bowgo Tsai To: selinux@tycho.nsa.gov Subject: [PATCH 1/2] libsepol, checkpolicy: Update Android.mk Date: Fri, 23 Sep 2016 03:48:05 +0800 Message-Id: <1474573685-124428-1-git-send-email-bowgotsai@google.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 X-Mailman-Approved-At: Thu, 22 Sep 2016 15:51:05 -0400 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: Cc: bowgotsai MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP From: bowgotsai --- checkpolicy/Android.mk | 11 ++--------- libsepol/Android.mk | 16 ++++++++-------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/checkpolicy/Android.mk b/checkpolicy/Android.mk index 3b7ff8a..ee2f158 100644 --- a/checkpolicy/Android.mk +++ b/checkpolicy/Android.mk @@ -18,13 +18,6 @@ common_includes := \ $(LOCAL_PATH)/../libsepol/src/ \ ## -# "-x c" forces the lex/yacc files to be compiled as c the build system -# otherwise forces them to be c++. Need to also add an explicit -std because the -# build system will soon default C++ to -std=c++11. -yacc_flags := -x c -std=gnu89 - - -## # checkpolicy # include $(CLEAR_VARS) @@ -32,7 +25,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := checkpolicy LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(common_includes) -LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_CFLAGS := $(common_cflags) LOCAL_SRC_FILES := $(common_src_files) checkpolicy.c LOCAL_STATIC_LIBRARIES := libsepol LOCAL_YACCFLAGS := -v @@ -49,7 +42,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := checkmodule LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(common_includes) -LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_CFLAGS := $(common_cflags) LOCAL_SRC_FILES := $(common_src_files) checkmodule.c LOCAL_STATIC_LIBRARIES := libsepol LOCAL_YACCFLAGS := -v diff --git a/libsepol/Android.mk b/libsepol/Android.mk index 6d89f17..e9cfeef 100644 --- a/libsepol/Android.mk +++ b/libsepol/Android.mk @@ -81,6 +81,7 @@ common_includes := \ # build system will soon default C++ to -std=c++11. yacc_flags := -x c -std=gnu89 + ## # libsepol.so # @@ -88,12 +89,11 @@ include $(CLEAR_VARS) LOCAL_MODULE := libsepol LOCAL_MODULE_TAGS := optional -LOCAL_COPY_HEADERS_TO := sepol -LOCAL_COPY_HEADERS := include/sepol/handle.h include/sepol/policydb.h cil/include/cil/cil.h LOCAL_C_INCLUDES := $(common_includes) -LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_CFLAGS := $(common_cflags) +LOCAL_CPPFLAGS := $(yacc_flags) LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files) -LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_HOST_SHARED_LIBRARY) @@ -105,9 +105,10 @@ include $(CLEAR_VARS) LOCAL_MODULE := libsepol LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(common_includes) -LOCAL_CFLAGS := $(yacc_flags) $(common_cflags) +LOCAL_CFLAGS := $(common_cflags) +LOCAL_CPPFLAGS := $(yacc_flags) LOCAL_SRC_FILES := $(common_src_files) $(cil_src_files) -LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_HOST_STATIC_LIBRARY) @@ -122,7 +123,6 @@ LOCAL_C_INCLUDES := $(common_includes) LOCAL_CFLAGS := $(common_cflags) LOCAL_SRC_FILES := utils/chkcon.c LOCAL_SHARED_LIBRARIES := libsepol -LOCAL_MODULE_CLASS := EXECUTABLES include $(BUILD_HOST_EXECUTABLE) @@ -133,6 +133,6 @@ LOCAL_MODULE_TAGES := optional LOCAL_C_INCLUDES := $(common_includes) LOCAL_CFLAGS := $(common_cflags) LOCAL_SRC_FILES := $(common_src_files) -LOCAL_MODULE_CLASS := STATIC_LIBRARIES +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_STATIC_LIBRARY)