Created attachment 147710 [details] Add Apple's gperf enhancements There are a couple of enhancements under the GPLv2 available on Apple's site: http://opensource.apple.com/source/gperf/gperf-9/patches/ This may be useful as they took our libc and we took their compilers ;). At least the offsetof patch is applied in our src tree (the size_type patch was there too but it introduced a warning) but gperf is likely to disappear from base soon. We pass the new tests.
Auto-assigned to maintainer dinoex@FreeBSD.org
Please specifiy the LICENSE of this patch .... DO you haver any source URL?
(In reply to Dirk Meyer from comment #2) > Please specifiy the LICENSE of this patch .... > DO you have any source URL? Yes, this is Apple's gperf distribution and they use GPLv2 look one step up in the directory where the patches are: http://opensource.apple.com/source/gperf/gperf-9/ COPYING: GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ... ___ (AFAICT Apple doesn't ship any code under GPLv3.)
with patches allpied, I get a few more warnings nows: < ./output.cc:1304:22: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] --- > ./output.cc:782:11: warning: format string is empty [-Wformat-zero-length] > "", option.get_size_type()); > ^~ > ./output.cc:1302:22: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] 178c182,185 < 1 warning generated. --- > ./output.cc:1910:11: warning: format string is empty [-Wformat-zero-length] > "", option.get_size_type()); > ^~ > 3 warnings generated. it looks not right to call: printf ( "", option.get_size_type());
(In reply to Dirk Meyer from comment #4) > with patches allpied, I get a few more warnings nows: > > < ./output.cc:1304:22: warning: format specifies type 'int' but the argument > has type 'long' [-Wformat] > --- > > ./output.cc:782:11: warning: format string is empty [-Wformat-zero-length] > > "", option.get_size_type()); > > ^~ > > ./output.cc:1302:22: warning: format specifies type 'int' but the argument has type 'long' [-Wformat] > 178c182,185 > < 1 warning generated. > --- > > ./output.cc:1910:11: warning: format string is empty [-Wformat-zero-length] > > "", option.get_size_type()); > > ^~ > > 3 warnings generated. > > it looks not right to call: > printf ( "", option.get_size_type()); Known non-issue: https://lists.freebsd.org/pipermail/svn-src-head/2013-November/053509.html The compiler is clueless, if not buggy. You can either ignore it (-Wno-format-zero-length) or just don't apply patch-size_type
A commit references this bug: Author: dinoex Date: Sun Oct 19 11:23:48 UTC 2014 New revision: 371177 URL: https://svnweb.freebsd.org/changeset/ports/371177 Log: - Add Apple's gperf enhancements (GPLv2) PR: 193964 Submitted by: Pedro F. Giffuni Obtained from: http://opensource.apple.com/source/gperf/gperf-9/patches/ Changes: head/devel/gperf/Makefile head/devel/gperf/files/ head/devel/gperf/files/patch-offsetof head/devel/gperf/files/patch-size_type
Thanks for the clarification. I added both patches with minor cleanups.
For historic purposes, and because there is no other place where it would be relevant, upstream gperf has alternative fixes (GPLv3) for the same issues: http://lists.gnu.org/archive/html/bug-gperf/2016-11/msg00009.html