Skip to content

fix(macOS): Resolved warning about deprecated ld_classic#9495

Merged
i2h3 merged 1 commit intomasterfrom
i2h3/fix/ld_classic
Feb 24, 2026
Merged

fix(macOS): Resolved warning about deprecated ld_classic#9495
i2h3 merged 1 commit intomasterfrom
i2h3/fix/ld_classic

Conversation

@i2h3
Copy link
Copy Markdown
Collaborator

@i2h3 i2h3 commented Feb 24, 2026

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.

@i2h3 i2h3 added this to the 33.0.0 milestone Feb 24, 2026
@i2h3 i2h3 self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 09:04
@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X 3. to review labels Feb 24, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Feb 24, 2026
@i2h3
Copy link
Copy Markdown
Collaborator Author

i2h3 commented Feb 24, 2026

/backport to stable-33.0

@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Feb 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_classic to 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.

@i2h3 i2h3 added bug and removed 3. to review labels Feb 24, 2026
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>
@i2h3 i2h3 force-pushed the i2h3/fix/ld_classic branch from 64d3dd2 to ee34806 Compare February 24, 2026 10:40
@github-actions
Copy link
Copy Markdown

Artifact containing the AppImage: nextcloud-appimage-pr-9495.zip

Digest: sha256:b14cc89190b0b5bb24d356f792ed598083ecc891c585dbc9dc97813c5fa24d53

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.

@sonarqubecloud
Copy link
Copy Markdown

@i2h3 i2h3 merged commit 2c498f4 into master Feb 24, 2026
25 of 29 checks passed
@i2h3 i2h3 deleted the i2h3/fix/ld_classic branch February 24, 2026 11:29
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants