File tree Expand file tree Collapse file tree 4 files changed +22
-7
lines changed Expand file tree Collapse file tree 4 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -797,11 +797,11 @@ endif
797
797
ifeq ($(USE_OPENMP), 1)
798
798
FCOMMON_OPT += -fopenmp
799
799
endif
800
- ifeq ($(OSNAME), Linux)
801
- ifeq ($(ARCH), x86_64)
802
- FLANG_VENDOR := $(shell expr `$(FC) --version|cut -f 1 -d "."|head -1`)
803
- endif
804
- endif
800
+ # ifeq ($(OSNAME), Linux)
801
+ # ifeq ($(ARCH), x86_64)
802
+ # FLANG_VENDOR := $(shell expr `$(FC) --version|cut -f 1 -d "."|head -1`)
803
+ # endif
804
+ # endif
805
805
endif
806
806
807
807
ifeq ($(F_COMPILER), G77)
@@ -1276,7 +1276,8 @@ endif
1276
1276
1277
1277
override CFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
1278
1278
override PFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF)
1279
- ifeq ($(FLANG_VENDOR),AOCC)
1279
+ #ifeq ($(FLANG_VENDOR),AOCC)
1280
+ ifeq ($(F_COMPILER),FLANG)
1280
1281
override FFLAGS += $(filter-out -O2 -O3,$(COMMON_OPT)) -O1 $(FCOMMON_OPT)
1281
1282
else
1282
1283
override FFLAGS += $(COMMON_OPT) $(FCOMMON_OPT)
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ if (${F_COMPILER} STREQUAL "FLANG")
16
16
if (USE_OPENMP )
17
17
set (FCOMMON_OPT "${FCOMMON_OPT} -fopenmp" )
18
18
endif ()
19
+ set (FCOMMON_OPT "${FCOMMON_OPT} -frecursive" )
19
20
endif ()
20
21
21
22
if (${F_COMPILER} STREQUAL "G77" )
Original file line number Diff line number Diff line change @@ -417,6 +417,15 @@ if (${CMAKE_C_COMPILER} STREQUAL "LSB" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows
417
417
set (LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE" )
418
418
endif ()
419
419
420
+ if ("${CMAKE_BUILD_TYPE} " STREQUAL "Release" )
421
+ if ("${F_COMPILER} " STREQUAL "FLANG" )
422
+ set (FILTER_FLAGS "-O2;-O3" )
423
+ foreach (FILTER_FLAG ${FILTER_FLAGS} )
424
+ string (REPLACE ${FILTER_FLAG} "-O1" CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE} )
425
+ endforeach ()
426
+ endif ()
427
+ endif ()
428
+
420
429
if (NOT DEFINED SUFFIX )
421
430
set (SUFFIX o )
422
431
endif ()
Original file line number Diff line number Diff line change @@ -155,8 +155,12 @@ ifeq ($(F_COMPILER), INTEL)
155
155
-Wl,--whole-archive $< -Wl,--no-whole-archive \
156
156
-Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
157
157
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
158
+ else ifeq ($(F_COMPILER), FLANG)
159
+ $(FC) $(FFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
160
+ -Wl,--whole-archive $< -Wl,--no-whole-archive \
161
+ -Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
162
+ $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
158
163
else
159
-
160
164
ifneq ($(C_COMPILER ) , LSB)
161
165
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
162
166
-Wl,--whole-archive $< -Wl,--no-whole-archive \
You can’t perform that action at this time.
0 commit comments