From b331e794059590c0cd04fcf570b0f659144217c1 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Thu, 29 Sep 2022 16:57:56 +0200 Subject: [PATCH] Temporary workaround added to enable HDF5 compilation with AOCC flang --- lib/installer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/installer.py b/lib/installer.py index 5143d81..2631f0b 100644 --- a/lib/installer.py +++ b/lib/installer.py @@ -52,6 +52,11 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu 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 + # workaround for bad autotools reconization of flang + if lib_name == "hdf5" and "aocc" in inst_dir: + config_command = config_command + " FCFLAGS=-fPIC" + if verbose: print(underlined("\nConfiguring Library")) else: @@ -62,6 +67,11 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu print("See "+logfile_path+" for details") sys.exit(1) + # TODO: THIS IS UGLY AND NEED TO BE MOVED TO EITHER LIB OR COMPILER CONFIGURATION + # workaround for bad autotools reconization of flang + if lib_name == "hdf5" and "aocc" in inst_dir: + err = subprocess.call("sed -i -e 's/wl=\"\"/wl=\"-Wl,\"/g' libtool", shell=True) + # build library build_command = lib['build'].replace("$BUILDTHREADS", build_threads) if verbose: