From patchwork Mon Jul 16 22:59:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 28426 Received: (qmail 121640 invoked by alias); 16 Jul 2018 23:00:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 121419 invoked by uid 89); 16 Jul 2018 23:00:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM autolearn=ham version=3.3.2 spammy= X-HELO: mga17.intel.com Date: Mon, 16 Jul 2018 15:59:54 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] x86: Always include /cet-tunables.h> for --enable-cet Message-ID: <20180716225954.GA28377@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.0 (2018-05-17) Always include and cet-tunables.h> when CET is enabled. Otherwise, configure glibc with --enable-cet --disable-tunables will fail to build. OK for master? H.J. --- * sysdeps/x86/cpu-features.c: Always include and cet-tunables.h> when CET is enabled. --- sysdeps/x86/cpu-features.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 0627f145e0..8108256c42 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -30,8 +30,6 @@ extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *) attribute_hidden; # if CET_ENABLED -# include -# include extern void TUNABLE_CALLBACK (set_x86_ibt) (tunable_val_t *) attribute_hidden; extern void TUNABLE_CALLBACK (set_x86_shstk) (tunable_val_t *) @@ -39,6 +37,11 @@ extern void TUNABLE_CALLBACK (set_x86_shstk) (tunable_val_t *) # endif #endif +#if CET_ENABLED +# include +# include +#endif + static void get_common_indeces (struct cpu_features *cpu_features, unsigned int *family, unsigned int *model,