diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-09-08 05:54:56 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-09-09 10:37:54 -0700 |
commit | c6632dc9a8ee77ad66a8d62d736a9112de9e41c7 (patch) | |
tree | b6fa9524be9d951c788d14388f2ceed6c6754cef /libphobos | |
parent | 7b9c26519e6aa07a0709c5c6fcc2b9a6ba050e7a (diff) | |
download | gcc-c6632dc9a8ee77ad66a8d62d736a9112de9e41c7.tar.gz |
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')
-rw-r--r-- | libphobos/libdruntime/config/x86/switchcontext.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libphobos/libdruntime/config/x86/switchcontext.S b/libphobos/libdruntime/config/x86/switchcontext.S index 85f2e00d186..f2f8efa218e 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 |