File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -797,11 +797,11 @@ endif
797797ifeq ($(USE_OPENMP), 1)
798798FCOMMON_OPT += -fopenmp
799799endif
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
805805endif
806806
807807ifeq ($(F_COMPILER), G77)
@@ -1276,7 +1276,8 @@ endif
12761276
12771277override CFLAGS += $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR)
12781278override 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)
12801281override FFLAGS += $(filter-out -O2 -O3,$(COMMON_OPT)) -O1 $(FCOMMON_OPT)
12811282else
12821283override FFLAGS += $(COMMON_OPT) $(FCOMMON_OPT)
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ if (${F_COMPILER} STREQUAL "FLANG")
1616 if (USE_OPENMP)
1717 set (FCOMMON_OPT "${FCOMMON_OPT} -fopenmp" )
1818 endif ()
19+ set (FCOMMON_OPT "${FCOMMON_OPT} -frecursive" )
1920endif ()
2021
2122if (${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
417417 set (LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE" )
418418endif ()
419419
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+
420429if (NOT DEFINED SUFFIX)
421430 set (SUFFIX o)
422431endif ()
Original file line number Diff line number Diff line change @@ -155,8 +155,12 @@ ifeq ($(F_COMPILER), INTEL)
155155 -Wl,--whole-archive $< -Wl,--no-whole-archive \
156156 -Wl,-soname,$(INTERNALNAME) $(EXTRALIB)
157157 $(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.
158163else
159-
160164ifneq ($(C_COMPILER ) , LSB)
161165 $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
162166 -Wl,--whole-archive $< -Wl,--no-whole-archive \
You can’t perform that action at this time.
0 commit comments