Re: [PATCH] rust: query the compiler for dylib path

Daniel Gomez
2024-10-10T08:31:26Z

On Wed Oct 9, 2024 at 3:12 PM CEST, Miguel Ojeda wrote:
> On Wed, Oct 9, 2024 at 2:57 PM Tamir Duberstein <tamird@gmail.com> wrote:
>>
>> What would you have me link to? With this patch applied and using
>
> I was thinking perhaps the series from Daniel, if that is the latest
> discussion (?), i.e. I would like to understand what is the policy
> around changes like this, what happens if it breaks, etc.

Building Linux in macOS is now supported for arm64 (targets tested: allyesconfig
and defconfig). The upstream policy is to use the build system variables to
configure the necessary tweaks to support building in macOS. However, this
will not always be possible then, patches are welcome from the build system
maintainer to support "portability" across OSes. But not full integration.
Please, let me know if this is not clear.

This policy forces macOS users to provide their own environment, documentation
and dependencies. I created bee-headers with the intention of providing all this
(including the missing byteswap, elf and endian headers) as reference or for
developers to use.

So, after installing bee-headers and all other linux dependencies (llvm, sed,
awk, etc), one would simply do:

source bee-init # To initiate the build enviroment
make LLVM=1 defconfig
make LLVM=1 -j$(nproc)

Here a more detailed documentation:
https://github.com/bee-headers/homebrew-bee-headers/blob/main/README.md

The last version of the series is v3 [1], which fixes a build error that cannot
be fixed in macOS via build system environment. This is enabled when using Intel
Xe Graphics (DRM_XE), included in allyesconfig target.

[1] https://lore.kernel.org/all/20240925-macos-build-support-v3-1-233dda880e60@samsung.com/

>
>> https://github.com/bee-headers/homebrew-bee-headers I was able to build a kernel
>> on my apple silicon mac. Relevant config:
>
> That is great.
>
> Thanks!
>
> Cheers,
> Miguel