]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86: Always include <dl-cet.h>/cet-tunables.h> for --enable-cet
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Jul 2018 11:16:19 +0000 (04:16 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 17 Jul 2018 11:16:35 +0000 (04:16 -0700)
Always include <dl-cet.h> and cet-tunables.h> when CET is enabled.
Otherwise, configure glibc with --enable-cet --disable-tunables will
fail to build.

* sysdeps/x86/cpu-features.c: Always include <dl-cet.h> and
cet-tunables.h> when CET is enabled.

ChangeLog
sysdeps/x86/cpu-features.c

index 05d05f7d410f8cf3de84a18169e3d8f1fc1d31e1..cd86d86ab20687328cf45ca6138bcc564bac4249 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/x86/cpu-features.c: Always include <dl-cet.h> and
+       cet-tunables.h> when CET is enabled.
+
 2018-07-16  H.J. Lu  <hongjiu.lu@intel.com>
 
         [BZ #21598]
index 0627f145e050e37373cfac2f45d49909fb2b7d68..8108256c4278a44bb1cfa103ad39e74c41712554 100644 (file)
@@ -30,8 +30,6 @@ extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *)
   attribute_hidden;
 
 # if CET_ENABLED
-#  include <dl-cet.h>
-#  include <cet-tunables.h>
 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 <dl-cet.h>
+# include <cet-tunables.h>
+#endif
+
 static void
 get_common_indeces (struct cpu_features *cpu_features,
                    unsigned int *family, unsigned int *model,