Tumbleweed CI image and KDECompilerSettings

Ben Cooksley bcooksley at kde.org
Sun Dec 29 18:00:57 GMT 2024


On Mon, Dec 30, 2024 at 5:26 AM João Gouveia <joaotalonegouveia at gmail.com>
wrote:

> Hi everyone,
>
Hi João,


> It seems that the CI image for OpenSUSE's Tumbleweed does not use a
> version of Clang that supports the -fhardened compiler flag (see this job
> log <https://invent.kde.org/joaotgouveia/mankalaengine/-/jobs/2411881>,
> line 484). This flag is being set by ECM's KDECompilerSettings (source
> <https://github.com/KDE/extra-cmake-modules/blob/master/kde-modules/KDECompilerSettings.cmake#L614C1-L614C60>).
> Am I misconfiguring something, or is this a genuine issue? If this is not
> the appropriate place to discuss this, please let me know.
>

It looks like you're doing something very unusual here, as I don't see any
search for a conventional C compiler that most KDE projects do - and the
compiler that CMake said it found was GCC, not Clang.
Yet it is Clang that ends up being used.

I'll note that -fhardened flag is a GCC flag - which is why there are logic
checks in KDECompilerSettings beforehand, but those rely on what CMake said
it found.

So the fix here is to find how/why we end up using Clang even though we
said we were going to be using GCC.

I will note that Clang is not present in these images to be used as a
compiler - it is there to provide support for KDevelop and Clazy (which
make use of parts of Clang in their parsers) as well as for the
clang-format utility.
See the various comments around Clang in
https://invent.kde.org/sysadmin/ci-images/-/blob/master/suse-qt68/Dockerfile
The supported compiler for this image is GCC.


> Best regards,
>
> João
>

Cheers,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20241230/ef0dbce4/attachment.htm>


More information about the kde-devel mailing list