Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also define $LD in buildopts for GATE #855

Merged
merged 3 commits into from Mar 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions easybuild/easyblocks/g/gate.py
Expand Up @@ -92,8 +92,17 @@ def build_step(self):
cflags += " -gcc"
cxxflags += " -gcc"

tup = (os.getenv('CC'), cflags, os.getenv('CXX'), cxxflags)
self.cfg.update('buildopts', 'CC="%s" CFLAGS="%s" CXX="%s" CXXFLAGS="%s"' % tup)
# make sure right compilers and compiler options are used for building
make_opts = {
'CC': os.getenv('CC'),
'CFLAGS': cflags,
'CXX': os.getenv('CXX'),
'CXXFLAGS': cxxflags,
# filemerger Makefile hardcodes $LD to g++, so make sure right compiler is used for linking
'LD': os.getenv('CXX'),
}
for key in sorted(make_opts):
self.cfg.update('buildopts', '%s="%s"' % (key, make_opts[key]))

for subdir in self.gate_subdirs:
try:
Expand Down Expand Up @@ -147,7 +156,7 @@ def install_step(self):
os.mkdir(libdir)
srclibdir = os.path.join(self.cfg['start_dir'], "tmp", self.g4system, "Gate")
for fil in os.listdir(srclibdir):
if os.path.splitext(fil)[1] == shlib_ext:
if fil.endswith('.%s' % shlib_ext):
shutil.copy2(os.path.join(srclibdir, fil), os.path.join(libdir, fil))
self.log.debug("Copied library %s to 'lib' install subdirectory" % fil)
except OSError, err:
Expand Down