From owner-svn-src-head@freebsd.org Tue Mar 28 23:56:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBD29D233C3; Tue, 28 Mar 2017 23:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9CE1BB4; Tue, 28 Mar 2017 23:56:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SNu25Q057037; Tue, 28 Mar 2017 23:56:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SNu2Hv057034; Tue, 28 Mar 2017 23:56:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703282356.v2SNu2Hv057034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 28 Mar 2017 23:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316119 - in head/sys/boot: arm/uboot efi/boot1 efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 23:56:04 -0000 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