Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"
- From
Mahmoud Al-Qudsi <mqudsi@neosmart.net>
- Date
- Jun 15, 2018, 08:15 UTC
- Message-ID
- <CACcTrKcocbznJZc7PL_6Ld_Rbm9mu3iaUf1R_G6MWaQf2LbC=Q@mail.gmail.com>
- In-Reply-To
- <20180615022503.34111-1-sunshine@sunshineco.com>
On Thu, Jun 14, 2018 at 9:25 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 19 quoted lines
> The Makefile tweak NO_ICONV is meant to allow Git to be built without > iconv in case iconv is not installed or is otherwise dysfunctional. > However, NO_ICONV's disabling of iconv is incomplete and can incorrectly > allow "-liconv" to slip into the linker flags when NEEDS_LIBICONV is > defined, which breaks the build when iconv is not installed. > > On some platforms, iconv lives directly in libc, whereas, on others it > resides in libiconv. For the latter case, NEEDS_LIBICONV instructs the > Makefile to add "-liconv" to the linker flags. config.mak.uname > automatically defines NEEDS_LIBICONV for platforms which require it. > The adding of "-liconv" is done unconditionally, despite NO_ICONV. > > Work around this problem by making NO_ICONV take precedence over > NEEDS_LIBICONV. > > Reported by: Mahmoud Al-Qudsi <mqudsi@neosmart.net> > Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> > --- > ...
Thanks, Eric. I can confirm that on a clean FreeBSD 12 installation with libiconv and with this patch applied, git builds and installs from source (though other dependencies are obviously needed).
Mahmoud Al-Qudsi NeoSmart Technologies