use backticks

This commit is contained in:
Owen Rafferty 2022-04-27 12:08:03 -05:00
parent e0fcce528f
commit bd3214fddf
No known key found for this signature in database
GPG Key ID: A68B10E2554DEBCB
3 changed files with 135 additions and 105 deletions

61
c_check
View File

@ -1,10 +1,10 @@
#!/bin/sh
# Checking cross compile
hostos="$(uname -s | sed -e 's/\-.*//')"
hostarch="$(uname -m | sed -e 's/i.86/x86/')"
hostos=`uname -s | sed -e 's/\-.*//'`
hostarch=`uname -m | sed -e 's/i.86/x86/'`
if [ "$hostos" = "AIX" ] || [ "$hostos" = "SunOS" ]; then
hostarch="$(uname -p)"
hostarch=`uname -p`
fi
case "$hostarch" in
amd64) hostarch=x86_64 ;;
@ -23,7 +23,7 @@ flags="$*"
# First, we need to know the target OS and compiler name
{
data=$($compiler_name $flags -E ctest.c)
data=`$compiler_name $flags -E ctest.c`
} || {
printf '%s\n' "C Compiler ($compiler_name) is something wrong." >&2
exit 1
@ -31,11 +31,11 @@ flags="$*"
cross_suffix=""
if [ "$(dirname $compiler_name)" != '.' ]; then
cross_suffix="$cross_suffix$(dirname $compiler_name)/"
if [ "`dirname $compiler_name`" != '.' ]; then
cross_suffix="$cross_suffix`dirname $compiler_name`/"
fi
bn="$(basename $compiler_name)"
bn=`basename $compiler_name`
case "$bn" in
*-*) cross_suffix="$cross_suffix${bn%-*}-"
esac
@ -154,7 +154,7 @@ fi
# Do again
{
data=$($compiler_name $flags -E ctest.c)
data="$($compiler_name $flags -E ctest.c)"
} || {
printf '%s\n' "C Compiler ($compiler_name) is something wrong." >&2
exit 1
@ -162,7 +162,7 @@ fi
have_msa=0
if [ "$architecture" = "mips" ] || [ "$architecture" = "mips64" ]; then
tmpd=$(mktemp -d)
tmpd="$(mktemp -d)"
tmpf="$tmpd/a.c"
code='"addvi.b $w0, $w1, 1"'
msa_flags='-mmsa -mfp64 -mload-store-pairs'
@ -203,7 +203,7 @@ esac
no_avx512=0
if [ "$architecture" = "x86" ] || [ "$architecture" = "x86_64" ]; then
tmpd=$(mktemp -d)
tmpd=`mktemp -d`
tmpf="$tmpd/a.c"
code='"vbroadcastss -4 * 4(%rsi), %zmm2"'
printf "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(%s); }\n" "$code" >> "$tmpf"
@ -225,7 +225,7 @@ fi
c11_atomics=0
case "$data" in
*HAVE_C11*)
tmpd=$(mktemp -d)
tmpd=`mktemp -d`
tmpf="$tmpd/a.c"
printf "#include <stdatomic.h>\nint main(void){}\n" >> "$tmpf"
args=' -c -o $tmpf.o $tmpf'
@ -244,7 +244,7 @@ if [ "$compiler" = "GCC" ]; then
case "$architecture" in x86|x86_64)
no_avx2=0
oldgcc=0
data=$($compiler_name -dumpversion)
data=`$compiler_name -dumpversion`
case "$data" in *.*.*)
data="${data%.*}"
esac
@ -255,10 +255,10 @@ if [ "$compiler" = "GCC" ]; then
esac
fi
data="$($compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s)"
data=`$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`
need_fu=''
if echo "$data" | grep -q 'globl[[:space:]][_\.]'; then
if echo "$data" | grep 'globl[[:space:]][_\.]'; then
need_fu="${data##*globl[[:space:]]}"
need_fu="${need_fu%%[!_\.]*}"
fi
@ -281,18 +281,20 @@ linker_L=""
linker_l=""
linker_a=""
link="$($compiler_name $flags -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $flags $openmp -v ctest2.o -o ctest2 2>&1 && rm -f ctest2.o ctest2 ctest2.exe)"
link=`$compiler_name $flags -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $flags $openmp -v ctest2.o -o ctest2 2>&1 && rm -f ctest2.o ctest2 ctest2.exe`
link="$(echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g')"
link=`echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g'`
flags="$(echo "$link" | tr '[:space:],\n' ' ')"
flags=`echo $link | tr '[[:space:]],\n' ' '`
# Strip trailing quotes
old_flags="$flags"
flags=''
for flag in $old_flags; do
f="${flag#\"}"
f="${flag%\"}"
f=`echo "$flag" | tr '"' ' '`
flags="$flags $f"
done
@ -329,14 +331,15 @@ done
:> "$makefile" || exit 1
:> "$config" || exit 1
# print $data, "\n";
{
printf "OSNAME=%s\n" "$os"
printf "ARCH=%s\n" "$architecture"
printf "C_COMPILER=%s\n" "$compiler"
[ "$binformat" != "bin32" ] && printf "BINARY32=\n"
[ "$binformat" != "bin64" ] && printf "BINARY64=\n"
[ $binformat != bin32 ] && printf "BINARY32=\n"
[ $binformat != 'bin64' ] && printf "BINARY64=\n"
[ "$binformat" = "bin32" ] && printf "BINARY32=1\n"
[ "$binformat" = "bin64" ] && printf "BINARY64=1\n"
[ -n "$need_fu" ] && printf 'FU=%s\n' "$need_fu"
@ -348,14 +351,14 @@ done
printf "HAVE_MSA=1\n"
printf "MSA_FLAGS=%s\n" "$msa_flags"
}
! [ "$no_avx512" -eq 1 ] || printf "NO_AVX512=1\n"
! [ "$no_avx2" -eq 1 ] || printf "NO_AVX2=1\n"
! [ "$oldgcc" -eq 1 ] || printf "OLDGCC=1\n"
[ "$no_avx512" -eq 1 ] && printf "NO_AVX512=1\n"
[ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n"
[ "$oldgcc" -eq 1 ] && printf "OLDGCC=1\n"
} >> "$makefile"
os="$(echo "$os" | tr '[:lower:]' '[:upper:]'/ )"
architecture="$(echo "$architecture" | tr '[:lower:]' '[:upper:]' )"
compiler="$(echo "$compiler" | tr '[:lower:]' '[:upper:]' )"
os=`echo "$os" | tr '[[:lower:]]' '[[:upper:]]'/ `
architecture=`echo "$architecture" | tr '[[:lower:]]' '[[:upper:]]' `
compiler=`echo "$compiler" | tr '[[:lower:]]' '[[:upper:]]' `
{
printf "#define OS_%s\t1\n" "$os"
@ -364,8 +367,8 @@ compiler="$(echo "$compiler" | tr '[:lower:]' '[:upper:]' )"
[ "$binformat" = "bin32" ] && printf "#define __32BIT__\t1\n"
[ "$binformat" = "bin64" ] && printf "#define __64BIT__\t1\n"
[ -n "$need_fu" ] && printf "#define FUNDERSCORE\t%s\n" "$need_fu"
! [ "$have_msa" -eq 1 ] || printf "#define HAVE_MSA\t1\n"
! [ "$c11_atomics" -eq 1 ] || printf "#define HAVE_C11\t1\n"
[ "$have_msa" -eq 1 ] && printf "#define HAVE_MSA\t1\n"
[ "$c11_atomics" -eq 1 ] && printf "#define HAVE_C11\t1\n"
} >> "$config"

