- Add some -Wno-error flags for gcc-8 compatibility.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=181
This commit is contained in:
parent
128b6e2e21
commit
45cbf065f2
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 27 14:01:27 UTC 2018 - matz@suse.com
|
||||
|
||||
- Add some -Wno-error flags for gcc-8 compatibility.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 9 16:27:10 UTC 2018 - matz@suse.com
|
||||
|
||||
|
20
gdb.spec
20
gdb.spec
@ -590,11 +590,21 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
# warn about unknown -Wno- flags, _except_ if there are other
|
||||
# diagnostics as well, so let's force an uninitialized use warning
|
||||
# and grep for the diagnostic about the -Wno flag:
|
||||
if ! echo "int foo(void) { int a; return a;} " | \
|
||||
$CC -x c -c - -o /dev/null -W -Wno-implicit-fallthrough 2>&1 | \
|
||||
grep Wno-implici >/dev/null; then
|
||||
CFLAGS="$CFLAGS -Wno-implicit-fallthrough"
|
||||
fi
|
||||
# -Wno-error=cast-function-type:
|
||||
# FIXME: gcc-8.0:
|
||||
# ./elf32-target.h:215:4: error: cast between incompatible function types from 'void * (*)(bfd *)' {aka 'void * (*)(struct bfd *)'} to 'asymbol * (*)(bfd *, void *, long unsigned int)' {aka 'struct bfd_symbol * (*)(struc t bfd *, void *, long unsigned int)'} [-Werror=cast-function-type]
|
||||
# ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr)
|
||||
# -Wno-error=stringop-truncation:
|
||||
# FIXME: gcc-8.0:
|
||||
# linux-tdep.c:1767:11: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 17 equals destination size [-Werror=stringop-truncation]
|
||||
# strncpy (p->pr_fname, basename, sizeof (p->pr_fname));
|
||||
for opt in -Wno-implicit-fallthrough -Wno-error=cast-function-type -Wno-error=stringop-truncation; do
|
||||
if ! echo "int foo(void) { int a; return a;} " | \
|
||||
$CC -x c -c - -o /dev/null -W ${opt} 2>&1 | \
|
||||
grep Wno >/dev/null; then
|
||||
CFLAGS="$CFLAGS ${opt}"
|
||||
fi
|
||||
done
|
||||
%if %{have_libipt}
|
||||
CFLAGS="$CFLAGS -DPERF_ATTR_SIZE_VER5_BUNDLE"
|
||||
(
|
||||
|
Loading…
x
Reference in New Issue
Block a user