Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain.eclass
Date: Sun, 10 Oct 2010 08:03:30
Message-Id: 20101010073233.B16122004C@flycatcher.gentoo.org
1 vapier 10/10/10 07:32:33
2
3 Modified: toolchain.eclass
4 Log:
5 make sure toolchain supports pthreads before enabling openmp #326757 #335883
6
7 Revision Changes Path
8 1.440 eclass/toolchain.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.440&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.440&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.439&r2=1.440
13
14 Index: toolchain.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
17 retrieving revision 1.439
18 retrieving revision 1.440
19 diff -u -r1.439 -r1.440
20 --- toolchain.eclass 5 Sep 2010 05:52:46 -0000 1.439
21 +++ toolchain.eclass 10 Oct 2010 07:32:33 -0000 1.440
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.439 2010/09/05 05:52:46 dirtyepic Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.440 2010/10/10 07:32:33 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29
30 @@ -1150,7 +1150,15 @@
31 fi
32
33 if tc_version_is_at_least "4.2" ; then
34 - confgcc="${confgcc} $(use_enable openmp libgomp)"
35 + # Make sure target has pthreads support. #326757 #335883
36 + # There shouldn't be a chicken&egg problem here as openmp won't
37 + # build without a C library, and you can't build that w/out
38 + # already having a compiler ...
39 + if ! is_crosscompile || \
40 + $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
41 + then
42 + confgcc="${confgcc} $(use_enable openmp libgomp)"
43 + fi
44 fi
45
46 # enable the cld workaround until we move things to stable.