[LLVMbugs] [Bug 19228] compile error -- c

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 31 10:16:55 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19228

jonathan.sauer at gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from jonathan.sauer at gmx.de ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140331/22a87994/attachment.html>


More information about the llvm-bugs mailing list