Re: [PATCH 2/3] configure.ac: define ICONV_OMITS_BOM if necessary
- From
Danh Doan <congdanhqx@gmail.com>
- Date
- Nov 1, 2019, 01:40 UTC
- Message-ID
- <20191101014006.GE30350@danh.dev>
- In-Reply-To
- <20191031181116.GC2133@sigill.intra.peff.net>
On 2019-10-31 14:11:16 -0400, Jeff King wrote:
Show 9 quoted lines
> The ICONV_OMITS_BOM flag is about the libc iconv that Git will be linked > against. But this is checking the iconv tool. For a system that is using > musl across the board, that would work. But it might not always be the > case (in particular, I don't know if people statically link some > binaries against musl; certainly I've seen people do it with dietlibc). > > I think we should be test-compiling a small program, similar to the way > OLD_ICONV works (though I guess we may even need to run the result to > see what happens).
Originally, I wrote a C program for AC_RUN_IFELSE, but I found out the complicated of OLD_ICONV and NEEDS_LIBICONV, then I switch to this approach.
But, your reasoning makes sense. I think people could build a static-linked git binary for a clean-room build system.
I'll pursue the C program in the re-roll.
-- Danh