View File

@ -3615,14 +3615,40 @@ lapack_embeded_underscore_objs_z="
zlaunhr_col_getrfnp zlaunhr_col_getrfnp2 zunhr_col
"
dirname="$(dirname "$(dirname "$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")/lapack-netlib"
dirname=`pwd`/lapack-netlib
if [ "${13}" -eq 1 ]; then
p1=$1
p2=$2
p3=$3
p4=$4
p5=$5
p6=$6
p7=$7
p8=$8
p9=$9
shift
p10=$9
shift
p11=$9
shift
p12=$9
shift
p13=$9
shift
p14=$9
shift
p15=$9
shift
p16=$9
shift
p17=$9
if [ $p13 -eq 1 ]; then
blasobjs="$blasobjs $bfblasobjs"
cblasobjs="$cblasobjs $bfcblasobjs"
fi
if [ "${14}" -eq 1 ]; then
if [ $p14 -eq 1 ]; then
blasobjs="$blasobjs $blasobjss"
cblasobjs="$cblasobjs $cblasobjss"
lapackobjs="$lapackobjs $lapackobjss"
@ -3635,11 +3661,11 @@ if [ "${14}" -eq 1 ]; then
lapackeobjs="$lapackeobjs $lapackeobjss"
fi
if [ "${15}" -eq 1 ]; then
if [ $p15 -eq 1 ]; then
blasobjs="$blasobjs $blasobjsd"
cblasobjs="$cblasobjs $cblasobjsd"
lapackobjs="$lapackobjs $lapackobjsd"
if [ "${14}" -eq 0 ]; then
if [ $p14 -eq 0 ]; then
lapackobjs2="$lapackobjs2 $lapackobjs2ds"
fi
lapackobjs2="$lapackobjs2 $lapackobjs2d $lapackobjs2dz"
@ -3649,14 +3675,14 @@ if [ "${15}" -eq 1 ]; then
lapackeobjs="$lapackeobjs $lapackeobjsd"
fi
if [ "${16}" -eq 1 ]; then
if [ $p16 -eq 1 ]; then
blasobjs="$blasobjs $blasobjsc"
cblasobjs="$cblasobjs $cblasobjsc"
gemm3mobjs="$gemm3mobjs $gemm3mobjsc"
cblasgemm3mobjs="$cblasgemm3mobjs $cblasgemm3mobjsc"
lapackobjs="$lapackobjs $lapackobjsc"
lapackobjs2="$lapackobjs2 $lapackobjs2c $lapackobjs2zc"
if [ "${14}" -eq 0 ]; then
if [ $p14 -eq 0 ]; then
lapackobjs2="$lapackobjs2 $lapackobjs2sc"
fi
lapack_deprecated_objs="$lapack_deprecated_objs $lapack_deprecated_objsc"
@ -3665,17 +3691,17 @@ if [ "${16}" -eq 1 ]; then
lapackeobjs="$lapackeobjs $lapackeobjsc"
fi
if [ "${17}" -eq 1 ]; then
if [ $p17 -eq 1 ]; then
blasobjs="$blasobjs $blasobjsz"
cblasobjs="$cblasobjs $cblasobjsz"
gemm3mobjs="$gemm3mobjs $gemm3mobjsz"
cblasgemm3mobjs="$cblasgemm3mobjs $cblasgemm3mobjsz"
lapackobjs="$lapackobjs $lapackobjsz"
lapackobjs2="$lapackobjs2 $lapackobjs2z"
if [ "${16}" -eq 0 ]; then
if [ $p16 -eq 0 ]; then
lapackobjs2="$lapackobjs2 $lapackobjs2zc"
fi
if [ "${15}" -eq 0 ]; then
if [ $p15 -eq 0 ]; then
lapackobjs2="$lapackobjs2 $lapackobjs2dz"
fi
lapack_deprecated_objs="$lapack_deprecated_objs $lapack_deprecated_objsz"
@ -3684,14 +3710,14 @@ if [ "${17}" -eq 1 ]; then
lapackeobjs="$lapackeobjs $lapackeobjsz"
fi
if [ "$9" -eq 1 ]; then
if [ $p9 -eq 1 ]; then
#ONLY_CBLAS=1
underscore_objs="$misc_underscore_objs"
elif [ "$6" -eq 1 ]; then
elif [ $p6 -eq 1 ]; then
#NO_LAPACK=1
underscore_objs="$blasobjs $misc_underscore_objs"
elif [ -d "$dirname" ]; then
if [ "$8" -eq 0 ]; then
if [ $p8 -eq 0 ]; then
# NEED2UNDERSCORES=0
# Don't need 2 underscores
underscore_objs="$blasobjs $lapackobjs $lapackobjs2 $misc_underscore_objs $lapack_embeded_underscore_objs"
@ -3701,7 +3727,7 @@ elif [ -d "$dirname" ]; then
need_2underscore_objs="$lapack_embeded_underscore_objs"
fi
if [ "${12}" -eq 1 ]; then
if [ $p12 -eq 1 ]; then
#BUILD_LAPACK_DEPRECATED=1
underscore_objs="$underscore_objs $lapack_deprecated_objs"
fi
@ -3709,25 +3735,25 @@ else
underscore_objs="$blasobjs $lapackobjs $misc_underscore_objs"
fi
if [ "$9" -eq 1 ]; then
if [ $p9 -eq 1 ]; then
# ONLY_CBLAS=1
gemm3mobjs=''
exblasobjs=''
fi
if [ "$4" -eq 1 ]; then
if [ $p4 -eq 1 ]; then
underscore_objs="$underscore_objs $exblasobjs"
fi
case "$2" in
case $p2 in
x86_64|x86|ia64|MIPS)
underscore_objs="$underscore_objs $gemm3mobjs"
;;
esac
if [ "$5" -eq 0 ]; then
if [ $p5 -eq 0 ]; then
no_underscore_objs="$cblasobjs $misc_no_underscore_objs"
case "$2" in
case $p2 in
x86_64|x86|ia64|MIPS)
no_underscore_objs="$no_underscore_objs $cblasgemm3mobjs"
;;
@ -3737,8 +3763,8 @@ else
no_underscore_objs="$misc_no_underscore_objs"
fi
if [ "$7" -ne 1 ]; then
if [ "${12}" -eq 1 ]; then
if [ $p7 -ne 1 ]; then
if [ $p12 -eq 1 ]; then
# BUILD_LAPACK_DEPRECATED=1
no_underscore_objs="$no_underscore_objs $lapackeobjs $lapacke_deprecated_objs"
else
@ -3749,16 +3775,16 @@ fi
hplobjs="daxpy dcopy dscal idamax dgemv dtrsv dger dgemm dtrsm"
#hplobjs2="HPL_dlaswp00N HPL_dlaswp01N HPL_dlaswp01T"
bu="$3"
bu="$p3"
if [ "$bu" = "0" ] || [ "$bu" = "1" ]; then
bu=""
fi
symbolprefix="${10}"
symbolsuffix="${11}"
symbolprefix=$p10
symbolsuffix=$p11
case "$1" in
case "$p1" in
osx)
underscore_objs="$underscore_objs $misc_common_objs"
no_underscore_objs="$no_underscore_objs $misc_common_objs"
@ -3839,45 +3865,45 @@ case "$1" in
no_underscore_objs="$no_underscore_objs $misc_common_objs"
for obj in $underscore_objs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s%s=%s_ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count + 1))
count=`expr $count + 1`
printf '\t%s%s_%s=%s_ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count + 1))
# count=$((count + 1))
printf '\t%s%s%s=%s_ @%s\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=$((count + 1))
# count=$((count + 1))
done
for obj in $need_2underscore_objs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s%s=%s__ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s__%s=%s__ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s%s=%s__ @%s\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
done
for obj in $misc_common_objs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s_%s=%s_ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s%s=%s_ @%s\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
done
for obj in $no_underscore_objs; do
printf '\t%s%s%s=%s @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
done
;;
@ -3885,16 +3911,16 @@ case "$1" in
printf 'EXPORTS\n'
count=1
for obj in $hplobjs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s%s=%s_ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s_%s=%s_ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s%s=%s_ @%s\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
done
;;
@ -3904,36 +3930,37 @@ case "$1" in
printf 'EXPORTS\n'
count=1
for obj in $underscore_objs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s%s = %s_\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s_%s = %s_\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s%s = %s_\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s_%s = %s_\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj"
count=$((count+1))
# count=$((count+1))
done
for obj in $need_2underscore_objs; do
uppercase="$(echo "$obj" | tr '[:lower:]' '[:upper:]')"
uppercase=`echo "$obj" | tr '[[:lower:]]' '[[:upper:]]'`
printf '\t%s%s%s=%s__ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s__%s=%s__ @%s\n' \
"$symbolprefix" "$obj" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
printf '\t%s%s%s=%s__ @%s\n' \
"$symbolprefix" "$uppercase" "$symbolsuffix" "$obj" "$count"
count=$((count+1))
# count=$((count+1))
done
;;
linktest)
underscore_objs="$underscore_objs $misc_common_objs"
no_underscore_objs="$no_underscore_objs $misc_common_objs"

