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
NRNathan Royce <nroycea+kernel@gmail.com>
Date
Jul 10, 2024, 08:21 UTC
Message-ID
<CALaQ_hrhZ7qr2D+2q5ygQYG+M8=feMiYJYyuN7C+7b7gdkCZ=g@mail.gmail.com>
In-Reply-To
<Zo3-FVT5EFyKsdGc@danh.dev>

On Tue, Jul 9, 2024 at 10:20 PM Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:

Show 26 quoted lines
>
> 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

(noted the "top-most" comment earlier, I didn't realize that was a thing. Even "ticket/issue" emails always say "Don't write *below* this line")

Danh, I was referring to the "--' parameters that is common amongst most of the configure/make-based projects. While I believe I had already had a "config.auto.mak" file generated, it didn't appear that I could do OOT builds with it. If perhaps there was some var I could pass into "make" where I could point to the file, that'd be good (though I'd still question whether that would even be enough to get OOT builds).

Someone on the IRC channel pointed out to me that there IS a CMakeLists.txt file and I found it is included in "contrib/buildsystems". Awesome, right? So I thought and hoped... Before I get into it, it might be nice to have that mentioned in INSTALL/README.

While that gets me the OOT builds, it seems it forces the use of pcre2, even when it isn't installed in sysroot. If it's installed in the build system, it'll find it there and say things are good to go even though the actual "make" will fail because of it. "configure" defaults pcre2 to "no", so it builds fine (apart from not being OOT and other stuff I have to do).

Getting closer (after manually commenting that USE_PCRE2 stuff in the file (which I also don't like since source is no longer pristine), though I just now got: ***** ... [ 76%] Built target scalar make[2]: *** No rule to make target 'git-remote-http', needed by 'git-add'. Stop. ***** so I'll have to peek as to what that's about.

Previous: Đoàn Trần Công DanhNext: Junio C Hamano
Message 7 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.