changed detection of FLANG_NEW

This commit is contained in:
edoapra 2023-10-19 22:39:17 -07:00
parent 1e01bec0e9
commit 836dbea742
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0
4 changed files with 12 additions and 22 deletions

View file

@ -1,4 +1,5 @@
# $Id$
#
@ -1321,8 +1322,7 @@ ifeq ($(TARGET),MACX64)
USE_FLANG=1
endif
ifeq ($(USE_FLANG),1)
FLANG_VERSION=$(shell $(FC) --version |head -1 | sed 's/^.*\(version\)//'|cut -d . -f 1)
FLANG_LT_16 = $(shell [ $(FLANG_VERSION) -lt 16 ] && echo true || echo false)
FLANG_NEW = $(shell [ $(shell $(FC) --help |head -1| cut -d " " -f 2 ) == flang ] && echo true || echo false)
endif
ifeq ($(_FC),gfortran)
@ -1344,8 +1344,7 @@ ifeq ($(TARGET),MACX64)
ifeq ($(USE_FLANG),1)
GNU_GE_4_6=true
FOPTIONS+=-fno-backslash
DEFINES += -D__FLANG
ifeq ($(FLANG_LT_16),false)
ifeq ($(FLANG_NEW),true)
# FOPTIONS+=-fstack-arrays
endif
else
@ -2098,13 +2097,11 @@ ifneq ($(TARGET),LINUX)
endif
ifeq ($(USE_FLANG),1)
FLANG_VERSION=$(shell $(FC) --version |head -1 | sed 's/^.*\(version\)//'|cut -d . -f 1)
FLANG_LT_16 = $(shell [ $(FLANG_VERSION) -lt 16 ] && echo true || echo false)
FLANG_NEW = $(shell [ $(shell $(FC) --help |head -1| cut -d " " -f 2 ) == flang ] && echo true || echo false)
endif
#@info
#@info flv $(FLANG_VERSION)
#@info FLANG_LT_16 $(FLANG_LT_16)
#@info FLANG_NEW $(FLANG_NEW)
#@info
ifeq ($(CC),clang)
@ -2220,7 +2217,7 @@ ifneq ($(TARGET),LINUX)
FOPTIONS += -ffast-math #-Wunused
endif
ifeq ($(V),-1)
ifeq ($(FLANG_LT_16),true)
ifeq ($(FLANG_NEW),false)
FOPTIONS += -w
endif
COPTIONS += -w
@ -2246,13 +2243,11 @@ ifneq ($(TARGET),LINUX)
GNU_GE_4_6=true
FOPTIONS+=-fno-backslash
ifeq ($(FLANG_LT_16),true)
ifeq ($(FLANG_NEW),false)
FOPTIONS+=-mcmodel=medium
COPTIONS+=-mcmodel=medium
CFLAGS_FORGA = -mcmodel=medium
FFLAGS_FORGA = -mcmodel=medium
else
DEFINES += -D__FLANG
endif
else
GNUMAJOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC__ |cut -c18-)

View file

@ -15,7 +15,7 @@
include ../config/makefile.h
include ../config/makelib.h
ifeq ($(FLANG_LT_16),false)
ifeq ($(FLANG_NEW),true)
FOPTIONS += -fno-automatic
endif
ifeq ($(_FC),pgf90)

View file

@ -15,7 +15,7 @@ c
data errmsg /' '/
data input_line /0/
data xblnk /' '/
#if defined(CRAY) || defined(HPUX) || defined(WIN32) || defined(PSCALE) || defined(__FLANG) || ( __GNUC__ >= 4) || defined(FUJITSU)
#if defined(CRAY) || defined(HPUX) || defined(WIN32) || defined(PSCALE) || defined(__FLANG) || defined(__flang__) || ( __GNUC__ >= 4) || defined(FUJITSU)
data xtab /' '/ ! Tab ... no backslash necessary
#elif (defined(LINUX) || defined(MACX)) && !defined(PGLINUX) && !defined(XLFLINUX) &&!( __GNUC__ >= 4)
data xtab /9/ ! Tab ... g77 has trouble with escape sequence

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash
!/usr/bin/env bash
#set -v
arch=`uname -m`
VERSION=0.3.24
@ -152,12 +152,7 @@ elif [[ -n ${FC} ]] && [[ $(../../../config/strip_compiler.sh "${FC}") == "flan
if [[ ${BLAS_SIZE} == 8 ]]; then
LAPACK_FPFLAGS_VAL+=" -fdefault-integer-8"
fi
FLANG_VERSION=$(${FC} --version |head -1 | sed 's/^.*\(version\)//'|cut -d . -f 1)
if [[ ${FLANG_VERSION} -lt 17 ]]; then
FLANG_GE_17="false"
else
FLANG_GE_17="true"
fi
FLANG_NEW = $( [ $( $({FC)} --help |head -1| cut -d " " -f 2 ) == flang ] && echo true || echo false)
elif [[ "${_FC}" == "crayftn" ]] ; then
# FORCETARGET+=' F_COMPILER=FLANG '
LAPACK_FPFLAGS_VAL=" -s integer64 -ef "
@ -260,7 +255,7 @@ echo output redirected to libext/openblas/OpenBLAS/openblas.log
echo
if [[ ${_FC} == xlf ]]; then
$MYMAKE FC="xlf -qextname" $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKEJ >& openblas.log
elif [[ ${FLANG_GE_17} == "true" ]]; then
elif [[ ${FLANG_NEW} == "true" ]]; then
$MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET FCOMMON_OPT="$LAPACK_FPFLAGS_VAL" LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKEJ >& openblas.log
else
$MYMAKE FC=$FC CC=$CC HOSTCC=gcc $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib $MAKEJ >& openblas.log