[MacPorts] #62329: clang-11: targeted OS version does not support -reexported_symbols_list on 10.6

MacPorts noreply at macports.org
Sun Feb 21 18:53:24 UTC 2021


#62329: clang-11: targeted OS version does not support -reexported_symbols_list on
10.6
-----------------------+----------------------
  Reporter:  mojca     |      Owner:  kencu
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  clang-11  |
-----------------------+----------------------

Comment (by kencu):

 I'd like to get it right before I push a final fix, but for today this
 will turn off the new libc++.dylib feature and get you building again:
 {{{
 % diff -u Portfile.orig Portfile
 --- Portfile.orig       2021-02-21 10:37:55.000000000 -0800
 +++ Portfile    2021-02-21 10:41:11.000000000 -0800
 @@ -225,8 +225,8 @@
          -DCLANG_ENABLE_ARCMT=OFF \
          -DDARWIN_PREFER_PUBLIC_SDK=ON \
          -DLLVM_BUILD_RUNTIME=ON \
 -        -DLIBCXX_ENABLE_SHARED=ON \
 -        -DLIBCXX_INSTALL_LIBRARY=ON
 +        -DLIBCXX_ENABLE_SHARED=OFF \
 +        -DLIBCXX_INSTALL_LIBRARY=OFF

  } elseif {${subport} eq "flang-${llvm_version}"} {

 @@ -389,7 +389,6 @@
          system "cd ${destroot.dir}/tools/clang && ${destroot.cmd}
 ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
          system "cd ${destroot.dir}/projects/compiler-rt &&
 ${destroot.cmd} ${destroot.pre_args} ${destroot.target}
 ${destroot.post_args}"
          system "cd ${destroot.dir}/projects/libcxx && ${destroot.cmd}
 ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"
 -        system "cd ${destroot.dir}/projects/libcxxabi && ${destroot.cmd}
 ${destroot.pre_args} ${destroot.target} ${destroot.post_args}"

          delete ${destroot}${sub_prefix}/bin/clang
          file rename
 ${destroot}${sub_prefix}/bin/clang-${clang_executable_version}
 ${destroot}${sub_prefix}/bin/clang
 }}}

 The (working but needs tweaking) patch for libcxx I'm tweaking looks like
 this, but I think the {{{not_weak}}} and {{{weak}}} symbol exports still
 need to be included in the final product, so needs a bit of tweaking
 still. This patch is formatted for including in lilbcxx directly, and
 would need path tweaking for our clang-11 port's patch directory setup.
 {{{
 --- src/CMakeLists.txt.orig     2021-02-20 13:49:46.000000000 -0800
 +++ src/CMakeLists.txt  2021-02-20 13:56:36.000000000 -0800
 @@ -209,21 +209,7 @@
    if (LIBCXX_OSX_REEXPORT_LIBCXXABI_SYMBOLS)
      target_link_libraries(cxx_shared PRIVATE
 "-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++unexp.exp"
 -
 "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi.v${LIBCXX_LIBCPPABI_VERSION}.exp"
 -
 "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
 -
 "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
 -
 -    if (LIBCXX_ENABLE_EXCEPTIONS)
 -      if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$")
 -        target_link_libraries(cxx_shared PRIVATE
 "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc
 ++abi-exceptions.sjlj.exp")
 -      else()
 -        target_link_libraries(cxx_shared PRIVATE
 "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc
 ++abi-exceptions.exp")
 -      endif()
 -    endif()
 -
 -    if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
 -      target_link_libraries(cxx_shared PRIVATE
 "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc
 ++abi-new-delete.exp")
 -    endif()
 +
 "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib")
    endif()

    # Generate a linker script in place of a libc++.so symlink.
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/62329#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list