summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Heinzeller <dom.heinzeller@icloud.com>2023-12-01 17:24:05 -0700
committerGitHub <noreply@github.com>2023-12-01 17:24:05 -0700
commitca164d6619d5246d8f9c31d078cb9acf05b16854 (patch)
tree3028e84360c838357faf408bd541073aa67610ae
parenta6325762315e5390153375f11051be83956a2adb (diff)
downloadspack-ca164d6619d5246d8f9c31d078cb9acf05b16854.tar.gz
spack-ca164d6619d5246d8f9c31d078cb9acf05b16854.tar.bz2
spack-ca164d6619d5246d8f9c31d078cb9acf05b16854.tar.xz
spack-ca164d6619d5246d8f9c31d078cb9acf05b16854.zip
Fix curl install using Intel compilers (#41380)
When using Intel to build curl, add 'CFLAGS=-we147' to the configure args to fix error 'compiler does not halt on function prototype mismatch'
-rw-r--r--var/spack/repos/builtin/packages/curl/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py
index 362b559ab6..f26247a44a 100644
--- a/var/spack/repos/builtin/packages/curl/package.py
+++ b/var/spack/repos/builtin/packages/curl/package.py
@@ -345,6 +345,12 @@ class Curl(NMakePackage, AutotoolsPackage):
def command(self):
return Executable(self.prefix.bin.join("curl-config"))
+ def flag_handler(self, name, flags):
+ build_system_flags = []
+ if name == "cflags" and self.spec.compiler.name in ["intel", "oneapi"]:
+ build_system_flags = ["-we147"]
+ return flags, None, build_system_flags
+
class AutotoolsBuilder(AutotoolsBuilder):
def configure_args(self):