Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Allow modification of system/cpu_family/cpu/endian in generated MesonToolchain toolchain file #8312

Open
madebr opened this issue Jan 10, 2021 · 1 comment

Comments

@madebr
Copy link
Contributor

madebr commented Jan 10, 2021

Hello,

I'm currently creating recipes+packages aimed for the Nintendo Switch.
I added Nintendo Switch to os in my settings.yml.

While creating a recipe for the mesa port, I'm using the MesonToolchain class.
This creates the following section:

[build_machine]

system = 'linux'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[host_machine]

system = 'nintendo switch'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

[target_machine]

system = 'nintendo switch'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

The correct data for nintendo should be:

[host_machine]
system = 'horizon'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

What I'm asking for is a feature to override these default/calculated values.

Right now, the toolchain method is the following:

    def toolchain(self):
        tc = MesonToolchain(self)
        tc.generate()

It would be useful to make this possible:

    def toolchain(self):
        tc = MesonToolchain(self)
        tc.host_machine.system = "horizon"
        tc.target_machine.system = "horizon"
        tc.generate()

Or something similar...

CC'ing @SSE4 for being the strong man behind MesonToolchain.

@SSE4
Copy link
Contributor

SSE4 commented Jan 11, 2021

it shouldn't be that hard to implement. however, I'd like to ensure we're aligned with interfaces (e.g. with AutoTools/CMake on how do they set custom GNU triple or CMAKE_SYSTEM_PROCESSOR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants