<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 --- - Clang 3.7 and 3.8: `undefined reference to (non-existent procedure)` error in C code"
   href="https://llvm.org/bugs/show_bug.cgi?id=27160">27160</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang 3.7 and 3.8: `undefined reference to (non-existent procedure)` error in C code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>afiskon@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>FreeBSD 10.2-RELEASE

project: PostgreSQL

How to reproduce an issue:

CC=/usr/local/bin/clang38 CFLAGS="-O0 -g" LDFLAGS="-lelf" ./configure
--enable-cassert --enable-debug --enable-dtrace && gmake clean && gmake -j2 -s

Ignore `passing 'const char *' to parameter of type 'char *' discards
qualifiers` warnings - it's an 8-years old bug in DTrace.

The actual problem is that build fails with following errors:

```
/usr/home/eax/postgresql-src/src/backend/access/transam/xact.c:501: undefined
reference to `bort'
access/transam/xact.o: In function `CommandCounterIncrement':
/usr/home/eax/postgresql-src/src/backend/access/transam/xact.c:935: undefined
reference to `bort'
/usr/home/eax/postgresql-src/src/backend/access/transam/xact.c:941: undefined
reference to `bort'
access/transam/xact.o: In function `StartTransactionCommand':
/usr/home/eax/postgresql-src/src/backend/access/transam/xact.c:2708: undefined
reference to `bort'
access/transam/xact.o: In function `CommitTransactionCommand':
/usr/home/eax/postgresql-src/src/backend/access/transam/xact.c:2739: undefined
reference to `bort'
```

There is no such procedure or variable in the whole project. My guess is that
it is "abort" without an "a".

Same issue reproduces with CLang 3.7. Same project compiles just find by GCC
4.9 and CLang 3.4.</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>