commit cdf92d19d93e78704b6e1635fd794ea7805a0896
Author: Koji Yokota <[email protected]>
Date:   Fri Oct 16 01:25:33 2026 +0900

    Pass -bind_at_load only to the classic Apple linker
    
    The new linker (Xcode 15+) binds all symbols at load time anyway and
    warns that -bind_at_load is deprecated.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 66a549603d..4d3ef5e964 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -185,7 +185,13 @@ endif()
 lyx_target_link_libraries(${_lyx} HUNSPELL ASPELL ENCHANT Magic)
 
 if(APPLE)
-       target_link_libraries(${_lyx} "-bind_at_load")
+       # -bind_at_load is only meaningful for the classic linker (ld64).
+       # The new linker (Xcode 15+) binds at load time anyway and warns about 
it.
+       execute_process(COMMAND ${CMAKE_LINKER} -v
+               OUTPUT_VARIABLE _ld_version ERROR_VARIABLE _ld_version)
+       if(_ld_version MATCHES "PROJECT:ld64-")
+               target_link_libraries(${_lyx} "-bind_at_load")
+       endif()
        if(LYX_COCOA)
                target_link_libraries(${_lyx} "-framework Cocoa")
        else()
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to