summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Becker <becker33@llnl.gov>2015-10-02 16:12:51 -0700
committerGregory Becker <becker33@llnl.gov>2015-11-10 15:45:22 -0800
commit2d77173dfa182140c4a4ea1102895a573684e324 (patch)
treec7e67276d9c8263333f573456ce9140bab073fc0
parent42b5b7d2ddf9091f4832c3aefc09ee2926ae7c9a (diff)
downloadspack-2d77173dfa182140c4a4ea1102895a573684e324.tar.gz
spack-2d77173dfa182140c4a4ea1102895a573684e324.tar.bz2
spack-2d77173dfa182140c4a4ea1102895a573684e324.tar.xz
spack-2d77173dfa182140c4a4ea1102895a573684e324.zip
partial commit of cflags for debugging
-rwxr-xr-xlib/spack/env/cc39
-rw-r--r--lib/spack/spack/build_environment.py2
-rw-r--r--lib/spack/spack/concretize.py4
-rw-r--r--lib/spack/spack/spec.py10
4 files changed, 43 insertions, 12 deletions
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 0bb723c237..b15c7b429b 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -89,31 +89,44 @@ done
command=$(basename "$0")
case "$command" in
cc|gcc|c89|c99|clang|xlc)
- command="$SPACK_CC"
-# command="$SPACK_CC $SPACK_CFLAGS"
+ command=("$SPACK_CC")
+ if [ "$SPACK_CFLAGS" ]; then
+ command+=("$SPACK_CFLAGS")
+ fi
language="C"
;;
c++|CC|g++|clang++|xlC)
- command="$SPACK_CXX"
-# command="$SPACK_CXX SPACK_CXXFLAGS"
+ command=("$SPACK_CXX")
+ if [ "$SPACK_CXXFLAGS" ]; then
+ command+=("$SPACK_CXXFLAGS")
+ fi
language="C++"
;;
f77|xlf)
- command="$SPACK_F77"
-# command="$SPACK_F77 $SPACK_FFLAGS"
+ command=("$SPACK_F77")
+ if [ "$SPACK_FFLAGS" ]; then
+ command+=("$SPACK_FFLAGS")
+ fi
language="Fortran 77"
;;
fc|f90|f95|xlf90)
command="$SPACK_FC"
-# command="$SPACK_FC $SPACK_FFLAGS"
+ if [ "$SPACK_FFLAGS" ]; then
+ command+=("$SPACK_FFLAGS")
+ fi
language="Fortran 90"
;;
cpp)
mode=cpp
+ if [ "$SPACK_CPPFLAGS" ]; then
+ command+=("$SPACK_CPPFLAGS")
+ fi
;;
ld)
mode=ld
- # command+=" $LDFLAGS"
+ if [ "$SPACK_LDFLAGS" ]; then
+ command+=("$SPACK_LDFLAGS")
+ fi
;;
*)
die "Unkown compiler: $command"
@@ -123,7 +136,9 @@ esac
# Finish setting up the mode.
if [ -z "$mode" ]; then
mode=ccld
-# command+=" $SPACK_LDFLAGS"
+ if [ "$SPACK_LDFLAGS" ]; then
+ command+=("$SPACK_LDFLAGS")
+ fi
for arg in "$@"; do
if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then
mode=vcheck
@@ -324,7 +339,8 @@ for dir in "${env_path[@]}"; do
done
export PATH
-full_command=("$command")
+full_command=("${command[@]}")
+#full_command+=("$SPACK_CFLAGS")
full_command+=("${args[@]}")
#
@@ -337,4 +353,7 @@ if [ "$SPACK_DEBUG" = "TRUE" ]; then
echo "$mode ${full_command[@]}" >> $output_log
fi
+echo "---------------------------" > /g/g0/becker33/cflag_test
+echo "${full_command[@]}" >> /g/g0/becker33/cflag_test
+echo "---------------------------" >> /g/g0/becker33/cflag_test
exec "${full_command[@]}"
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index d3e781e3fc..6ede669fd0 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -104,7 +104,7 @@ def set_compiler_environment_variables(pkg):
if compiler.fc:
os.environ['SPACK_FC'] = compiler.fc
- # Encorporate the compiler default flags into the set of flags
+ # Incorporate the compiler default flags into the set of flags
for flag in flags:
if flag in compiler.flags:
compiler.flags[flag] += ' '+flags[flag]
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 72f98bdc5f..946199bc6c 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -189,7 +189,9 @@ class DefaultConcretizer(object):
spec.compiler_flags = nearest.compiler_flags.copy()
except StopIteration:
- return False
+ if spec.compiler_flags == spec.root.compiler_flags:
+ return False
+ spec.compiler_flags = spec.root.compiler_flags
return True # things changed.
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 385d1864a1..379b51fb39 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1142,6 +1142,12 @@ class Spec(object):
def _normalize_helper(self, visited, spec_deps, provider_index):
"""Recursive helper function for _normalize."""
+ print self,"self help"
+# print
+# from spack.graph import graph_ascii
+# graph_ascii(self)
+# print
+ print spec_deps
if self.name in visited:
return False
visited.add(self.name)
@@ -1206,6 +1212,10 @@ class Spec(object):
visited = set()
any_change = self._normalize_helper(visited, spec_deps, index)
+ print self, "self norm"
+ print spec_deps
+ print visited
+
# If there are deps specified but not visited, they're not
# actually deps of this package. Raise an error.
extra = set(spec_deps.keys()).difference(visited)