svn commit: r340843 - head/libexec/rtld-elf

Conrad Meyer cem at FreeBSD.org
Fri Nov 23 18:23:30 UTC 2018


Author: cem
Date: Fri Nov 23 18:23:29 2018
New Revision: 340843
URL: https://svnweb.freebsd.org/changeset/base/340843

Log:
  rtld: Silence a false positive GCC 6.4.0 warning
  
  The function reloc_non_plt has complicated variable lifetimes that GCC 6.4.0
  (the version currently used by amd64-xtoolchain-gcc) misunderstands and
  produces an erroneous warning about.  Silence it to allow the -Werror build
  to proceed.
  
  Reviewed by:	emaste

Modified:
  head/libexec/rtld-elf/Makefile

Modified: head/libexec/rtld-elf/Makefile
==============================================================================
--- head/libexec/rtld-elf/Makefile	Fri Nov 23 18:15:23 2018	(r340842)
+++ head/libexec/rtld-elf/Makefile	Fri Nov 23 18:23:29 2018	(r340843)
@@ -102,6 +102,10 @@ ${PROG_FULL}:	${VERSION_MAP}
 # GCC warns about redeclarations even though they have __exported
 # and are therefore not identical to the ones from the system headers.
 CFLAGS+=	-Wno-redundant-decls
+# GCC (6.4.0) doesn't grok the complicated lifetimes in reloc_non_plt():
+.if ${MACHINE_CPUARCH} == "amd64"
+CFLAGS.reloc.c+=-Wno-maybe-uninitialized
+.endif
 .if ${COMPILER_VERSION} < 40300
 # Silence -Wshadow false positives in ancient GCC
 CFLAGS+=	-Wno-shadow


More information about the svn-src-all mailing list