<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - compiler-rt cmake configure fails on 32-bit systems" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24222&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=-ZuCtnE5lM9xjp-jHSYIS6KuR6TPPfQg3KW0c_J43cM&s=ofGMUPVpXPjjZfBd3Cu8z6fb8F0omWKjJY4IOv--tYY&e=">24222</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiler-rt cmake configure fails on 32-bit systems
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hans@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, popizdeh@gmail.com, samsonov@google.com
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>24126
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Nikola reports failing to configure compiler-rt on 32-bit OpenSUSE and Fedora
with CMake.

On Fedora, gcc targets i686 so the first stage (building compiler-rt and clang)
of a bootstrap build succeeds.

But the second stage (building with the newly built clang) fails, because Clang
does not define __i686__.

clang --version says it targets i686-pc-linux-gnu, but it doesn't define
__i686__.

On my regular x86_64 workstation, it doesn't work either:

$ bin/clang -target i686-pc-linux-gnu -v
Prints "Target: i686-pc-linux-gnu" as expected, but:
$ bin/clang -target i686-pc-linux-gnu -dM -E -c /tmp/a.c | grep i.*86
Only prints __i386__, __i386 and i386.

Isn't Clang supposed to define __i686__ when targeting i686? Am I holding it
wrong? Is compiler-rt checking the wrong thing?



On OpenSUSE, even Phase1 fails, because the system gcc is targeting i586
instead of i686:
gcc -v prints i586-suse-linux. It defines __i386__ and __i586__.
I suppose that's a different kind of bug, but it also seems related.

I have VMs for 32-bit OpenSUSE and Fedora set up. Let me know if I can help
debugging.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>