52
f_check
View File

@ -34,7 +34,7 @@ compiler_bin="$1"
# f77 is too ambiguous
[ "$compiler" = "f77" ] && compiler=''
path=$(split "$PATH" ':')
path=`split "$PATH" ':'`
if [ -z "$compiler" ]; then
@ -70,9 +70,9 @@ else
data="$(command -v "$compiler_bin" >/dev/null 2>&1)"
vendor=""
} && {
data=$($compiler -O2 -S ftest.f > /dev/null 2>&1 && cat ftest.s && rm -f ftest.s)
data=`$compiler -O2 -S ftest.f > /dev/null 2>&1 && cat ftest.s && rm -f ftest.s`
if [ -z "$data" ]; then
data=$($compiler -O2 -S ftest.f > /dev/null 2>&1 && cat ftest.c && rm -f ftest.c)
data=`$compiler -O2 -S ftest.f > /dev/null 2>&1 && cat ftest.c && rm -f ftest.c`
fi
case "$data" in *zhoge_*) bu=_ ;; esac
@ -144,10 +144,10 @@ else
esac
# for embedded underscore name, e.g. zho_ge, it may append 2 underscores.
data=$($compiler -O2 -S ftest3.f >/dev/null 2>&1 && cat ftest3.s && rm -f ftest3.s)
data=`$compiler -O2 -S ftest3.f >/dev/null 2>&1 && cat ftest3.s && rm -f ftest3.s`
[ -z "$data" ] && {
data=$($compiler -O2 -S ftest3.f >/dev/null 2>&1 && cat ftest3.c && rm -f ftest3.c)
data=`$compiler -O2 -S ftest3.f >/dev/null 2>&1 && cat ftest3.c && rm -f ftest3.c`
}
case "$data" in *' zho_ge__'*) need2bu=1 ;; esac
@ -232,7 +232,7 @@ else
fi
{
data="$(command -v $compiler_bin >/dev/null 2>&1)"
data=`command -v $compiler_bin >/dev/null 2>&1`
} && {
binary=$BINARY
@ -242,21 +242,21 @@ fi
case "$binary" in
32)
{
link=$($compiler $openmp -m32 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -m32 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
link=$($compiler $openmp -q32 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -q32 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
# for AIX
link=$($compiler $openmp -maix32 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -maix32 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
# for gfortran MIPS
mips_data=$($compiler_bin -E -dM - < /dev/null)
mips_data=`$compiler_bin -E -dM - < /dev/null`
case "$mips_data" in
*_MIPS_ISA_MIPS64*)
link=$($compiler $openmp -mabi=n32 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -mabi=n32 -v ftest2.f 2>&1 && rm -f a.out a.exe`
;;
*)
link=$($compiler $openmp -mabi=32 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -mabi=32 -v ftest2.f 2>&1 && rm -f a.out a.exe`
;;
esac
} || {
@ -265,18 +265,18 @@ fi
;;
64)
{
link=$($compiler $openmp -m64 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -m64 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
link=$($compiler $openmp -q64 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -q64 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
# for AIX
link=$($compiler $openmp -maix64 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -maix64 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
# for gfortran MIPS
link=$($compiler $openmp -mabi=64 -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -mabi=64 -v ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
# for nagfor
link=$($compiler $openmp -dryrun ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -dryrun ftest2.f 2>&1 && rm -f a.out a.exe`
} || {
binary=''
}
@ -284,12 +284,12 @@ fi
esac
if [ -z "$binary" ]; then
link=$($compiler $openmp -v ftest2.f 2>&1 && rm -f a.out a.exe)
link=`$compiler $openmp -v ftest2.f 2>&1 && rm -f a.out a.exe`
fi
}
if [ "$vendor" = "NAG" ]; then
link="$($compiler $openmp -dryrun ftest2.f 2>&1 && rm -f a.out a.exe)"
link=`$compiler $openmp -dryrun ftest2.f 2>&1 && rm -f a.out a.exe`
fi
linker_L=""
linker_l=""
@ -297,15 +297,15 @@ linker_a=""
if [ -n "$link" ]; then
link="$(echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g')"
link=`echo "$link" | sed 's/\-Y[[:space:]]P\,/\-Y/g'`
link="$(echo "$link" | sed 's/\-R[[:space:]]*/\-rpath\%/g')"
link=`echo "$link" | sed 's/\-R[[:space:]]*/\-rpath\%/g'`
link="$(echo "$link" | sed 's/\-rpath[[:space:]]+/\-rpath\%/g')"
link=`echo "$link" | sed 's/\-rpath[[:space:]]+/\-rpath\%/g'`
link="$(echo "$link" | sed 's/\-rpath-link[[:space:]]+/\-rpath-link\%/g')"
link=`echo "$link" | sed 's/\-rpath-link[[:space:]]+/\-rpath-link\%/g'`
flags="$(echo "$link" | tr ',\n' ' ')"
flags=`echo "$link" | tr ',\n' ' '`
# remove leading and trailing quotes from each flag.
#@flags = map {s/^['"]|['"]$//g; $_} @flags;
@ -330,12 +330,12 @@ if [ -n "$link" ]; then
esac
case "$flag" in -rpath%*)
flag="$(echo "$flag" | sed 's/\%/\,/g')"
flag=`echo "$flag" | sed 's/\%/\,/g'`
linker_L="$linker_L -Wl,$flag"
esac
case "$flag" in -rpath-link%*)
flag="$(echo "$flag" | sed 's/\%/\,/g')"
flag=`echo "$flag" | sed 's/\%/\,/g'`
linker_L="$linker_L -Wl,$flag"
;;
esac