Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263267 - toolchain-funcs.eclass should provide a function to query openmp support of the compiler
Summary: toolchain-funcs.eclass should provide a function to query openmp support of t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-21 15:43 UTC by Justin Lecher (RETIRED)
Modified: 2010-08-11 14:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2009-03-21 15:43:33 UTC
More and more package use openmp support and use their own function to check for openmp support. I think it would be a good idea to have one in the toolchain-funcs.eclass. This would avoid redundant code and provide a clean way to check for it.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2009-03-22 01:20:59 UTC
I thought about something like

--- toolchain-funcs.eclass	2009-03-01 11:05:55.000000000 +0100
+++ toolchain-funcs.eclass.new	2009-03-22 02:18:08.817522416 +0100
@@ -450,3 +450,11 @@
 		fi
 	done
 }
+
+if [[ -z NEED_OPENMP ]]; then
+	if [[ $(tc-getCC) == *gcc* ]]; then
+		DEPEND="${DEPEND}
+			sys-devel/gcc[openmp]"
+	fi
+fi
+

This must be adapted to other arches and compilers.
Comment 2 SpanKY gentoo-dev 2009-03-22 22:22:19 UTC
no, we have USE=openmp for packages to use
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2009-03-23 07:49:30 UTC
(In reply to comment #2)
> no, we have USE=openmp for packages to use
> 

That doesn't fix my request. If a package uses USE="openmp" but gcc isn't compiled with openmp or doesn't support openmp because of the version, the package couldn't be compiled with openmp support. Therefor every ebuild which wants to provide openmp support has to query for openmp compatibility of the compiler. I just wnated to move this check to an eclass.

You answer is not enough. You can say, no we don't want this check provided as a function in an eclass and every ebuild should have its own code for that. Than that has to be excepted, but not just Wontfix with no argument.
Comment 4 SpanKY gentoo-dev 2009-03-23 18:44:47 UTC
then the user shouldnt have added openmp to their USE flags in the first place
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2010-08-11 14:19:13 UTC
reopen to close correctly