Skip to content

[RA-7728] get correct gcc version for dkms#136

Open
ZhoraGevorgyan wants to merge 9 commits into
developfrom
bug/RA-7728-get-correct-gcc-version-for-dkms
Open

[RA-7728] get correct gcc version for dkms#136
ZhoraGevorgyan wants to merge 9 commits into
developfrom
bug/RA-7728-get-correct-gcc-version-for-dkms

Conversation

@ZhoraGevorgyan

@ZhoraGevorgyan ZhoraGevorgyan commented Jul 20, 2026

Copy link
Copy Markdown

manual test succeed, but needs additional testing ofc

@ZhoraGevorgyan
ZhoraGevorgyan requested a review from a team as a code owner July 20, 2026 22:50
@ZhoraGevorgyan
ZhoraGevorgyan requested a review from AnatolyZ July 20, 2026 22:50
Comment thread src/dkms-make.sh Outdated
Comment thread src/dkms-make.sh Outdated
@kgermanov

kgermanov commented Jul 21, 2026

Copy link
Copy Markdown

May be use MAKE_MATCH[#]/PRE_BUILD?
MAKE="scl enable devtoolset-12 -- make -C M=$PWD"

@ZhoraGevorgyan
ZhoraGevorgyan requested a review from kgermanov July 23, 2026 01:25
Comment thread src/genconfig.sh Outdated
Comment thread src/genconfig.sh Outdated
Comment thread src/genconfig.sh Outdated
… the same logic with a unique named .env file
@ZhoraGevorgyan
ZhoraGevorgyan requested a review from kgermanov July 23, 2026 14:46
Comment thread src/genconfig.sh
echo "checking $CONFIG_OPTION"
MACRO_NAME="$(echo ${CONFIG_OPTION} | awk '{print toupper($0)}')"
CONFIG_VALUE=$(grep "${CONFIG_OPTION}" "${SYSTEM_CONFIG_FILE}" | awk -F"=" '{print $2}')
CONFIG_VALUE=$(grep "${CONFIG_OPTION}" "${SYSTEM_CONFIG_FILE}" | awk -F"=" '{print $3}')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lets use single util instead of combine two

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

no logic change here, I just changed the 2->3 to be able to call the script without passing the -j n arg

Comment thread src/genconfig.sh
Comment on lines +157 to +159
for ((i=0; i<5; i++)); do
local GCC_ENV="/opt/rh/gcc-toolset-$((GCC_MAJOR+i))/enable"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

for toolset in $(ls -1 )/opt/rh/gcc-toolset-*/enable

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

we need to try the exact GCC_MAJOR, only if it doesn't exist the next available ....
so they may have toolset-11,12,13 but the kernel needs 13, I think this way we will get 11
and what if there is no toolset at all

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I mean that we could foreach on all installed toolset

Comment thread src/genconfig.sh Outdated
Comment thread src/genconfig.sh
Comment thread src/genconfig.sh Outdated
…system gcc may be used or the user can specify some)
@Axcient Axcient deleted a comment from kgermanov Jul 23, 2026
@ZhoraGevorgyan
ZhoraGevorgyan requested a review from kgermanov July 24, 2026 08:10
PRE_BUILD="genconfig.sh ${kernelver}"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build KVER=${kernelver} modules"
MAKE_ENV_FILE="dkms-${PACKAGE_NAME}-${PACKAGE_VERSION}-${kernelver}.env"
PRE_BUILD="genconfig.sh ${kernelver} ${MAKE_ENV_FILE}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks like genconfig.sh should run under gcc detected environment for correct checks

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.

3 participants