Skip to content

Commit

Permalink
user/gcc: restrict libgomp to some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Feb 10, 2025
1 parent fcd94a0 commit 3b981f4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions user/gcc/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@
"--with-abi=lp64d",
]

_have_libgomp = False

match self.profile().arch:
case "aarch64" | "ppc64le" | "ppc64" | "riscv64" | "x86_64":
_have_libgomp = True
case _:
configure_args += ["--disable-libgomp"]


def init_configure(self):
cfl = self.get_cflags(shell=True)
Expand Down Expand Up @@ -249,7 +257,7 @@ def _(self):
return ["usr/lib/libobjc.so.*"]


@subpackage("gcc-gomp-devel")
@subpackage("gcc-gomp-devel", _have_libgomp)
def _(self):
self.subdesc = "OpenMP develpment files"
return [
Expand All @@ -261,7 +269,7 @@ def _(self):
]


@subpackage("gcc-gomp-libs")
@subpackage("gcc-gomp-libs", _have_libgomp)
def _(self):
self.subdesc = "OpenMP runtime"
return ["usr/lib/libgomp.so.*"]
Expand Down

0 comments on commit 3b981f4

Please sign in to comment.