Skip to content
Snippets Groups Projects
Commit a4f4a48f authored by Jehferson Mello's avatar Jehferson Mello
Browse files

Corrected include directives for icc

Turns out the `no include` directives cause ICC to not even look for its
own internals

Additionally, we need to point it to the correct place in our systems
where to find the glibc internal includes, otherwise compilation will
fail
parent ff98c364
No related branches found
No related tags found
2 merge requests!4Corrected include directives for icc,!1Code review of main
Pipeline #532221 failed
...@@ -5,6 +5,7 @@ from __future__ import annotations ...@@ -5,6 +5,7 @@ from __future__ import annotations
import asyncio import asyncio
import enum import enum
import os import os
import platform
import re import re
import secrets import secrets
import shutil import shutil
...@@ -504,10 +505,23 @@ def install_toolchain_compiler(spack_environment: str) -> dict[str, dict[str, st ...@@ -504,10 +505,23 @@ def install_toolchain_compiler(spack_environment: str) -> dict[str, dict[str, st
if len(compilers) == 2: if len(compilers) == 2:
gcc = compilers["fallback"] gcc = compilers["fallback"]
intel = compilers["default"] intel = compilers["default"]
arch_tag = platform.machine()
gcc_root = spack(f"location -i {gcc['package']}").stdout.strip() gcc_root = spack(f"location -i {gcc['package']}").stdout.strip()
cflags = f"-gcc-name={gcc_root}/bin/gcc -nostdinc -nostdlib" cflags = (
cxxflags = f"-gxx-name={gcc_root}/bin/g++ -nostdinc -nostdinc++ -nostdlib" f" -gcc-name={gcc_root}/bin/gcc"
fflags = f"-gcc-name={gcc_root}/bin/gcc -nostdinc -nostdlib" f" -idirafter/usr/include/{arch_tag}-linux-gnu"
" -diag-disable=10441"
)
cxxflags = (
f" -gxx-name={gcc_root}/bin/g++"
f" -idirafter/usr/include/{arch_tag}-linux-gnu"
" -diag-disable=10441"
)
fflags = (
f" -gcc-name={gcc_root}/bin/gcc"
f" -idirafter/usr/include/{arch_tag}-linux-gnu"
" -diag-disable=10441"
)
intel_spec = intel["name"].replace("@", "@=") intel_spec = intel["name"].replace("@", "@=")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment