[SCons] Fix compilation of f77 sample with clang+gfortran

Compiling demo_ftnlib.cpp as a shared object (with -fPIC) fixes an
error about being unable to relocate some pthread-related symbol.
This commit is contained in:
Raymond Speth
2021-02-05 11:29:55 -05:00
committed by Bryan W. Weber
parent c9811e8e0a
commit 0edaf316ac
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ localenv['mak_stdlib'] = ['-l' + lib for lib in env['cxx_stdlib']]
samples = [('ctlib', ['ctlib.f']),
('isentropic', ['isentropic.f'])]
ftn_demo = localenv.Object('demo_ftnlib.cpp',
CPPPATH=['#include', localenv['boost_inc_dir'],
ftn_demo = localenv.SharedObject('demo_ftnlib.cpp',
CPPPATH=['#include', localenv['boost_inc_dir'],
localenv['extra_inc_dirs']])
for program_name, fortran_sources in samples:
buildSample(localenv.Program, program_name,
+1 -1
View File
@@ -12,7 +12,7 @@ env.Append(FFLAGS='-g',
LINKFLAGS=@tmpl_cantera_linkflags@,
FRAMEWORKS=@tmpl_cantera_frameworks@)
ctlib = env.Object('demo_ftnlib.cpp')
ctlib = env.SharedObject('demo_ftnlib.cpp')
demo = env.Program('demo', [ctlib, 'demo.f'],
LINK='@FORTRAN_LINK@')