Based on the following commit, but modified for rhel-7.9. commit c10acd40262486dac597001aecc20ad9d3bd0e4a Author: Florian Weimer Date: Thu Feb 13 17:01:15 2020 +0100 math/test-sinl-pseudo: Use stack protector only if available This fixes commit 9333498794cde1d5cca518bad ("Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487)."). diff -urN a/sysdeps/ieee754/ldbl-96/Makefile b/sysdeps/ieee754/ldbl-96/Makefile --- a/sysdeps/ieee754/ldbl-96/Makefile 2021-01-06 20:55:49.163141757 -0500 +++ b/sysdeps/ieee754/ldbl-96/Makefile 2021-01-06 20:58:06.612989216 -0500 @@ -18,5 +18,7 @@ ifeq ($(subdir),math) tests += test-sinl-pseudo +ifeq ($(have-ssp),yes) CFLAGS-test-sinl-pseudo.c += -fstack-protector-all endif +endif # $(subdir) == math