<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compile error -- c"
   href="http://llvm.org/bugs/show_bug.cgi?id=19228">bug 19228</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compile error -- c"
   href="http://llvm.org/bugs/show_bug.cgi?id=19228#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - compile error -- c"
   href="http://llvm.org/bugs/show_bug.cgi?id=19228">bug 19228</a>
              from <span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span></b>
        <pre>Changing the following line in the makefile in modules made the code link:

From:

  LINK = $(CC) -I$(INCLUDE_DIR) $(CFLAGS)

To:

  LINK = $(CC) -I$(INCLUDE_DIR) -Wl,-undefined -Wl,dynamic_lookup $(CFLAGS)

The reason is that each module requires "register_mod_fileds" and
"set_mod_record" in the application while not linking against the application
itself. Adding above flags makes the linker ignore (all) undefined symbols.

Not sure why this works out of the box with gcc though.

This does not seem to be a bug in clang, so I'm closing this bug. Feel free to
reopen if you disagree, though.

BTW: After successfully linking mod_swap, compilation of mod_partition failed
on my system (OS X 10.9.2) because the header "mntent.h" -- which i gather is
Linux-specific -- could not be found. So there might be some more porting work
involved to get tsar running on OS X.</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>