From: H.J. Lu Date: Sat, 16 Jan 2021 01:27:53 +0000 (-0800) Subject: libstdc++-v3: Add -fcf-protection=none to -march=i486 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c356f221bbab29bf4d1626d161e0f584dddd600;p=gcc.git libstdc++-v3: Add -fcf-protection=none to -march=i486 -fcf-protection is automatically enabled in libstdc++ on Linux/x86. Starting from commit 77d372abec0fbf2cfe922e3140ee3410248f979e Author: H.J. Lu Date: Thu Jan 14 05:56:46 2021 -0800 x86: Error on -fcf-protection with incompatible target GCC issues an error on -fcf-protection with incompatible target: ... -fcf-protection ... libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc -m32 -O2 -g0 -fno-exceptions -fno-asynchronous-unwind-tables -march=i486 ... cc1plus: error: '-fcf-protection' is not compatible with this target FAIL: 29_atomics/atomic_flag/test_and_set/explicit-hle.cc (test for excess errors) Add -fcf-protection=none to -march=i486 to compile explicit-hle.cc. * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Add -fcf-protection=none to -march=i486. --- diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc index 0fd81709688..8ec46283208 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc @@ -1,6 +1,6 @@ // { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "-O2 -g0 -fno-exceptions -fno-asynchronous-unwind-tables" } -// { dg-additional-options "-march=i486" { target ia32 } } +// { dg-additional-options "-march=i486 -fcf-protection=none" { target ia32 } } // { dg-require-effective-target c++11 } // { dg-skip-if "scans fail with LTO" { lto } { "-flto" } } // { dg-final { scan-assembler-times "xacquire\|\.byte\[^\n\r]*0xf2" 14 } }