about summary refs log tree commit diff
path: root/sysdeps/generic/math_private.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-01-01 07:55:18 -0800
committerH.J. Lu <hjl.tools@gmail.com>2024-01-01 15:53:52 -0800
commitb5dcccfb12385ee492eb074f6beb9ead56b5e5fd (patch)
tree8938cf9d7869284e0095c9e57e8f1762ff780031 /sysdeps/generic/math_private.h
parent6ac0e019098252cd6378d4ca2e1e3c0174d4806d (diff)
downloadglibc-b5dcccfb12385ee492eb074f6beb9ead56b5e5fd.tar.gz
glibc-b5dcccfb12385ee492eb074f6beb9ead56b5e5fd.tar.xz
glibc-b5dcccfb12385ee492eb074f6beb9ead56b5e5fd.zip
x86/cet: Add -fcf-protection=none before -fcf-protection=branch
When shadow stack is enabled, some CET tests failed when compiled with
GCC 14:

FAIL: elf/tst-cet-legacy-4
FAIL: elf/tst-cet-legacy-5a
FAIL: elf/tst-cet-legacy-6a

which are caused by

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113039

These tests use -fcf-protection -fcf-protection=branch and assume that
-fcf-protection=branch will override -fcf-protection.  But this GCC 14
commit:

https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=1c6231c05bdcca

changed the -fcf-protection behavior such that

-fcf-protection -fcf-protection=branch

is treated the same as

-fcf-protection

Use

-fcf-protection -fcf-protection=none -fcf-protection=branch

as the workaround.  This fixes BZ #31187.

Tested with GCC 13 and GCC 14 on Intel Tiger Lake.
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps/generic/math_private.h')
0 files changed, 0 insertions, 0 deletions