aboutsummaryrefslogtreecommitdiff
path: root/spec2xxx-config
diff options
context:
space:
mode:
Diffstat (limited to 'spec2xxx-config')
-rwxr-xr-xspec2xxx-config10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec2xxx-config b/spec2xxx-config
index ffe5505..751c38b 100755
--- a/spec2xxx-config
+++ b/spec2xxx-config
@@ -194,6 +194,15 @@ sw_os="$(uname -r | head -n 1)"
sw_compiler="$(${tools[cc]} -v 2>&1 | tail -n 1)"
#sw_compiler="$sw_compiler $(${tools[cc]} -v 2>&1 | grep 'Configured with' | head -n 1)"
+# -funconstrained-commons is needed since gcc-6, use it if supported
+funconstrained_commons=
+cat > main.f90 <<EOF
+program main
+end program main
+EOF
+$(${tools[fortran]} main.f90 -funconstrained-commons) && funconstrained_commons=-funconstrained-commons
+rm -f main.f90 a.out
+
case "$mcpu:$hw_cpu" in
"autodetect:"*"v7l"*) mcpu="-mcpu=cortex-a15" ;;
"autodetect:"*"aarch64"*) mcpu="-mcpu=cortex-a57" ;;
@@ -388,6 +397,7 @@ cat $cfg_tmpl | sed \
-e "s#@DSPEC_CPU_LP64@#$spec_cpu_lp64#g" \
-e "s#@RATE_COPIES@#$rate_copies#g" \
-e "s#@MAX_MCF_RATE_COPIES@#$max_mcf_rate_copies#g" \
+ -e "s#@FUNCONSTRAINED_COMMONS@#$funconstrained_commons#g" \
-e "s#@PERF_CALLGRAPH@#$perf_callgraph#g" \
-e "s#@PERF_CPU@#$perf_cpu#g" \
-e "s#@BIND@#$bind_cpu#g" \