I discovered that the second call of "cmake -LAH" further changes the cache.
That was definitelly unintended. Applying "-N" to operate in "cache read-only" mode.
That however broke the build, since the compilation flags are set up during the "cmake" call.
Up until now, the code flow was:
1) %cmake ...
2) <adjusting compilation flags>
3) cmake -LAH
And since the "cmake -LAH" without the "-N" argument changed the cache, it actually applied all the
adjustements in the second step. When switched to "-N" mode, the flags failed to be applied, and the build broke.
What we actually need to do is to:
1) initialize the compilation flags with the distribution default values
2) adjust the compilation flags
3) %cmake ...
3) cmake -N -LAH
This way the compilation flags are correctly applied during the first CMake call,
and the CMake cache remains unchanged during the second CMake call.
--
The '%cmake' macro contains the '%{set_build_flags}' macro at it's beginning
https://src.fedoraproject.org/rpms/cmake/blob/b3bf0e/f/macros.cmake.in#_20
and the '%{set_build_flags}' macro is constructed with the:
CFLAGS="${CFLAGS:-...}
syntax, which translates to "Use the content of the $CFLAGS variable. If empty, use the following default value: '...' ".
So we first need to call the '%{set_build_flags}' macro separately, so we apply the default values. Then we append to them.
And then the '%cmake' macro calls the '%{set_build_flags}' macro that finds the existing values, and uses them, instead of the default ones.
Resolves: RHEL-93751
|
||
|---|---|---|
| .fmf | ||
| plans | ||
| tests | ||
| .gitignore | ||
| clustercheck.sh | ||
| gating.yaml | ||
| LICENSE.clustercheck | ||
| mariadb10.11.spec | ||
| mariadb-check-socket.sh | ||
| mariadb-check-upgrade.sh | ||
| mariadb-libfmt.patch | ||
| mariadb-logrotate.patch | ||
| mariadb-mtr.patch | ||
| mariadb-ownsetup.patch | ||
| mariadb-prepare-db-dir.sh | ||
| mariadb-scripts-common.sh | ||
| mariadb-scripts.patch | ||
| mariadb-server-galera.te | ||
| mariadb-ssl-cypher.patch | ||
| mariadb.rpmlintrc | ||
| mariadb.tmpfiles.d.in | ||
| my.cnf.in | ||
| mysql_config_multilib.sh | ||
| mysql.service.in | ||
| mysql@.service.in | ||
| README.mariadb-docs | ||
| README.md | ||
| README.wsrep_sst_rsync_tunnel | ||
| rh-skipped-tests-arm.list | ||
| rh-skipped-tests-base.list | ||
| rh-skipped-tests-ppc.list | ||
| rh-skipped-tests-s390.list | ||
| rocksdb-6.8-gcc13.patch | ||
| rpminspect.yaml | ||
| sources | ||
| wsrep_sst_rsync_tunnel | ||
mariadb10.11
The mariadb10.11 package