From: H.J. Lu Date: Tue, 8 Sep 2020 12:54:56 +0000 (-0700) Subject: libphobos: Include to generate the CET marker for -fcf-protection X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6632dc9a8ee77ad66a8d62d736a9112de9e41c7;p=gcc.git libphobos: Include to generate the CET marker for -fcf-protection Include 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 to generate the CET marker for -fcf-protection. --- 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 +#endif + #if defined(__i386__) && !defined(__CET__) .text