<html>
    <head>
      <base href="http://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 --- - Clang -pg option doesn't work on Linux"
   href="http://llvm.org/bugs/show_bug.cgi?id=16251">16251</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang -pg option doesn't work on Linux
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>Driver
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>qyang@brkt.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10640" name="attach_10640" title="Replace crt1.o with gcrt1.o when -pg is specified">attachment 10640</a> <a href="attachment.cgi?id=10640&action=edit" title="Replace crt1.o with gcrt1.o when -pg is specified">[details]</a></span>
Replace crt1.o with gcrt1.o when -pg is specified

Clang linker driver links the wrong crt1.o file when -pg option is specified.
As a result, the gprof doesn't work with clang on Linux. Programs compiled with
clang -pg doesn't generate gmon.out file.

Attached is patch which replaces crt1.o with gcrt1.o when -pg is specified.
With the patch, compiled programs generate gmon.out file correctly.</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>