aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-09-08 05:54:56 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-09-09 10:37:54 -0700
commitc6632dc9a8ee77ad66a8d62d736a9112de9e41c7 (patch)
treeb6fa9524be9d951c788d14388f2ceed6c6754cef /libphobos/libdruntime
parent7b9c26519e6aa07a0709c5c6fcc2b9a6ba050e7a (diff)
downloadgcc-c6632dc9a8ee77ad66a8d62d736a9112de9e41c7.zip
gcc-c6632dc9a8ee77ad66a8d62d736a9112de9e41c7.tar.gz
gcc-c6632dc9a8ee77ad66a8d62d736a9112de9e41c7.tar.bz2
libphobos: Include <cet.h> to generate the CET marker for -fcf-protection
Include <cet.h> to generate the CET marker for -fcf-protection to avoid /bin/ld: ../libdruntime/.libs/libgdruntime_convenience.a(libgdruntime_convenience_la-switchcontext.o): error: missing IBT and SHSTK properties when -z cet-report=error is passed to the linker to create libgphobos.so and libgdruntime.so. PR d/95680 * libdruntime/config/x86/switchcontext.S: Include <cet.h> to generate the CET marker for -fcf-protection.
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/config/x86/switchcontext.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/libphobos/libdruntime/config/x86/switchcontext.S b/libphobos/libdruntime/config/x86/switchcontext.S
index 85f2e00..f2f8efa 100644
--- a/libphobos/libdruntime/config/x86/switchcontext.S
+++ b/libphobos/libdruntime/config/x86/switchcontext.S
@@ -24,6 +24,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "../common/threadasm.S"
+/* NB: Generate the CET marker for -fcf-protection. */
+#ifdef __CET__
+# include <cet.h>
+#endif
+
#if defined(__i386__) && !defined(__CET__)
.text