<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I was not aware that this was happening, that is very unusual
      behavior. I'll start by fixing my CMake script and adding the
      appropriate checks for a compiler, as you suggested.</p>
    <p>Thank you,</p>
    <p>João</p>
    <p></p>
    <div class="moz-cite-prefix">On 12/29/24 18:00, Ben Cooksley wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+XidOG0F94pfgUR5cYHE3fdmUh8TB2BwvLdSQ0P02f=4bT03g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Mon, Dec 30, 2024 at 5:26 AM João Gouveia <<a
            href="mailto:joaotalonegouveia@gmail.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">joaotalonegouveia@gmail.com</a>>
          wrote:</div>
        <div class="gmail_quote gmail_quote_container">
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Hi everyone,</p>
            </div>
          </blockquote>
          <div>Hi João,</div>
          <div> </div>
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p>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 <a
href="https://invent.kde.org/joaotgouveia/mankalaengine/-/jobs/2411881"
                  target="_blank" moz-do-not-send="true">job log</a>,
                line 484). This flag is being set by ECM's
                KDECompilerSettings (<a
href="https://github.com/KDE/extra-cmake-modules/blob/master/kde-modules/KDECompilerSettings.cmake#L614C1-L614C60"
                  target="_blank" moz-do-not-send="true">source</a>). Am
                I misconfiguring something, or is this a genuine issue?
                If this is not the appropriate place to discuss this,
                please let me know.</p>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>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.</div>
          <div>Yet it is Clang that ends up being used.</div>
          <div><br>
          </div>
          <div>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.</div>
          <div><br>
          </div>
          <div>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.</div>
          <div><br>
          </div>
          <div>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.</div>
          <div>See the various comments around Clang in <a
href="https://invent.kde.org/sysadmin/ci-images/-/blob/master/suse-qt68/Dockerfile"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://invent.kde.org/sysadmin/ci-images/-/blob/master/suse-qt68/Dockerfile</a></div>
          <div>The supported compiler for this image is GCC.</div>
          <div> </div>
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Best regards,</p>
              <p>João<br>
              </p>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Cheers,</div>
          <div>Ben </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>