Skip to content

Compiler modules#12

Open
AndreasGocht wants to merge 10 commits intocvonelm:mainfrom
AndreasGocht:compiler_modules
Open

Compiler modules#12
AndreasGocht wants to merge 10 commits intocvonelm:mainfrom
AndreasGocht:compiler_modules

Conversation

@AndreasGocht
Copy link

This PR is based on #11 .

It allows to use compiler modules as provided by easybuild to be used as cc compiler and tool_cc. Currently only GCC ist fully implemented, as only the GCC libs are sym-linked, and the relevant path is provided via PackageRecipe.library_path()

Moreover this PR holds a few minor maintenance commits.

@AndreasGocht AndreasGocht force-pushed the compiler_modules branch 2 times, most recently from a870720 to cfaa1a8 Compare January 6, 2026 08:36
self.configure(
"../cmake-4.0.3/",
[],
[
Copy link
Owner

Choose a reason for hiding this comment

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

I have to admit, I did not have the time to think myself into this problem again, but I dislike that this change exposes implementation details of the tool_cc package to cmake_inst. imho tool_cc should provide a cc command that works as expected, e.g. creates binaries that can be stand-alone executed (None of the LD_LIBRARY_PATH shenanigans required.

A brainfart that I had was, that this package installs a shell script cc that calls

gcc - Lfoobar -Wl,-rpath,foobar $@

But I admit that this might invite strange bugs on its own, the way that scorep-gcc and the other scorep compiler wrappers sometimes do.

The """correct""" would probably be to edit the gcc spec ( https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html, or gcc -dumpspecs to do the right thing (tm) from the get go), but that is like using a space laser to tattoo ants. We might try a simpler thing before we try the "right" thing.

hmm...

Copy link
Author

@AndreasGocht AndreasGocht Jan 27, 2026

Choose a reason for hiding this comment

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

Though I do like the Idea of spec files, you still need to add --spec to gcc. So you need to change the gcc command.
You could also change the cmake and configure commands to always explicitly link the default gcc libs, so the tools don't need to do it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments