libunistring: 1.2 needs std=c18 for icc, add icc C++ flags update (#37607)
This commit is contained in:
parent
7df23c7471
commit
22043617aa
@ -92,6 +92,14 @@ def c11_flag(self):
|
|||||||
else:
|
else:
|
||||||
return "-std=c1x"
|
return "-std=c1x"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def c18_flag(self):
|
||||||
|
# c18 supported since oneapi 2022, which is classic version 2021.5.0
|
||||||
|
if self.real_version < Version("21.5.0"):
|
||||||
|
raise UnsupportedCompilerFlag(self, "the C18 standard", "c18_flag", "< 21.5.0")
|
||||||
|
else:
|
||||||
|
return "-std=c18"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cc_pic_flag(self):
|
def cc_pic_flag(self):
|
||||||
return "-fPIC"
|
return "-fPIC"
|
||||||
|
@ -461,9 +461,13 @@ def test_intel_flags():
|
|||||||
unsupported_flag_test("cxx14_flag", "intel@=14.0")
|
unsupported_flag_test("cxx14_flag", "intel@=14.0")
|
||||||
supported_flag_test("cxx14_flag", "-std=c++1y", "intel@=15.0")
|
supported_flag_test("cxx14_flag", "-std=c++1y", "intel@=15.0")
|
||||||
supported_flag_test("cxx14_flag", "-std=c++14", "intel@=15.0.2")
|
supported_flag_test("cxx14_flag", "-std=c++14", "intel@=15.0.2")
|
||||||
|
unsupported_flag_test("cxx17_flag", "intel@=18")
|
||||||
|
supported_flag_test("cxx17_flag", "-std=c++17", "intel@=19.0")
|
||||||
unsupported_flag_test("c99_flag", "intel@=11.0")
|
unsupported_flag_test("c99_flag", "intel@=11.0")
|
||||||
supported_flag_test("c99_flag", "-std=c99", "intel@=12.0")
|
supported_flag_test("c99_flag", "-std=c99", "intel@=12.0")
|
||||||
unsupported_flag_test("c11_flag", "intel@=15.0")
|
unsupported_flag_test("c11_flag", "intel@=15.0")
|
||||||
|
supported_flag_test("c18_flag", "-std=c18", "intel@=21.5.0")
|
||||||
|
unsupported_flag_test("c18_flag", "intel@=21.4.0")
|
||||||
supported_flag_test("c11_flag", "-std=c1x", "intel@=16.0")
|
supported_flag_test("c11_flag", "-std=c1x", "intel@=16.0")
|
||||||
supported_flag_test("cc_pic_flag", "-fPIC", "intel@=1.0")
|
supported_flag_test("cc_pic_flag", "-fPIC", "intel@=1.0")
|
||||||
supported_flag_test("cxx_pic_flag", "-fPIC", "intel@=1.0")
|
supported_flag_test("cxx_pic_flag", "-fPIC", "intel@=1.0")
|
||||||
|
@ -46,6 +46,11 @@ def patch(self):
|
|||||||
# https://bugs.gentoo.org/688464#c9 (this links to all further info)
|
# https://bugs.gentoo.org/688464#c9 (this links to all further info)
|
||||||
filter_file("# pragma weak pthread_create", "", "tests/glthread/thread.h")
|
filter_file("# pragma weak pthread_create", "", "tests/glthread/thread.h")
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
if name == "cflags" and self.spec.satisfies("@1.1:") and self.spec.satisfies("%intel"):
|
||||||
|
flags.append(self.compiler.c18_flag)
|
||||||
|
return (flags, None, None)
|
||||||
|
|
||||||
@when("@master")
|
@when("@master")
|
||||||
def autoreconf(self, spec, prefix):
|
def autoreconf(self, spec, prefix):
|
||||||
which("./gitsub.sh")("pull")
|
which("./gitsub.sh")("pull")
|
||||||
|
Loading…
Reference in New Issue
Block a user