Skip to content

Add docs on setting up cross-compilers#35405

Open
wyphan wants to merge 5 commits intospack:developfrom
wyphan:wyphan/docs-cross-compile
Open

Add docs on setting up cross-compilers#35405
wyphan wants to merge 5 commits intospack:developfrom
wyphan:wyphan/docs-cross-compile

Conversation

@wyphan
Copy link
Copy Markdown
Contributor

@wyphan wyphan commented Feb 8, 2023

Specifically, this is added to the section on manual compiler configuration.

@spackbot-app spackbot-app bot added core PR affects Spack core functionality documentation Improvements or additions to documentation labels Feb 8, 2023
@wyphan wyphan requested a review from scheibelp February 8, 2023 19:04
@wyphan wyphan self-assigned this Feb 8, 2023
Copy link
Copy Markdown
Contributor

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @wyphan for this addition!

Just one comment: it may be worth adding a sentence on cross-compiling for a different microarchitectures.

For example, on my system compilers are added with target x86_64 by default, and in order to be able to compile for target=zen3 on a haswell system, I only need to do the spack config change (no need to modify compiler specs).

@haampie
Copy link
Copy Markdown
Member

haampie commented Feb 20, 2023

Spack doesn't support cross-compilation, so I don't think we should imply with docs that it can.

Copy link
Copy Markdown
Member

@scheibelp scheibelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to move this section and adjust the language a bit (specifics in comments)

@wyphan wyphan requested a review from scheibelp February 22, 2023 17:30
@commodo
Copy link
Copy Markdown

commodo commented Apr 24, 2023

so, to chime in: Spack supports cross-compilation (to an extent);
and has been supporting this for a while;
( by cross-compilation i mean cross-architecture compilation )

firstly: there's a flag (called host_compatible ; seems to have been added here #29835) which seems to be enabled by default;
this disallows any target that is incompatible with the host;
so, just configuring a compiler like mentioned here (in the docs), is insufficient; the host_compatible flag will stop the build early;

back in 2019 there were 2 discussions (this one about trying to cross-compile boost and this one about trying to cross compile a GCC compiler)

we're also interested in this use-case;
so, i've tested cross-compilation of a few packages, and some work; other don't work
particularly the ones that need host-compilers to build some build-time tools;

i've found this issue (#17239) that starts to tackle this into a direction;
i'll maybe continue there;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants