Skip to content

Commit

Permalink
Workaround a GCC 9 compiler bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillikers committed Oct 5, 2023
1 parent 75f2eba commit 2a0a1d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions recipes/libsystemd/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def requirements(self):
def validate(self):
if self.settings.os != "Linux":
raise ConanInvalidConfiguration("Only Linux supported")
if os.getenv('NOT_ON_C3I', '0') == '0' and Version(self.version) >= "253.10" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "9":
raise ConanInvalidConfiguration(f"{self.name}/{self.version} and newer is not supported with gcc 9 on C3I until gcc 9.3 or newer is used\n"\
"If your using gcc 9.3 or newer, set environment variable NOT_ON_C3I=1")
if Version(self.version) >= "253.10" and self.settings.compiler == "gcc":
if Version(self.settings.compiler.version) == "9":
self.output.warn(f"{self.name}/{self.version} and newer requires gcc 9.3 or newer")
elif Version(self.settings.compiler.version) in ["9.1", "9.2"]:
raise ConanInvalidConfiguration(f"{self.name}/{self.version} and newer cannot be built with gcc 9.1 or 9.2")

def build_requirements(self):
self.tool_requires("meson/1.2.2")
Expand Down

0 comments on commit 2a0a1d4

Please sign in to comment.