<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59593>59593</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-libgcc generation of gcc_s.ver does not use --target option
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jheydebrand
      </td>
    </tr>
</table>

<pre>
    The custom target to generate gcc_s.ver by using the C preprocessor currently does not pass a --target option on the command line which means that the builtin preprocessor defines used to process that ver file may differ from the rest of the build: https://github.com/llvm/llvm-project/blob/a18cf8d14f5552c13bd1cef112ba5b88a7fc75ff/llvm-libgcc/lib/CMakeLists.txt#L10
This in turn may lead to the wrong set of symbols being exported from the shared object.

I am not entirely certain if other command line options (-mcpu comes to mind) would influence the relevant set of builtin defines that are used inside the template file https://github.com/llvm/llvm-project/blob/a18cf8d14f5552c13bd1cef112ba5b88a7fc75ff/llvm-libgcc/lib/gcc_s.ver
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEk7tu8zgQhZ-GagY2JMq6FSqyCQwskO3SL3gZSsxSpMCh4vjtF6Jjb7LdX_2NBGI0o3P4zRFEdvKII2v-YM1LIbY0hzi-z3jVKKPwupBBX8e3GUFtlMICScQJE6QAE3qMIiFMSv1Nxw-MIK-wkfUTpBnhGdaIawwKiUIEtcWIPrkr6IAEPiRYBREIOBy-hoY12eAh-NyvwrIIr8FZj3CZrZphQeEJ0ixS_kJu1iXrf_5Ho7EeCTZCvcv8qty6dpHGOoRFXEFbY_Zz3G3NCBEpQTCP0ZrVTzCntBKrnxg_M36ebJo3eVRhYfzs3Mf9dVhjeEeVGD9LFyTjZ1H1yvS6OpmmabiqaqkrhaaquBSN7HvRGdU1xtwHOCsnpfaT3duf_xL_4KulRMf0mRivX6uSlS-sfHqbLYH1kLbosw2HIhvdZV9i8BMQZh90XWRwBBJ3JPi5hphQ_-eXZhFRQ5C78uNt-u35J4glE0KfbER3BYUxCevBGghpxviTzg0cAeP9YVHrtleRdlGL9ZrxAS5hcxqsN25Dr_Drvh1-CJ_ueu847wQzMRHxhtJ6svrWmHBZ3b55GeVvIvTY-kKPtR7qQRQ4Vm1XndqmPHXFPA5DVw26bznXnRGdbltturarsW-aVlZlYUdecl7xaqiavefY92iqlmuu-uYkO8VOJS7CuuMu4BjiVFiiDcdmaIa6cEKio5xdzj1eIBcZ53uU45hFy20idipd3qTHlGSTw_Gbq3uYc_zMt0Q_sroR_j-oxRbd-Mu3n0US4-ds4t8AAAD__8xziRU">