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.
#include "../common/threadasm.S"
+/* NB: Generate the CET marker for -fcf-protection. */
+#ifdef __CET__
+# include <cet.h>
+#endif
+
#if defined(__i386__) && !defined(__CET__)
.text