From: Eric Sunshine <sunshine@sunshineco.com>
To: git@vger.kernel.org
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH] config.mak.uname: resolve FreeBSD iconv-related compilation warning
Date: Fri, 31 Aug 2018 04:33:42 -0400 [thread overview]
Message-ID: <20180831083342.34836-1-sunshine@sunshineco.com> (raw)
In-Reply-To: <20180805075736.GF44140@aiede.svl.corp.google.com>
From: Jonathan Nieder <jrnieder@gmail.com>
OLD_ICONV has long been needed by FreeBSD so config.mak.uname defines
it unconditionally. However, recent versions do not need it, and its
presence results in compilation warnings. Resolve this issue by defining
OLD_ICONV only for older FreeBSD versions.
Specifically, revision r281550[1], which is part of FreeBSD 11, removed
the need for OLD_ICONV, and r282275[2] back-ported that change to 10.2.
Versions prior to 10.2 do need it.
[1] https://github.com/freebsd/freebsd/commit/b0813ee288f64f677a2cebf7815754b027a8215b
[2] https://github.com/freebsd/freebsd/commit/b709ec868adb5170d09bc5a66b18d0e0d5987ab6
[es: commit message; tweak version check to distinguish 10.x versions]
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
This is a follow-up to [1] which encapsulates Jonathan's proposed change
as a proper patch. I made Jonathan as the author since he did all the
hard research and formulated the core of the change (whereas I only
reported the issue and extended the version check to correctly handle
FreeBSD 10.0 and 10.1). Jonathan's sign-off comes from [1].
[1]: https://public-inbox.org/git/20180805075736.GF44140@aiede.svl.corp.google.com/
config.mak.uname | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.mak.uname b/config.mak.uname
index 2be2f19811..e47af72e01 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -192,7 +192,17 @@ ifeq ($(uname_O),Cygwin)
endif
ifeq ($(uname_S),FreeBSD)
NEEDS_LIBICONV = YesPlease
- OLD_ICONV = YesPlease
+ # Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't.
+ # A typical version string looks like "10.2-RELEASE".
+ ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2)
+ OLD_ICONV = YesPlease
+ endif
+ ifeq ($(firstword $(subst -, ,$(uname_R))),10.0)
+ OLD_ICONV = YesPlease
+ endif
+ ifeq ($(firstword $(subst -, ,$(uname_R))),10.1)
+ OLD_ICONV = YesPlease
+ endif
NO_MEMMEM = YesPlease
BASIC_CFLAGS += -I/usr/local/include
BASIC_LDFLAGS += -L/usr/local/lib
--
2.19.0.rc1.352.gb1634b371d
next prev parent reply other threads:[~2018-08-31 8:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-04 2:00 [PATCH] Makefile: enable DEVELOPER by default Stefan Beller
2018-08-04 2:02 ` Stefan Beller
2018-08-04 6:09 ` Jonathan Nieder
2018-08-04 6:38 ` Duy Nguyen
2018-08-04 17:19 ` Junio C Hamano
2018-08-06 16:40 ` Ævar Arnfjörð Bjarmason
2018-08-06 17:02 ` Jeff King
2018-08-06 17:04 ` Randall S. Becker
2018-08-06 17:11 ` Jonathan Nieder
2018-08-06 18:59 ` Jeff King
2018-08-06 17:39 ` Ævar Arnfjörð Bjarmason
2018-08-06 18:38 ` Stefan Beller
2018-08-06 17:02 ` Randall S. Becker
2018-08-06 17:41 ` Ævar Arnfjörð Bjarmason
2018-08-06 19:20 ` Randall S. Becker
2018-09-01 21:01 ` Kaartic Sivaraam
2018-08-05 2:42 ` Eric Sunshine
2018-08-05 3:17 ` Jonathan Nieder
2018-08-05 3:33 ` Eric Sunshine
2018-08-05 4:58 ` Eric Sunshine
2018-08-05 7:57 ` Jonathan Nieder
2018-08-31 8:33 ` Eric Sunshine [this message]
2018-08-31 11:54 ` [PATCH] config.mak.uname: resolve FreeBSD iconv-related compilation warning Ævar Arnfjörð Bjarmason
2018-08-31 18:31 ` Eric Sunshine
2018-08-31 17:00 ` Jonathan Nieder
2018-08-31 20:59 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180831083342.34836-1-sunshine@sunshineco.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).