git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: FR: Provide Out-Of-Tree Building; Provide Cross-Compile Parameters

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Jul 10, 2024, 03:20 UTC
Message-ID
<Zo3-FVT5EFyKsdGc@danh.dev>
In-Reply-To
<xmqqjzhvejye.fsf@gitster.g>
On 2024-07-08 12:56:41-0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> 
> >> I'd still suggest and prefer that git (and zlib) follows what others
> >> have settled on doing to be cross-compile-friendly.
> >
> > I can't speak for the zlib project, but for this to happen in Git,
> > someone with an interest in seeing such an outcome will need to submit
> > patches.
> 
> Sure.  
> 
> Somebody unknown to the community suddenly coming here and
> suggesting a feature alone would not achieve anything.  If there
> were infinite engineering resources and motivated contributors, and
> if sufficient number of contributors thought something is worth
> doing, it would already have been done.  And "cross compilation" is
> one of the things that is so obvious "isn't it nice if we had..."
> items.  At least the offer has to be a bit more, like "I'll help in
> this and that area (e.g., organizing the effort, keeping track of
> progress, researching dependencies, ...).  Any others who want to
> join forces?"

I thought in Git project, Makefile is the official build system, and the autotools build system is only an after-thought, no?

For cross-compilation, I think various project has been cross-compiling Git from forever. They only need to provide a file named `config.mak' with proper information for that platform, e.g:

	cat <<-EOF
	prefix = /usr
	CC = $CC
	CFLAGS = $CFLAGS
	LDFLAGS = $LDFLAGS
	USE_LIBPCRE2 := $(if true; then echo Yes; fi)
	perllibdir=/usr/share/perl5/vendor_perl
	HOST_CPU = $(config.guess | cut -d- -f1)
	ICONV_OMITS_BOM = Yes
	NO_REGEX = Yes
	EOF

Those last values need to be specified manually because they can't be detected by running a test program anyway. Those keys are already listed in Makefile.

-- 
Danh
Previous: Junio C HamanoNext: Nathan Royce
Message 6 of 8 in “FR: Provide Out-Of-Tree Building; Provide Cross-Compile Parameters”
  1. Nathan RoyceJul 8, 2024
  2. Eric SunshineJul 8, 2024
  3. Nathan RoyceJul 8, 2024
  4. Eric SunshineJul 8, 2024
  5. Junio C HamanoJul 8, 2024
  6. Đoàn Trần Công DanhJul 10, 2024
  7. Nathan RoyceJul 10, 2024
  8. Junio C HamanoJul 10, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.