Also added flang workaround for NECDF-F

This commit is contained in:
Patrick Lipka 2022-09-29 17:25:40 +02:00
parent b331e79405
commit a91dbb39b2
1 changed files with 4 additions and 4 deletions

View File

@ -52,9 +52,9 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
shared_option = "" shared_option = ""
config_command = lib['configure'].replace("$PREFIX", inst_dir).replace("$SHARED",shared_option) config_command = lib['configure'].replace("$PREFIX", inst_dir).replace("$SHARED",shared_option)
# TODO: THIS IS UGLY AND NEED TO BE MOVED TO EITHER LIB OR COMPILER CONFIGURATION # TODO: THIS IS UGLY AND NEEDS TO BE MOVED TO EITHER LIB OR COMPILER CONFIGURATION
# workaround for bad autotools reconization of flang # workaround for bad autotools reconization of flang
if lib_name == "hdf5" and "aocc" in inst_dir: if (lib_name == "hdf5" or lib_name == "netcdf-f") and "aocc" in inst_dir:
config_command = config_command + " FCFLAGS=-fPIC" config_command = config_command + " FCFLAGS=-fPIC"
if verbose: if verbose:
@ -67,9 +67,9 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
print("See "+logfile_path+" for details") print("See "+logfile_path+" for details")
sys.exit(1) sys.exit(1)
# TODO: THIS IS UGLY AND NEED TO BE MOVED TO EITHER LIB OR COMPILER CONFIGURATION # TODO: THIS IS UGLY AND NEEDS TO BE MOVED TO EITHER LIB OR COMPILER CONFIGURATION
# workaround for bad autotools reconization of flang # workaround for bad autotools reconization of flang
if lib_name == "hdf5" and "aocc" in inst_dir: if (lib_name == "hdf5" or lib_name == "netcdf-f") and "aocc" in inst_dir:
err = subprocess.call("sed -i -e 's/wl=\"\"/wl=\"-Wl,\"/g' libtool", shell=True) err = subprocess.call("sed -i -e 's/wl=\"\"/wl=\"-Wl,\"/g' libtool", shell=True)
# build library # build library