Skip to content

Commit 9ee8ce9

Browse files
authored
Merge pull request #439 from GEOS-ESM/bugfix/438-v3-fix-xcode
2 parents 1680572 + a88eeb0 commit 9ee8ce9

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Deprecated
1919

20+
## [3.58.2] - 2025-04-22
21+
22+
### Fixed
23+
24+
- Do not add `ld_classic` flag on macOS with XCode 16.3 or newer. No longer needed.
25+
2026
## [3.58.1] - 2025-04-03
2127

2228
### Fixed

compiler/flags/GNU_Fortran.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ if (APPLE)
135135
execute_process(COMMAND "pkgutil"
136136
"--pkg-info=com.apple.pkg.CLTools_Executables"
137137
OUTPUT_VARIABLE TEST)
138-
string(REGEX REPLACE ".*version: ([0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
139-
message(STATUS "Apple command line utils major version is '${CMDLINE_UTILS_VERSION}'")
140-
if (${CMDLINE_UTILS_VERSION} VERSION_GREATER 14)
138+
# Extract the full version X.Y
139+
string(REGEX REPLACE ".*version: ([0-9]+\\.[0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
140+
message(STATUS "Apple command line utils version is '${CMDLINE_UTILS_VERSION}'")
141+
142+
if ((${CMDLINE_UTILS_VERSION} VERSION_GREATER 14) AND (${CMDLINE_UTILS_VERSION} VERSION_LESS 16.3))
141143
message(STATUS "Adding link options '-Wl,-ld_classic'")
142144
add_link_options(-Wl,-ld_classic)
143145
endif ()

compiler/flags/IntelLLVM_Fortran.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ elseif (${proc_description} MATCHES "Intel")
7373
elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
7474
# This is a fallback for when the above doesn't work. It should work
7575
# for most x86_64 processors, but it is not guaranteed to be optimal.
76-
message(WARNING "Unknown processory type. Defaulting to a generic x86_64 processor. Performance may be suboptimal.")
76+
message(WARNING "Unknown processor type. Defaulting to a generic x86_64 processor. Performance may be suboptimal.")
7777
set (MARCH_FLAG "x86-64")
7878
else ()
7979
message(FATAL_ERROR "Unknown processor. Please file an issue at https://github.com/GEOS-ESM/ESMA_cmake")

compiler/flags/Intel_Fortran.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ elseif (${proc_description} MATCHES "Intel")
8787
elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
8888
# This is a fallback for when the above doesn't work. It should work
8989
# for most x86_64 processors, but it is not guaranteed to be optimal.
90-
message(WARNING "Unknown processory type. Defaulting to a generic x86_64 processor. Performance may be suboptimal.")
90+
message(WARNING "Unknown processor type. Defaulting to a generic x86_64 processor. Performance may be suboptimal.")
9191
set (COREAVX2_FLAG "")
9292
# Once you are in here, you are probably on Rosetta, but not required.
9393
# Still, on Apple Rosetta we also now need to use the ld_classic as the linker
@@ -96,9 +96,12 @@ elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
9696
execute_process(COMMAND "pkgutil"
9797
"--pkg-info=com.apple.pkg.CLTools_Executables"
9898
OUTPUT_VARIABLE TEST)
99-
string(REGEX REPLACE ".*version: ([0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
100-
message(STATUS "Apple command line utils major version is '${CMDLINE_UTILS_VERSION}'")
101-
if (${CMDLINE_UTILS_VERSION} VERSION_GREATER 14)
99+
100+
# Extract the full version X.Y
101+
string(REGEX REPLACE ".*version: ([0-9]+\\.[0-9]+).*" "\\1" CMDLINE_UTILS_VERSION ${TEST})
102+
message(STATUS "Apple command line utils version is '${CMDLINE_UTILS_VERSION}'")
103+
104+
if ((${CMDLINE_UTILS_VERSION} VERSION_GREATER 14) AND (${CMDLINE_UTILS_VERSION} VERSION_LESS 16.3))
102105
message(STATUS "Adding link options '-Wl,-ld_classic'")
103106
add_link_options(-Wl,-ld_classic)
104107
endif ()

0 commit comments

Comments
 (0)