Bug 217005

Summary: net/ipxe: fails to build with lang/gcc6 or later
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: gerald, tobik
Priority: --- Keywords: needs-patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 219275    
Attachments:
Description Flags
ipxe.diff tobik: maintainer-approval+

Description Jan Beich freebsd_committer freebsd_triage 2017-02-11 19:25:15 UTC
In file included from drivers/net/davicom.c:47:0:
drivers/net/davicom.c:700:45: error: 'davicom_driver_text' defined but not used [-Werror=unused-const-variable=]
 DRIVER ( "DAVICOM", nic_driver, pci_driver, davicom_driver,
                                             ^
include/nic.h:212:20: note: in definition of macro 'DRIVER'
  static const char _name ## _text[] = _name_text;    \
                    ^~~~~

gcc6 build log: http://sprunge.us/QeAa
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2017-02-11 19:29:10 UTC
-Werror may not be a good idea for this port (not the least since GCC 7
is going to add many more new warnings).
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2017-02-11 20:06:29 UTC
Created attachment 179881 [details]
ipxe.diff

The ipxe update in bug #216329 builds fine with gcc6 with -Werror.  Can't speak for gcc7 though.

But I'm fine with not using -Werror for this port.  Adding NO_WERROR=1 to MAKE_FLAGS should do it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-02-11 20:53:41 UTC
A commit references this bug:

Author: jbeich
Date: Sat Feb 11 20:52:24 UTC 2017
New revision: 433912
URL: https://svnweb.freebsd.org/changeset/ports/433912

Log:
  net/ipxe: verbose build and unbreak with gcc6 or later

  PR:		217005
  Submitted by:	Tobias Kortkamp <t@tobik.me> (maintainer)

Changes:
  head/net/ipxe/Makefile
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-02-11 21:00:02 UTC
Thanks. Landed. Builds fine with lang/gcc7-devel as well.