svn commit: r316119 - in head/sys/boot: arm/uboot efi/boot1 efi/loader

Ngie Cooper ngie at FreeBSD.org
Tue Mar 28 23:56:04 UTC 2017


Author: ngie
Date: Tue Mar 28 23:56:02 2017
New Revision: 316119
URL: https://svnweb.freebsd.org/changeset/base/316119

Log:
  self_reloc.c: Pass -Wno-error=maybe-uninitialized to gcc versions greater than 4.2.1
  
  self_reloc.c doesn't initialize `rel` in all cases in the C code, however, the value
  might be initialized properly on the stack in the assembly code.
  
  For right now (because this doesn't seem to be breaking anything and my initializing
  the stack value could break something since it's called from assembly code) disable
  the warning for self_reloc.c. More investigation should be done to determine the
  appropriate response to this warning (either intialize the value or find a smarter
  way to deal with the warning).
  
  A long MFC timeout is being set for this change to allow a better solution for the
  issue to be developed in that time period.
  
  MFC after:	2 months
  Reported by:	Jenkins (FreeBSD-head-amd64-gcc job)
  Tested with:	amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/efi/boot1/Makefile
  head/sys/boot/efi/loader/Makefile

Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile	Tue Mar 28 23:39:11 2017	(r316118)
+++ head/sys/boot/arm/uboot/Makefile	Tue Mar 28 23:56:02 2017	(r316119)
@@ -15,6 +15,10 @@ UBLDR_LOADADDR?=	0x1000000
 # Architecture-specific loader code
 SRCS=		start.S conf.c self_reloc.c vers.c
 
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
+CWARNFLAGS.self_reloc.c+=	-Wno-error=maybe-uninitialized
+.endif
+
 .if !defined(LOADER_NO_DISK_SUPPORT)
 LOADER_DISK_SUPPORT?=	yes
 .else

Modified: head/sys/boot/efi/boot1/Makefile
==============================================================================
--- head/sys/boot/efi/boot1/Makefile	Tue Mar 28 23:39:11 2017	(r316118)
+++ head/sys/boot/efi/boot1/Makefile	Tue Mar 28 23:56:02 2017	(r316119)
@@ -37,6 +37,10 @@ CFLAGS+=	-DSKEIN_LOOP=111
 .PATH:		${.CURDIR}/../../../crypto/skein
 .endif
 
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
+CWARNFLAGS.self_reloc.c+=	-Wno-error=maybe-uninitialized
+.endif
+
 CFLAGS+=	-I.
 CFLAGS+=	-I${.CURDIR}/../include
 CFLAGS+=	-I${.CURDIR}/../include/${MACHINE}

Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile	Tue Mar 28 23:39:11 2017	(r316118)
+++ head/sys/boot/efi/loader/Makefile	Tue Mar 28 23:56:02 2017	(r316119)
@@ -35,6 +35,10 @@ CWARNFLAGS.zfs.c+=	-Wno-array-bounds
 CWARNFLAGS.zfs.c+=	-Wno-missing-prototypes
 .endif
 
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
+CWARNFLAGS.self_reloc.c+=	-Wno-error=maybe-uninitialized
+.endif
+
 # We implement a slightly non-standard %S in that it always takes a
 # CHAR16 that's common in UEFI-land instead of a wchar_t. This only
 # seems to matter on arm64 where wchar_t defaults to an int instead


More information about the svn-src-head mailing list