RFR: 8293098: GHA: Harmonize GCC version handling for host and cross builds [v2]

Magnus Ihse Bursie ihse at openjdk.org
Tue Aug 30 15:24:23 UTC 2022


On Tue, 30 Aug 2022 15:13:56 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Caught this headache while trying to bump to Ubuntu 22.04, which required touching way too many surprising places. 
>> 
>> Current GHA scripts define `apt-gcc-version` a bit weirdly: host and cross builds version differ in carrying the "gcc-major-version" inside of it. That is, "host" builds do `apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'`, while cross builds do `apt-gcc-version: default: '10.3.0-1ubuntu1~20.04'`
>> 
>> I propose we harmonize these to simplify GCC updates: split out the `gcc-major-version` for host builds, and pull the versions from cross builds into `main`, where all other versions belong. Additionally, this handles the x86_32 case that requires "-multilib" package, which is currently hacked through the "version" string.
>> 
>> Additional testing:
>>  - [ ] GHA
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Allow cross-compiler to have slightly different version

Seems like a good cleanup. I never fully got to the end of making this part nice when I rewrote the GHA script.

If you want to unify this even more, I think (iirc) that it possible to e.g. set a top-level `env` section defining the gcc version we use, and reference it in the `jobs:*:with` sections.

-------------

Marked as reviewed by ihse (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10083



More information about the build-dev mailing list