forked from rpms/glibc
ad7685d113
- Fix builds with GCC 7.0.
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
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
|