fix(macOS): Resolved warning about deprecated ld_classic#9495
Conversation
|
/backport to stable-33.0 |
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated -ld_classic linker flag from macOS builds in the CMake configuration. The flag was added as a workaround for issues with Apple's new linker introduced in Xcode 15, but was deprecated in Xcode 15.3 and now produces warnings in modern Xcode versions. Since the underlying issues have been resolved in the new linker, this flag is no longer necessary.
Changes:
- Removed the
elseif(APPLE)block that added-Wl,-ld_classicto both executable and shared library linker flags
Comments suppressed due to low confidence (1)
src/CMakeLists.txt:90
- The PR description mentions "Xcode 26.2" which appears to be a typo. As of February 2026, the latest Xcode versions would be in the 16.x range (or possibly early 17.x). This should likely be "Xcode 16.2" or the actual current version. Please verify and update the PR description to reflect the correct Xcode version where the deprecation warning appears.
elseif(UNIX AND NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
endif()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This flag was a workaround for Apple's new linker introduced in Xcode 15, but it was deprecated in Xcode 15.3 and produces the warning on Xcode 26.2. The underlying issues it worked around are long since resolved in the new linker. Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
64d3dd2 to
ee34806
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-9495.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|



This flag was a workaround for Apple's new linker introduced in Xcode 15, but it was deprecated in Xcode 15.3 and produces the warning on Xcode 26.2. The underlying issues it worked around are long since resolved in the new linker.