in reply to Compile perl with custom compiler path, perlbrew solution preferred

When doing this from vanilla source via hand you'd just pass -Dcc=/usr/local/gcc82/bin/gcc yadda yadda yadda. It looks like (cribbing from this SO answer) there's an PERLBREW_CONFIGURE_FLAGS environment variable you could add those settings to when you run perlbrew and that might do it.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Compile perl with custom compiler path, perlbrew solution preferred
by bliako (Abbot) on Jun 13, 2024 at 21:47 UTC

    thank you. It worked as expected. It was prompting me to answer many questions and did not use the sane defaults as usual, I guess the presence of the FLAGS triggers this behaviour. I had to add -d to the FLAGS. And because another such perl existed, I also had to give it a different name:

    PERLBREW_CONFIGURE_FLAGS='-d -Dcc=/usr/local/gcc82/bin/gcc' perlbrew i +nstall 5.38.2 --as 5.38.2.gcc82

    And I can confirm that any C code embedded via Inline::C is compiled with the expected compiler.