Additional fix for PR 84239.
authorIgor Tsimbalist <igor.v.tsimbalist@intel.com>
Fri, 16 Feb 2018 10:19:14 +0000 (11:19 +0100)
committerIgor Tsimbalist <itsimbal@gcc.gnu.org>
Fri, 16 Feb 2018 10:19:14 +0000 (11:19 +0100)
PR target/84239
* libgcc/config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
Include cetintrin.h not x86intrin.h.

From-SVN: r257730

libgcc/ChangeLog
libgcc/config/i386/shadow-stack-unwind.h

index 692773d7d2db0677e8bbb73faa7fd3ccd1da7134..012c866f1c99f13017e074c22e781a1a558edbeb 100644 (file)
@@ -1,7 +1,13 @@
+2018-02-16  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
+
+       PR target/84239
+       * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
+       Include cetintrin.h not x86intrin.h.
+
 2018-02-08  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
 
        PR target/84239
-       * config/i386/shadow-stack-unwind.hi (_Unwind_Frames_Extra):
+       * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Extra):
        Use new _get_ssp and _inc_ssp intrinsics.
 
 2018-02-02  Julia Koval  <julia.koval@intel.com>
index 416e061dd46d5754661469b9496379060018a4c1..b7c3d98a9dc426611971d678ddeb164b6b1ce1af 100644 (file)
@@ -22,7 +22,14 @@ a copy of the GCC Runtime Library Exception along with this program;
 see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 <http://www.gnu.org/licenses/>.  */
 
-#include <x86intrin.h>
+/* NB: We need _get_ssp and _inc_ssp from <cetintrin.h>.  But we can't
+   include <x86intrin.h> which ends up including <mm_malloc.h>, which
+   includes <stdlib.h> and <errno.h> unconditionally.  But we can't
+   include any libc system headers unconditionally from libgcc.  Avoid
+   including <mm_malloc.h> here by defining _IMMINTRIN_H_INCLUDED.  */
+#define _IMMINTRIN_H_INCLUDED
+#include <cetintrin.h>
+#undef _IMMINTRIN_H_INCLUDED
 
 /* Unwind the shadow stack for EH.  */
 #undef _Unwind_Frames_Extra