On martes, 17 de enero de 2017 22:21:51 ART Rebecca N. Palmer wrote: [snip] > This suggests the fix (warning: untested and not my area of expertise - > and if it is using that line, why is there no -Wl,--no-whole-archive in > the build log?):
This part I don't know. > --- a/tools/llvm-shlib/CMakeLists.txt > +++ b/tools/llvm-shlib/CMakeLists.txt > @@ -42,7 +42,7 @@ > list(REMOVE_DUPLICATES LIB_NAMES) > if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" > STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: > It should be "GNU ld for elf" > # GNU ld doesn't resolve symbols in the version script. > - set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) > + set(LIB_NAMES > -Wl,--version-script,../../../tools/llvm-shlib/simple_version_script.map > -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) > elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") > set(LIB_NAMES -Wl,-all_load ${LIB_NAMES}) > endif() > --- a/dev/null > +++ b/simple_version_script.map > @@ -0,0 +1,1 @@ > +LLVM_3.9 { global: *; }; Probably the "../../../tools" path should be replaced by $ {CMAKE_CURRENT_SOURCE_DIR}/tools > (Should also work with the obvious change for 3.8; I haven't checked > 3.7. Deliberately not making 3.9 "depend" on 3.8, as the whole point is > to make the linker treat them as separate libraries) Right. > Some LLVM-using libraries use -Bsymbolic to avoid similar problems (e.g. > #768185), but I don't know whether enabling that on LLVM itself would > help: it may well be papering over a problem that symbol versioning > would really solve. Right. -- Lisandro Damián Nicanor Pérez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/
signature.asc
Description: This is a digitally signed message part.