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
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 8, 2024, 16:52 UTC
Message-ID
<CAPig+cSB0d7aAwMpToLCa+6Be5JFqLAr+0pvBXQxg_=DEk7p2A@mail.gmail.com>
In-Reply-To
<CALaQ_hoDqD6CXEDy0YT8no3SaoJSqV6toMtyRHdJr6h3RZUiLA@mail.gmail.com>
On Mon, Jul 8, 2024 at 12:38 PM Nathan Royce <nroycea+kernel@gmail.com> wrote:
Show 15 quoted lines
> For projects I built, up to the git project (think LFS steps
> (altered)), they've all provided OOT builds so the source directory
> remains pristine (albeit those that needed autoconf to be run for
> `configure` generation).
>
> They've also all provided `--{build,host,target,with-sysroot}=`
> parameters for ease of cross-compiling.
>
> Looking at what the git project offers, and I'm not seeing either features.
>
> Looking at the Makefile, I see mention of `HOST_CPU` which looks
> pertinent, but being able to point to the path of the target root for
> files to link is important and I'm not noticing anything for that.
>
> Grepping through Documentation for `HOST_CPU` comes up with nothing.

Indeed, HOST_CPU was chosen intentionally for compatibility with `autotools` in the event that support for cross-compilation was ever added[*].

A few years ago, I had started adding cross-compilation support to the project but never finished the task. I'm pretty sure I still have the patches sitting around somewhere. I'll look for them, but I'm not sure how much they will help. Aside from the obvious patch adding `config.guess` and `config.sub`, I recall creating a patch to fool `autoconf` into not demanding that the project also carry the bunch of other scripts/tools `autoconf` normally wants (since we don't use those tools in our build process).

[*] https://lore.kernel.org/git/20171209094310.GA60808@flurp.local/
Previous: Nathan RoyceNext: Nathan Royce
Message 2 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.