glibc/glibc-gcc-strict-overflow.patch
Carlos O'Donell ad7685d113 glibc-2.24.90-31
- Fix builds with GCC 7.0.
2017-02-08 16:17:57 -05:00

38 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Builds with gcc 7.0 fail with:
../test-skeleton.c: In function legacy_test_function:
cc1: error: assuming signed overflow does not occur when \
assuming that (X - c) <= X is always true [-Werror=strict-overflow]
Ignoring this warning until the test or compiler is adjusted.
Disabled with -Wno-strict-overflow. Attempted -Wstrict-overflow=1,
but it still results in the same warning.
Index: glibc-2.24-661-g5653ab1/string/Makefile
===================================================================
--- glibc-2.24-661-g5653ab1.orig/string/Makefile
+++ glibc-2.24-661-g5653ab1/string/Makefile
@@ -71,7 +71,9 @@ include ../Rules
CFLAGS-inl-tester.c = -fno-builtin
CFLAGS-noinl-tester.c = -fno-builtin
CFLAGS-tst-strlen.c = -fno-builtin
-CFLAGS-stratcliff.c = -fno-builtin
+# Added '-Wno-strict-overflow' for gcc 7.0 until the test or compiler
+# is adjusted.
+CFLAGS-stratcliff.c = -fno-builtin -Wno-strict-overflow
CFLAGS-test-ffs.c = -fno-builtin
CFLAGS-tst-inlcall.c = -fno-builtin
CFLAGS-tst-xbzero-opt.c = -O3
Index: glibc-2.24-661-g5653ab1/wcsmbs/Makefile
===================================================================
--- glibc-2.24-661-g5653ab1.orig/wcsmbs/Makefile
+++ glibc-2.24-661-g5653ab1/wcsmbs/Makefile
@@ -102,3 +102,7 @@ CPPFLAGS += $(libio-mtsafe)
CPPFLAGS-wcstold_l.c = -I../stdlib
$(objpfx)tst-wcstod-nan-locale: $(libm)
+
+# Added '-Wno-strict-overflow' for gcc 7.0 until the test or compiler
+# is adjusted.
+CFLAGS-wcsatcliff.c = -Wno-strict-overflow