Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487) [committed]
Commit Message
* Joseph Myers:
> On Thu, 13 Feb 2020, Florian Weimer wrote:
>
>> Thanks for fixing this. Unfortunately, the test doesn't build on ia64
>> because GCC does not support -fstack-protector-all there:
>>
>> cc1: error: ‘-fstack-protector’ not supported for this target [-Werror]
>> cc1: all warnings being treated as errors
>> make[3]: *** [/mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-gnu/glibc/sysd-rules:639: /mnt/scratch1/fw/bmg/default/build/glibcs/ia64-linux-gnu/glibc/math/test-sinl-pseudo.o] Error 1
>
> It looks like ifeq ($(have-ssp),yes) will be needed around that CFLAGS
> setting. (I took the unconditional CFLAGS setting from where such a
> setting is used in debug/Makefile, but I see that in fact the addition of
> the test there is conditional. In this case, the test is appropriate
> unconditionally, it's just the use of -fstack-protector-all that needs to
> be conditional.)
This patch seems to fix the build. Okay to install?
Subject: math/test-sinl-pseudo: Use stack protector only if available
This fixes commit 9333498794cde1d5cca518badf79533a24114b6f ("Avoid
ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).").
Comments
On Thu, 13 Feb 2020, Florian Weimer wrote:
> This patch seems to fix the build. Okay to install?
>
> Subject: math/test-sinl-pseudo: Use stack protector only if available
>
> This fixes commit 9333498794cde1d5cca518badf79533a24114b6f ("Avoid
> ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487).").
OK.
@@ -18,5 +18,7 @@
ifeq ($(subdir),math)
tests += test-canonical-ldbl-96 test-totalorderl-ldbl-96 test-sinl-pseudo
+ifeq ($(have-ssp),yes)
CFLAGS-test-sinl-pseudo.c += -fstack-protector-all
-endif
+endif
+endif # $(subdir) == math