Skip to content

Commit f0f2747

Browse files
authored
Merge pull request #5207 from martin-frbg/issue5202
Fix MacOS compilation with xcode16.3/clang17/gcc14
2 parents 67c5bdd + fc8090b commit f0f2747

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

Makefile.system

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,15 @@ ifeq (x$(XCVER), x 15)
435435
CCOMMON_OPT += -Wl,-ld_classic
436436
FCOMMON_OPT += -Wl,-ld_classic
437437
endif
438+
ifeq (x$(XCVER), x 16)
439+
ifeq ($(C_COMPILER), GCC)
440+
CCOMMON_OPT += -Wl,-ld_classic
441+
FCOMMON_OPT += -Wl,-ld_classic
442+
endif
443+
ifeq ($(F_COMPILER), GFORTRAN)
444+
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
445+
endif
446+
endif
438447
endif
439448

440449
ifneq (,$(findstring $(OSNAME), FreeBSD OpenBSD DragonFly))

ctest/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,18 +235,18 @@ FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
235235
ifeq ($(USE_OPENMP), 1)
236236
ifeq ($(F_COMPILER), GFORTRAN)
237237
ifeq ($(C_COMPILER), CLANG)
238-
CEXTRALIB += -lomp
238+
EXTRALIB += -lomp
239239
endif
240240
endif
241241
ifeq ($(F_COMPILER), NAG)
242-
CEXTRALIB = -lgomp
242+
EXTRALIB = -lgomp
243243
endif
244244
ifeq ($(F_COMPILER), IBM)
245245
ifeq ($(C_COMPILER), GCC)
246-
CEXTRALIB += -lgomp
246+
EXTRALIB += -lgomp
247247
endif
248248
ifeq ($(C_COMPILER), CLANG)
249-
CEXTRALIB += -lomp
249+
EXTRALIB += -lomp
250250
endif
251251
endif
252252
endif

test/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ CLDFLAGS = $(CFLAGS) $(LDFLAGS)
299299
ifeq ($(USE_OPENMP), 1)
300300
ifeq ($(F_COMPILER), GFORTRAN)
301301
ifeq ($(C_COMPILER), CLANG)
302-
CEXTRALIB += -lomp
302+
EXTRALIB += -lomp
303303
endif
304304
endif
305305
ifeq ($(F_COMPILER), NAG)
306-
CEXTRALIB = -lgomp
306+
EXTRALIB = -lgomp
307307
endif
308308
ifeq ($(F_COMPILER), IBM)
309309
ifeq ($(C_COMPILER), GCC)
310-
CEXTRALIB += -lgomp
310+
EXTRALIB += -lgomp
311311
endif
312312
ifeq ($(C_COMPILER), CLANG)
313-
CEXTRALIB += -lomp
313+
EXTRALIB += -lomp
314314
endif
315315
endif
316316
endif

0 commit comments

Comments
 (0)