[RA-7728] get correct gcc version for dkms#136
Conversation
…able the toolset before make
|
May be use MAKE_MATCH[#]/PRE_BUILD? |
…ems if the corresponding toolset is installed
… the same logic with a unique named .env file
| 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}') |
There was a problem hiding this comment.
Lets use single util instead of combine two
There was a problem hiding this comment.
no logic change here, I just changed the 2->3 to be able to call the script without passing the -j n arg
| for ((i=0; i<5; i++)); do | ||
| local GCC_ENV="/opt/rh/gcc-toolset-$((GCC_MAJOR+i))/enable" | ||
|
|
There was a problem hiding this comment.
for toolset in $(ls -1 )/opt/rh/gcc-toolset-*/enable
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I mean that we could foreach on all installed toolset
…system gcc may be used or the user can specify some)
| 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}" |
There was a problem hiding this comment.
Looks like genconfig.sh should run under gcc detected environment for correct checks
manual test succeed, but needs additional testing ofc