Closed watologo1 closed 4 months ago
I additionally removed the gcc/clang check which at least has been put in pre-build.mk (I removed the including in Makefiles) and finally intel-cmt-cat compiles again on nearly all distros: https://build.opensuse.org/package/show/home:trenn:branches:server:monitoring/intel-cmt-cat
This is what I'd like to submit next. I followed history of the gcc/clang check, but unfortunately there is no detailed comment why this has been added.
The additional checks were introduced in order to increase product security using some flags supported only by relatively new compiler versions. You could read my answer related to the same situation: https://github.com/intel/intel-cmt-cat/issues/258
Please upgrade your compiler versions.
The option is rather unsatisfying. Are there known issues what would happen without passing: -fcf- protection=full ? The flag was added recently. Depending on the build environment it should be up to the developer to add such options from outside via CFLAGS= E.g. OpenSUSE builds 32 bit via march=i586 which does not support -fcf- protection=full. Also most build environments seem to not support this flag yet, but the tool would still be fully functioning. If it's ok, I'll try to come up with defining this more central. Having such a patch splitted over all Makefiles is ugly to maintain. Ideally, it's still ripped out and the developer (build environment) decides whether to add this flag depending whether his compiler supports it or not. Then also the "not very nice" check for gcc version could vanish as well.
This option causes grief with at least some gcc versions:
built failure ->"cc: error: unrecognized command line option '-fcf- protection=full'; did you mean '-fstack-protector-all'?"
and some archs (i586):
cc1: error: ‘-fcf-protection’ is not compatible with this target
According to our gcc maintainer (translated): Whatever the reason is that they require gcc version 9..., maybe -fcf-protection, but simply throw it out...
If there is no urgent reason, better get rid of this one.
Description
Affected parts
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: