* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2008-01-02 1:01 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2008-01-02 1:01 UTC (permalink / raw
To: gentoo-commits
vapier 08/01/02 01:01:04
Modified: toolchain-funcs.eclass
Log:
handle linux-2.6.24+ where {i386,x86_64}=>{x86}
Revision Changes Path
1.75 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.75&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.75&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.74&r2=1.75
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- toolchain-funcs.eclass 17 Aug 2007 10:14:13 -0000 1.74
+++ toolchain-funcs.eclass 2 Jan 2008 01:01:03 -0000 1.75
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.74 2007/08/17 10:14:13 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.75 2008/01/02 01:01:03 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -170,7 +170,15 @@
bfin*) ninj blackfin bfin;;
cris*) echo cris;;
hppa*) ninj parisc hppa;;
- i?86*) ninj i386 x86;;
+ i?86*)
+ # Starting with linux-2.6.24, the 'x86_64' and 'i386'
+ # trees have been unified into 'x86'.
+ if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) ]] ; then
+ echo i386
+ else
+ echo x86
+ fi
+ ;;
ia64*) echo ia64;;
m68*) echo m68k;;
mips*) echo mips;;
@@ -205,7 +213,15 @@
|| echo sparc
;;
vax*) echo vax;;
- x86_64*) ninj x86_64 amd64;;
+ x86_64*)
+ # Starting with linux-2.6.24, the 'x86_64' and 'i386'
+ # trees have been unified into 'x86'.
+ if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.24) ]] ; then
+ echo x86
+ else
+ ninj x86_64 amd64
+ fi
+ ;;
# since our usage of tc-arch is largely concerned with
# normalizing inputs for testing ${CTARGET}, let's filter
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2008-04-16 14:16 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-16 14:16 UTC (permalink / raw
To: gentoo-commits
vapier 08/04/16 14:16:46
Modified: toolchain-funcs.eclass
Log:
set locale to C when trying to parse the output of gcc as reported by Xake #217852
Revision Changes Path
1.76 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.76&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.76&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.75&r2=1.76
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- toolchain-funcs.eclass 2 Jan 2008 01:01:03 -0000 1.75
+++ toolchain-funcs.eclass 16 Apr 2008 14:16:45 -0000 1.76
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.75 2008/01/02 01:01:03 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.76 2008/04/16 14:16:45 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -297,7 +297,7 @@
# Returns the installation directory - internal toolchain
# function for use by _gcc-specs-exists (for flag-o-matic).
_gcc-install-dir() {
- echo "$($(tc-getCC) -print-search-dirs 2> /dev/null |\
+ echo "$(LC_ALL=C $(tc-getCC) -print-search-dirs 2> /dev/null |\
awk '$1=="install:" {print $2}')"
}
# Returns true if the indicated specs file exists - internal toolchain
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2008-06-01 8:56 Alexis Ballier (aballier)
0 siblings, 0 replies; 58+ messages in thread
From: Alexis Ballier (aballier) @ 2008-06-01 8:56 UTC (permalink / raw
To: gentoo-commits
aballier 08/06/01 08:56:56
Modified: toolchain-funcs.eclass
Log:
Fix tc-arch-kernel for freebsd: it is still i386 there, bug #222715
Revision Changes Path
1.77 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.77&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.77&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.76&r2=1.77
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- toolchain-funcs.eclass 16 Apr 2008 14:16:45 -0000 1.76
+++ toolchain-funcs.eclass 1 Jun 2008 08:56:56 -0000 1.77
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.76 2008/04/16 14:16:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.77 2008/06/01 08:56:56 aballier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -173,7 +173,8 @@
i?86*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
# trees have been unified into 'x86'.
- if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) ]] ; then
+ # FreeBSD still uses i386
+ if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -lt $(KV_to_int 2.6.24) || ${host} == *freebsd* ]] ; then
echo i386
else
echo x86
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2008-07-03 5:26 Donnie Berkholz (dberkholz)
0 siblings, 0 replies; 58+ messages in thread
From: Donnie Berkholz (dberkholz) @ 2008-07-03 5:26 UTC (permalink / raw
To: gentoo-commits
dberkholz 08/07/03 05:26:47
Modified: toolchain-funcs.eclass
Log:
[Fortran] Do a little reworking, since these functions remain unused by anything. Rename tc-getF90() to tc-getFC() for consistency with autotools, fortran.eclass, etc. Drop tc-getFORTRAN() -- people should use the appropriate function.
Revision Changes Path
1.78 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.78&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.78&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.77&r2=1.78
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- toolchain-funcs.eclass 1 Jun 2008 08:56:56 -0000 1.77
+++ toolchain-funcs.eclass 3 Jul 2008 05:26:47 -0000 1.78
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.77 2008/06/01 08:56:56 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.78 2008/07/03 05:26:47 dberkholz Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -76,14 +76,10 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 77 compiler
tc-getF77() { tc-getPROG F77 f77 "$@"; }
-# @FUNCTION: tc-getF90
+# @FUNCTION: tc-getFC
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 90 compiler
-tc-getF90() { tc-getPROG F90 gfortran "$@"; }
-# @FUNCTION: tc-getFORTRAN
-# @USAGE: [toolchain prefix]
-# @RETURN: name of the Fortran compiler
-tc-getFORTRAN() { tc-getPROG FORTRAN gfortran "$@"; }
+tc-getFC() { tc-getPROG FC gfortran "$@"; }
# @FUNCTION: tc-getGCJ
# @USAGE: [toolchain prefix]
# @RETURN: name of the java compiler
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2008-09-16 6:40 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2008-09-16 6:40 UTC (permalink / raw
To: gentoo-commits
vapier 08/09/16 06:40:22
Modified: toolchain-funcs.eclass
Log:
tc-export: make sure the variable requested for export is a valid variable
Revision Changes Path
1.79 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.79&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.79&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.78&r2=1.79
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- toolchain-funcs.eclass 3 Jul 2008 05:26:47 -0000 1.78
+++ toolchain-funcs.eclass 16 Sep 2008 06:40:21 -0000 1.79
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.78 2008/07/03 05:26:47 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.79 2008/09/16 06:40:21 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -116,6 +116,7 @@
tc-export() {
local var
for var in "$@" ; do
+ [[ $(type -t tc-get${var}) != "function" ]] && die "tc-export: invalid export variable '${var}'"
eval tc-get${var} > /dev/null
done
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-01-08 3:46 Gordon Malm (gengor)
0 siblings, 0 replies; 58+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08 3:46 UTC (permalink / raw
To: gentoo-commits
gengor 09/01/08 03:46:07
Modified: toolchain-funcs.eclass
Log:
Add exception for >=gcc-4 to gcc-specs-ssp-to-all func
Revision Changes Path
1.81 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.81&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.81&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.80&r2=1.81
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- toolchain-funcs.eclass 2 Jan 2009 22:14:18 -0000 1.80
+++ toolchain-funcs.eclass 8 Jan 2009 03:46:06 -0000 1.81
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.80 2009/01/02 22:14:18 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.81 2009/01/08 03:46:06 gengor Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -371,6 +371,8 @@
}
# Returns true if gcc upgrades fstack-protector to fstack-protector-all
gcc-specs-ssp-to-all() {
+ # GCC 4.x does not have -fno-stack-protector-all by default
+ [[ $(gcc-major-version) -ge 4 ]] && return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fno-stack-protector-all:} != ${directive} ]])
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-01-08 6:33 Gordon Malm (gengor)
0 siblings, 0 replies; 58+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08 6:33 UTC (permalink / raw
To: gentoo-commits
gengor 09/01/08 06:33:20
Modified: toolchain-funcs.eclass
Log:
Knock off the version-fu and use test-flags-CC
Revision Changes Path
1.82 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.82&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.82&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.81&r2=1.82
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- toolchain-funcs.eclass 8 Jan 2009 03:46:06 -0000 1.81
+++ toolchain-funcs.eclass 8 Jan 2009 06:33:20 -0000 1.82
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.81 2009/01/08 03:46:06 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.82 2009/01/08 06:33:20 gengor Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -365,20 +365,21 @@
}
# Returns true if gcc builds with the stack protector
gcc-specs-ssp() {
+ [[ $(test-flags-CC -fno-stack-protector) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fno-stack-protector:} != ${directive} ]])
}
# Returns true if gcc upgrades fstack-protector to fstack-protector-all
gcc-specs-ssp-to-all() {
- # GCC 4.x does not have -fno-stack-protector-all by default
- [[ $(gcc-major-version) -ge 4 ]] && return 1
+ [[ $(test-flags-CC -fno-stack-protector-all) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fno-stack-protector-all:} != ${directive} ]])
}
# Returns true if gcc builds with fno-strict-overflow
gcc-specs-nostrict() {
+ [[ $(test-flags-CC -fstrict-overflow) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fstrict-overflow:} != ${directive} ]])
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-01-08 9:56 Gordon Malm (gengor)
0 siblings, 0 replies; 58+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08 9:56 UTC (permalink / raw
To: gentoo-commits
gengor 09/01/08 09:56:00
Modified: toolchain-funcs.eclass
Log:
Revert changes to hardened funcs for now
Revision Changes Path
1.83 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.83&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.83&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.82&r2=1.83
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- toolchain-funcs.eclass 8 Jan 2009 06:33:20 -0000 1.82
+++ toolchain-funcs.eclass 8 Jan 2009 09:56:00 -0000 1.83
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.82 2009/01/08 06:33:20 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.83 2009/01/08 09:56:00 gengor Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -365,21 +365,18 @@
}
# Returns true if gcc builds with the stack protector
gcc-specs-ssp() {
- [[ $(test-flags-CC -fno-stack-protector) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fno-stack-protector:} != ${directive} ]])
}
# Returns true if gcc upgrades fstack-protector to fstack-protector-all
gcc-specs-ssp-to-all() {
- [[ $(test-flags-CC -fno-stack-protector-all) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fno-stack-protector-all:} != ${directive} ]])
}
# Returns true if gcc builds with fno-strict-overflow
gcc-specs-nostrict() {
- [[ $(test-flags-CC -fstrict-overflow) ]] || return 1
local directive
directive=$(gcc-specs-directive cc1)
return $([[ ${directive/\{!fstrict-overflow:} != ${directive} ]])
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-01-08 11:06 Gordon Malm (gengor)
0 siblings, 0 replies; 58+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08 11:06 UTC (permalink / raw
To: gentoo-commits
gengor 09/01/08 11:06:10
Modified: toolchain-funcs.eclass
Log:
Add quoting to comparison on gcc-specs- funcs - fixes false results with GCC 4.x
Revision Changes Path
1.84 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.84&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.84&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.83&r2=1.84
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- toolchain-funcs.eclass 8 Jan 2009 09:56:00 -0000 1.83
+++ toolchain-funcs.eclass 8 Jan 2009 11:06:10 -0000 1.84
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.83 2009/01/08 09:56:00 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.84 2009/01/08 11:06:10 gengor Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -349,37 +349,37 @@
gcc-specs-relro() {
local directive
directive=$(gcc-specs-directive link_command)
- return $([[ ${directive/\{!norelro:} != ${directive} ]])
+ return $([[ "${directive/\{!norelro:}" != "${directive}" ]])
}
# Returns true if gcc sets now
gcc-specs-now() {
local directive
directive=$(gcc-specs-directive link_command)
- return $([[ ${directive/\{!nonow:} != ${directive} ]])
+ return $([[ "${directive/\{!nonow:}" != "${directive}" ]])
}
# Returns true if gcc builds PIEs
gcc-specs-pie() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ ${directive/\{!nopie:} != ${directive} ]])
+ return $([[ "${directive/\{!nopie:}" != "${directive}" ]])
}
# Returns true if gcc builds with the stack protector
gcc-specs-ssp() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ ${directive/\{!fno-stack-protector:} != ${directive} ]])
+ return $([[ "${directive/\{!fno-stack-protector:}" != "${directive}" ]])
}
# Returns true if gcc upgrades fstack-protector to fstack-protector-all
gcc-specs-ssp-to-all() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ ${directive/\{!fno-stack-protector-all:} != ${directive} ]])
+ return $([[ "${directive/\{!fno-stack-protector-all:}" != "${directive}" ]])
}
# Returns true if gcc builds with fno-strict-overflow
gcc-specs-nostrict() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ ${directive/\{!fstrict-overflow:} != ${directive} ]])
+ return $([[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]])
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-01-27 23:35 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2009-01-27 23:35 UTC (permalink / raw
To: gentoo-commits
vapier 09/01/27 23:35:04
Modified: toolchain-funcs.eclass
Log:
first cut at a more automated method for ldscript installation
Revision Changes Path
1.85 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.85&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.85&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.84&r2=1.85
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- toolchain-funcs.eclass 8 Jan 2009 11:06:10 -0000 1.84
+++ toolchain-funcs.eclass 27 Jan 2009 23:35:04 -0000 1.85
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.84 2009/01/08 11:06:10 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.85 2009/01/27 23:35:04 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -384,7 +384,7 @@
# @FUNCTION: gen_usr_ldscript
-# @USAGE: <list of libs to create linker scripts for>
+# @USAGE: [-a] <list of libs to create linker scripts for>
# @DESCRIPTION:
# This function generate linker scripts in /usr/lib for dynamic
# libs in /lib. This is to fix linking problems when you have
@@ -398,10 +398,16 @@
# the library (libfoo.so), as ldconfig should usually update it
# correctly to point to the latest version of the library present.
gen_usr_ldscript() {
- local lib libdir=$(get_libdir) output_format=""
+ local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
# Just make sure it exists
dodir /usr/${libdir}
+ if [[ $1 == "-a" ]] ; then
+ auto=true
+ shift
+ dodir /${libdir}
+ fi
+
# OUTPUT_FORMAT gives hints to the linker as to what binary format
# is referenced ... makes multilib saner
output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
@@ -413,6 +419,16 @@
ewarn "making a symlink instead."
dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}"
else
+ local tlib
+ if ${auto} ; then
+ lib="lib${lib}${suffix}"
+ mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die
+ tlib=$(scanelf -qF'%S#F' "${D}"/${libdir}/${lib})
+ [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
+ rm -f "${D}"/${libdir}/${lib}
+ else
+ tlib=${lib}
+ fi
cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
/* GNU ld script
Since Gentoo has critical dynamic libraries
@@ -423,9 +439,9 @@
See bug http://bugs.gentoo.org/4411 for more info.
*/
${output_format}
- GROUP ( /${libdir}/${lib} )
+ GROUP ( /${libdir}/${tlib} )
END_LDSCRIPT
+ fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
fi
- fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
done
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-02-25 0:25 Joshua Kinard (kumba)
0 siblings, 0 replies; 58+ messages in thread
From: Joshua Kinard (kumba) @ 2009-02-25 0:25 UTC (permalink / raw
To: gentoo-commits
kumba 09/02/25 00:25:51
Modified: toolchain-funcs.eclass
Log:
Add tc-getOBJCOPY
Revision Changes Path
1.86 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.86&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.86&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.85&r2=1.86
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- toolchain-funcs.eclass 27 Jan 2009 23:35:04 -0000 1.85
+++ toolchain-funcs.eclass 25 Feb 2009 00:25:51 -0000 1.86
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.85 2009/01/27 23:35:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.86 2009/02/25 00:25:51 kumba Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -72,6 +72,10 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the archiver indexer
tc-getRANLIB() { tc-getPROG RANLIB ranlib "$@"; }
+# @FUNCTION: tc-getOBJCOPY
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the object copier
+tc-getOBJCOPY() { tc-getPROG OBJCOPY objcopy "$@"; }
# @FUNCTION: tc-getF77
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 77 compiler
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-03-01 8:09 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2009-03-01 8:09 UTC (permalink / raw
To: gentoo-commits
vapier 09/03/01 08:09:44
Modified: toolchain-funcs.eclass
Log:
add more comments to the linker script
Revision Changes Path
1.87 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.87&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.87&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.86&r2=1.87
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- toolchain-funcs.eclass 25 Feb 2009 00:25:51 -0000 1.86
+++ toolchain-funcs.eclass 1 Mar 2009 08:09:44 -0000 1.87
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.86 2009/02/25 00:25:51 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.87 2009/03/01 08:09:44 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -435,10 +435,11 @@
fi
cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
/* GNU ld script
- Since Gentoo has critical dynamic libraries
- in /lib, and the static versions in /usr/lib,
- we need to have a "fake" dynamic lib in /usr/lib,
- otherwise we run into linking problems.
+ Since Gentoo has critical dynamic libraries in /lib, and the static versions
+ in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
+ run into linking problems. This "fake" dynamic lib is a linker script that
+ redirects the linker to the real lib. And yes, this works in the cross-
+ compiling scenario as the sysroot-ed linker will prepend the real path.
See bug http://bugs.gentoo.org/4411 for more info.
*/
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-03-28 11:09 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2009-03-28 11:09 UTC (permalink / raw
To: gentoo-commits
vapier 09/03/28 11:09:27
Modified: toolchain-funcs.eclass
Log:
support funk SONAMEs like libfoo.so -> libfoo-0.1.so
Revision Changes Path
1.88 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.88&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.88&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.87&r2=1.88
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- toolchain-funcs.eclass 1 Mar 2009 08:09:44 -0000 1.87
+++ toolchain-funcs.eclass 28 Mar 2009 11:09:27 -0000 1.88
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.87 2009/03/01 08:09:44 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.88 2009/03/28 11:09:27 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -426,8 +426,12 @@
local tlib
if ${auto} ; then
lib="lib${lib}${suffix}"
+ tlib=$(scanelf -qF'%S#F' "${D}"/usr/${libdir}/${lib})
mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die
- tlib=$(scanelf -qF'%S#F' "${D}"/${libdir}/${lib})
+ # some SONAMEs are funky: they encode a version before the .so
+ if [[ ${tlib} != ${lib}* ]] ; then
+ mv "${D}"/usr/${libdir}/${tlib}* "${D}"/${libdir}/ || die
+ fi
[[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
rm -f "${D}"/${libdir}/${lib}
else
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-04-04 17:17 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-04-04 17:17 UTC (permalink / raw
To: gentoo-commits
grobian 09/04/04 17:17:56
Modified: toolchain-funcs.eclass
Log:
Add support for all Prefix arches, in particular for gen_usr_ld_script, and add AIX specific function, backport from Prefix
Revision Changes Path
1.89 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.89&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.89&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.88&r2=1.89
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- toolchain-funcs.eclass 28 Mar 2009 11:09:27 -0000 1.88
+++ toolchain-funcs.eclass 4 Apr 2009 17:17:56 -0000 1.89
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.88 2009/03/28 11:09:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.89 2009/04/04 17:17:56 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -165,6 +165,43 @@
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
case ${host} in
+ powerpc-apple-darwin*)
+ echo ppc-macos;;
+ powerpc64-apple-darwin*)
+ echo ppc64-macos;;
+ i?86-apple-darwin*)
+ echo x86-macos;;
+ x86_64-apple-darwin*)
+ echo x64-macos;;
+ sparc-sun-solaris*)
+ echo sparc-solaris;;
+ sparcv9-sun-solaris*)
+ echo sparc64-solaris;;
+ i?86-pc-solaris*)
+ echo x86-solaris;;
+ x86_64-pc-solaris*)
+ echo x64-solaris;;
+ powerpc-ibm-aix*)
+ echo ppc-aix;;
+ mips-sgi-irix*)
+ echo mips-irix;;
+ ia64-hp-hpux*)
+ echo ia64-hpux;;
+ i?86-pc-freebsd*)
+ echo x86-freebsd;;
+ x86_64-pc-freebsd*)
+ echo x64-freebsd;;
+ i?86-pc-netbsd*)
+ echo x86-netbsd;;
+ i?86-pc-interix*)
+ echo x86-interix;;
+ i?86-pc-winnt*)
+ echo x86-winnt;;
+ i*-pc-freebsd*)
+ echo x86-freebsd;;
+ x86_64-pc-freebsd*)
+ echo x64-freebsd;;
+
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
@@ -418,11 +455,60 @@
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
for lib in "$@" ; do
- if [[ ${USERLAND} == "Darwin" ]] ; then
- ewarn "Not creating fake dynamic library for $lib on Darwin;"
- ewarn "making a symlink instead."
- dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}"
- else
+
+ # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks.
+ # This especially is for AIX where $(get_libname) can return ".a",
+ # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident).
+ [[ -r "${ED}"/${libdir}/${lib} ]] || continue
+
+ case ${CHOST} in
+ *-darwin*)
+ # Mach-O files have an id, which is like a soname, it tells how
+ # another object linking against this lib should reference it.
+ # Since we moved the lib from usr/lib into lib this reference is
+ # wrong. Hence, we update it here. We don't configure with
+ # libdir=/lib because that messes up libtool files.
+ # Make sure we don't lose the specific version, so just modify the
+ # existing install_name
+ install_name=$(otool -DX "${ED}"/${libdir}/${lib})
+ [[ -z ${install_name} ]] && die "No install name found for ${ED}/${libdir}/${lib}"
+ install_name_tool \
+ -id "${EPREFIX}"/${libdir}/${install_name##*/} \
+ "${ED}"/${libdir}/${lib}
+ # Now as we don't use GNU binutils and our linker doesn't
+ # understand linker scripts, just create a symlink.
+ pushd "${ED}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${lib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *-aix*|*-irix*|*-hpux*)
+ # we don't have GNU binutils on these platforms, so we symlink
+ # instead, which seems to work fine. Keep it relative, otherwise
+ # we break some QA checks in Portage
+ pushd "${ED}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${lib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *-interix*|*-winnt*)
+ # on interix, the linker scripts would work fine in _most_
+ # situations. if a library links to such a linker script the
+ # absolute path to the correct library is inserted into the binary,
+ # which is wrong, since anybody linking _without_ libtool will miss
+ # some dependencies, since the stupid linker cannot find libraries
+ # hardcoded with absolute paths (as opposed to the loader, which
+ # seems to be able to do this).
+ # this has been seen while building shared-mime-info which needs
+ # libxml2, but links without libtool (and does not add libz to the
+ # command line by itself).
+ pushd "${ED}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${lib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *-mint*)
+ # do nothing
+ return
+ ;;
+ *)
local tlib
if ${auto} ; then
lib="lib${lib}${suffix}"
@@ -450,7 +536,93 @@
${output_format}
GROUP ( /${libdir}/${tlib} )
END_LDSCRIPT
- fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
+ ;;
+ esac
+ fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
+ done
+}
+
+# This function is for AIX only.
+#
+# Showing a sample IMO is the best description:
+#
+# First, AIX has its own /usr/lib/libiconv.a containing 'shr.o' and 'shr4.o'.
+# Both of them are shared-objects packed into an archive, thus /usr/lib/libiconv.a
+# is a shared library (!), even it is called lib*.a.
+# This is the default layout on aix for shared libraries.
+# Read the ld(1) manpage for more information.
+#
+# But now, we want to install GNU libiconv (sys-libs/libiconv) both as
+# shared and static library.
+# AIX (since 4.3) can create shared libraries if '-brtl' or '-G' linker flags
+# are used.
+#
+# Now assume we have GNU tar installed while GNU libiconv was not.
+# This tar now has a runtime dependency on "libiconv.a(shr4.o)".
+# With our ld-wrapper (from sys-devel/binutils-config) we add EPREFIX/usr/lib
+# as linker path, thus it is recorded as loader path into the binary.
+#
+# When having libiconv.a (the static GNU libiconv) in prefix, the loader finds
+# that one and claims that it does not contain an 'shr4.o' object file:
+#
+# Could not load program tar:
+# Dependent module EPREFIX/usr/lib/libiconv.a(shr4.o) could not be loaded.
+# Member shr4.o is not found in archive
+#
+# According to gcc's "host/target specific installation notes" for *-ibm-aix* [1],
+# we can extract that 'shr4.o' from /usr/lib/libiconv.a, mark it as
+# non-linkable, and include it in our new static library.
+#
+# [1] http://gcc.gnu.org/install/specific.html#x-ibm-aix
+#
+# usage:
+# keep_aix_runtime_object <target-archive inside EPREFIX> <source-archive(objects)>
+# keep_aix_runtime_object "/usr/lib/libiconv.a "/usr/lib/libiconv.a(shr4.o,...)"
+keep_aix_runtime_objects() {
+ [[ ${CHOST} == *-*-aix* ]] || return 0
+
+ local target=$1
+ shift
+ local sources="$@"
+
+ # strip possible ${ED} prefixes
+ target=${target##/}
+ target=${target#${D##/}}
+ target=${target#${EPREFIX##/}}
+ target=${target##/}
+
+ if ! $(tc-getAR) -t "${ED}${target}" &>/dev/null; then
+ if [[ -e ${ED}${target} ]]; then
+ ewarn "${target} is not an archive."
fi
+ return 0
+ fi
+
+ local tmpdir=${TMP}/keep_aix_runtime_object-$$
+ mkdir ${tmpdir} || die
+
+ local origdir=$(pwd)
+ local s
+ for s in ${sources}; do
+ local sourcelib sourceobjs so
+ # format of $s: "/usr/lib/libiconv.a(shr4.o,shr.o)"
+ sourcelib=${s%%(*}
+ sourceobjs=${s#*(}
+ sourceobjs=${sourceobjs%)}
+ sourceobjs=${sourceobjs//,/ }
+ cd ${tmpdir} || die
+ for so in ${sourceobjs}; do
+ ebegin "keeping aix runtime object '${sourcelib}(${so})' in '${EPREFIX}/${target}'"
+ if ! $(tc-getAR) -x "${sourcelib}" ${so}; then
+ eend 1
+ continue
+ fi
+ chmod +w ${so} &&
+ $(tc-getSTRIP) -e ${so} &&
+ $(tc-getAR) -q "${ED}${target}" ${so} &&
+ eend 0 ||
+ eend 1
+ done
done
+ cd "${origdir}"
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-04-05 7:50 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-04-05 7:50 UTC (permalink / raw
To: gentoo-commits
grobian 09/04/05 07:50:08
Modified: toolchain-funcs.eclass
Log:
Revert 1.89 of toolchain-funcs.eclass, I should have reviewed it much better, and even worse it cases bugs like #264940
Revision Changes Path
1.90 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.90&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.90&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.89&r2=1.90
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- toolchain-funcs.eclass 4 Apr 2009 17:17:56 -0000 1.89
+++ toolchain-funcs.eclass 5 Apr 2009 07:50:08 -0000 1.90
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.89 2009/04/04 17:17:56 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.90 2009/04/05 07:50:08 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -165,43 +165,6 @@
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
case ${host} in
- powerpc-apple-darwin*)
- echo ppc-macos;;
- powerpc64-apple-darwin*)
- echo ppc64-macos;;
- i?86-apple-darwin*)
- echo x86-macos;;
- x86_64-apple-darwin*)
- echo x64-macos;;
- sparc-sun-solaris*)
- echo sparc-solaris;;
- sparcv9-sun-solaris*)
- echo sparc64-solaris;;
- i?86-pc-solaris*)
- echo x86-solaris;;
- x86_64-pc-solaris*)
- echo x64-solaris;;
- powerpc-ibm-aix*)
- echo ppc-aix;;
- mips-sgi-irix*)
- echo mips-irix;;
- ia64-hp-hpux*)
- echo ia64-hpux;;
- i?86-pc-freebsd*)
- echo x86-freebsd;;
- x86_64-pc-freebsd*)
- echo x64-freebsd;;
- i?86-pc-netbsd*)
- echo x86-netbsd;;
- i?86-pc-interix*)
- echo x86-interix;;
- i?86-pc-winnt*)
- echo x86-winnt;;
- i*-pc-freebsd*)
- echo x86-freebsd;;
- x86_64-pc-freebsd*)
- echo x64-freebsd;;
-
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
@@ -455,60 +418,11 @@
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
for lib in "$@" ; do
-
- # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks.
- # This especially is for AIX where $(get_libname) can return ".a",
- # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident).
- [[ -r "${ED}"/${libdir}/${lib} ]] || continue
-
- case ${CHOST} in
- *-darwin*)
- # Mach-O files have an id, which is like a soname, it tells how
- # another object linking against this lib should reference it.
- # Since we moved the lib from usr/lib into lib this reference is
- # wrong. Hence, we update it here. We don't configure with
- # libdir=/lib because that messes up libtool files.
- # Make sure we don't lose the specific version, so just modify the
- # existing install_name
- install_name=$(otool -DX "${ED}"/${libdir}/${lib})
- [[ -z ${install_name} ]] && die "No install name found for ${ED}/${libdir}/${lib}"
- install_name_tool \
- -id "${EPREFIX}"/${libdir}/${install_name##*/} \
- "${ED}"/${libdir}/${lib}
- # Now as we don't use GNU binutils and our linker doesn't
- # understand linker scripts, just create a symlink.
- pushd "${ED}/usr/${libdir}" > /dev/null
- ln -snf "../../${libdir}/${lib}" "${lib}"
- popd > /dev/null
- ;;
- *-aix*|*-irix*|*-hpux*)
- # we don't have GNU binutils on these platforms, so we symlink
- # instead, which seems to work fine. Keep it relative, otherwise
- # we break some QA checks in Portage
- pushd "${ED}/usr/${libdir}" > /dev/null
- ln -snf "../../${libdir}/${lib}" "${lib}"
- popd > /dev/null
- ;;
- *-interix*|*-winnt*)
- # on interix, the linker scripts would work fine in _most_
- # situations. if a library links to such a linker script the
- # absolute path to the correct library is inserted into the binary,
- # which is wrong, since anybody linking _without_ libtool will miss
- # some dependencies, since the stupid linker cannot find libraries
- # hardcoded with absolute paths (as opposed to the loader, which
- # seems to be able to do this).
- # this has been seen while building shared-mime-info which needs
- # libxml2, but links without libtool (and does not add libz to the
- # command line by itself).
- pushd "${ED}/usr/${libdir}" > /dev/null
- ln -snf "../../${libdir}/${lib}" "${lib}"
- popd > /dev/null
- ;;
- *-mint*)
- # do nothing
- return
- ;;
- *)
+ if [[ ${USERLAND} == "Darwin" ]] ; then
+ ewarn "Not creating fake dynamic library for $lib on Darwin;"
+ ewarn "making a symlink instead."
+ dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}"
+ else
local tlib
if ${auto} ; then
lib="lib${lib}${suffix}"
@@ -536,93 +450,7 @@
${output_format}
GROUP ( /${libdir}/${tlib} )
END_LDSCRIPT
- ;;
- esac
- fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
- done
-}
-
-# This function is for AIX only.
-#
-# Showing a sample IMO is the best description:
-#
-# First, AIX has its own /usr/lib/libiconv.a containing 'shr.o' and 'shr4.o'.
-# Both of them are shared-objects packed into an archive, thus /usr/lib/libiconv.a
-# is a shared library (!), even it is called lib*.a.
-# This is the default layout on aix for shared libraries.
-# Read the ld(1) manpage for more information.
-#
-# But now, we want to install GNU libiconv (sys-libs/libiconv) both as
-# shared and static library.
-# AIX (since 4.3) can create shared libraries if '-brtl' or '-G' linker flags
-# are used.
-#
-# Now assume we have GNU tar installed while GNU libiconv was not.
-# This tar now has a runtime dependency on "libiconv.a(shr4.o)".
-# With our ld-wrapper (from sys-devel/binutils-config) we add EPREFIX/usr/lib
-# as linker path, thus it is recorded as loader path into the binary.
-#
-# When having libiconv.a (the static GNU libiconv) in prefix, the loader finds
-# that one and claims that it does not contain an 'shr4.o' object file:
-#
-# Could not load program tar:
-# Dependent module EPREFIX/usr/lib/libiconv.a(shr4.o) could not be loaded.
-# Member shr4.o is not found in archive
-#
-# According to gcc's "host/target specific installation notes" for *-ibm-aix* [1],
-# we can extract that 'shr4.o' from /usr/lib/libiconv.a, mark it as
-# non-linkable, and include it in our new static library.
-#
-# [1] http://gcc.gnu.org/install/specific.html#x-ibm-aix
-#
-# usage:
-# keep_aix_runtime_object <target-archive inside EPREFIX> <source-archive(objects)>
-# keep_aix_runtime_object "/usr/lib/libiconv.a "/usr/lib/libiconv.a(shr4.o,...)"
-keep_aix_runtime_objects() {
- [[ ${CHOST} == *-*-aix* ]] || return 0
-
- local target=$1
- shift
- local sources="$@"
-
- # strip possible ${ED} prefixes
- target=${target##/}
- target=${target#${D##/}}
- target=${target#${EPREFIX##/}}
- target=${target##/}
-
- if ! $(tc-getAR) -t "${ED}${target}" &>/dev/null; then
- if [[ -e ${ED}${target} ]]; then
- ewarn "${target} is not an archive."
+ fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
fi
- return 0
- fi
-
- local tmpdir=${TMP}/keep_aix_runtime_object-$$
- mkdir ${tmpdir} || die
-
- local origdir=$(pwd)
- local s
- for s in ${sources}; do
- local sourcelib sourceobjs so
- # format of $s: "/usr/lib/libiconv.a(shr4.o,shr.o)"
- sourcelib=${s%%(*}
- sourceobjs=${s#*(}
- sourceobjs=${sourceobjs%)}
- sourceobjs=${sourceobjs//,/ }
- cd ${tmpdir} || die
- for so in ${sourceobjs}; do
- ebegin "keeping aix runtime object '${sourcelib}(${so})' in '${EPREFIX}/${target}'"
- if ! $(tc-getAR) -x "${sourcelib}" ${so}; then
- eend 1
- continue
- fi
- chmod +w ${so} &&
- $(tc-getSTRIP) -e ${so} &&
- $(tc-getAR) -q "${ED}${target}" ${so} &&
- eend 0 ||
- eend 1
- done
done
- cd "${origdir}"
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-05-24 7:25 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-05-24 7:25 UTC (permalink / raw
To: gentoo-commits
grobian 09/05/24 07:25:48
Modified: toolchain-funcs.eclass
Log:
gen_usr_ldscript:
* remove old USERLAND=Darwin hack
* add install_name adjusting case for Darwin
* add symlink creating cases for IRIX, AIX and HPUX
* likewise for Interix and Windows
* add support for -a for all platforms
* add EPREFIX for Prefix compatability (could use inherit prefix for
definition of EPREFIX variable)
tc-is-static-only:
* added function, currently only returning true for FreeMiNT (no shared
libraries)
reviewed by vapier
Revision Changes Path
1.91 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.91&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.91&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.90&r2=1.91
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- toolchain-funcs.eclass 5 Apr 2009 07:50:08 -0000 1.90
+++ toolchain-funcs.eclass 24 May 2009 07:25:48 -0000 1.91
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.90 2009/04/05 07:50:08 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.91 2009/05/24 07:25:48 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -155,6 +155,18 @@
esac
}
+# @FUNCTION: tc-is-static-only
+# @DESCRIPTION:
+# Return shell true if the target does not support shared libs, shell false
+# otherwise.
+tc-is-static-only() {
+ local host=${CTARGET:-${CHOST}}
+
+ # *MiNT doesn't have shared libraries, only platform so far
+ return $([[ ${host} == *-mint* ]])
+}
+
+
# Parse information from CBUILD/CHOST/CTARGET rather than
# use external variables from the profile.
tc-ninja_magic_to_arch() {
@@ -403,6 +415,10 @@
# correctly to point to the latest version of the library present.
gen_usr_ldscript() {
local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
+ [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+
+ tc-is-static-only && return
+
# Just make sure it exists
dodir /usr/${libdir}
@@ -418,26 +434,96 @@
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
for lib in "$@" ; do
- if [[ ${USERLAND} == "Darwin" ]] ; then
- ewarn "Not creating fake dynamic library for $lib on Darwin;"
- ewarn "making a symlink instead."
- dosym "/${libdir}/${lib}" "/usr/${libdir}/${lib}"
+ local tlib
+ if ${auto} ; then
+ lib="lib${lib}${suffix}"
else
- local tlib
+ # Ensure /lib/${lib} exists to avoid dangling scripts/symlinks.
+ # This especially is for AIX where $(get_libname) can return ".a",
+ # so /lib/${lib} might be moved to /usr/lib/${lib} (by accident).
+ [[ -r ${ED}/${libdir}/${lib} ]] || continue
+ #TODO: better die here?
+ fi
+
+ case ${CTARGET:-${CHOST}} in
+ *-darwin*)
if ${auto} ; then
- lib="lib${lib}${suffix}"
- tlib=$(scanelf -qF'%S#F' "${D}"/usr/${libdir}/${lib})
- mv "${D}"/usr/${libdir}/${lib}* "${D}"/${libdir}/ || die
+ tlib=$(scanmacho -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
+ else
+ tlib=$(scanmacho -qF'%S#F' "${ED}"/${libdir}/${lib})
+ fi
+ [[ -z ${tlib} ]] && die "unable to read install_name from ${lib}"
+ tlib=${tlib##*/}
+
+ if ${auto} ; then
+ mv "${ED}"/usr/${libdir}/${lib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die
+ rm -f "${ED}"/${libdir}/${lib}
+ fi
+
+ # Mach-O files have an id, which is like a soname, it tells how
+ # another object linking against this lib should reference it.
+ # Since we moved the lib from usr/lib into lib this reference is
+ # wrong. Hence, we update it here. We don't configure with
+ # libdir=/lib because that messes up libtool files.
+ # Make sure we don't lose the specific version, so just modify the
+ # existing install_name
+ install_name_tool \
+ -id "${EPREFIX}"/${libdir}/${tlib} \
+ "${ED}"/${libdir}/${tlib}
+ # Now as we don't use GNU binutils and our linker doesn't
+ # understand linker scripts, just create a symlink.
+ pushd "${ED}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${tlib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *-aix*|*-irix*|*-hpux*|*-interix*|*-winnt*)
+ if ${auto} ; then
+ mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
+ # no way to retrieve soname on these platforms (?)
+ tlib=$(readlink "${ED}"/${libdir}/${lib})
+ tlib=${tlib##*/}
+ if [[ -z ${tlib} ]] ; then
+ # ok, apparently was not a symlink, don't remove it and
+ # just link to it
+ tlib=${lib}
+ else
+ rm -f "${ED}"/${libdir}/${lib}
+ fi
+ else
+ tlib=${lib}
+ fi
+
+ # we don't have GNU binutils on these platforms, so we symlink
+ # instead, which seems to work fine. Keep it relative, otherwise
+ # we break some QA checks in Portage
+ # on interix, the linker scripts would work fine in _most_
+ # situations. if a library links to such a linker script the
+ # absolute path to the correct library is inserted into the binary,
+ # which is wrong, since anybody linking _without_ libtool will miss
+ # some dependencies, since the stupid linker cannot find libraries
+ # hardcoded with absolute paths (as opposed to the loader, which
+ # seems to be able to do this).
+ # this has been seen while building shared-mime-info which needs
+ # libxml2, but links without libtool (and does not add libz to the
+ # command line by itself).
+ pushd "${ED}/usr/${libdir}" > /dev/null
+ ln -snf "../../${libdir}/${tlib}" "${lib}"
+ popd > /dev/null
+ ;;
+ *)
+ if ${auto} ; then
+ tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
+ [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
+ mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
# some SONAMEs are funky: they encode a version before the .so
if [[ ${tlib} != ${lib}* ]] ; then
- mv "${D}"/usr/${libdir}/${tlib}* "${D}"/${libdir}/ || die
+ mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die
fi
- [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
- rm -f "${D}"/${libdir}/${lib}
+ rm -f "${ED}"/${libdir}/${lib}
else
tlib=${lib}
fi
- cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
+ cat > "${ED}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
/* GNU ld script
Since Gentoo has critical dynamic libraries in /lib, and the static versions
in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we
@@ -448,9 +534,10 @@
See bug http://bugs.gentoo.org/4411 for more info.
*/
${output_format}
- GROUP ( /${libdir}/${tlib} )
+ GROUP ( ${EPREFIX}/${libdir}/${tlib} )
END_LDSCRIPT
- fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
- fi
+ ;;
+ esac
+ fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
done
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-08-15 15:11 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-08-15 15:11 UTC (permalink / raw
To: gentoo-commits
grobian 09/08/15 15:11:17
Modified: toolchain-funcs.eclass
Log:
on Darwin we suffer from "funky sonames" as well (like ELF)
Revision Changes Path
1.92 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.92&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.92&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.91&r2=1.92
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- toolchain-funcs.eclass 24 May 2009 07:25:48 -0000 1.91
+++ toolchain-funcs.eclass 15 Aug 2009 15:11:17 -0000 1.92
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.91 2009/05/24 07:25:48 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.92 2009/08/15 15:11:17 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -457,6 +457,10 @@
if ${auto} ; then
mv "${ED}"/usr/${libdir}/${lib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die
+ # some install_names are funky: they encode a version
+ if [[ ${tlib} != ${lib%${suffix}}.*${suffix#.} ]] ; then
+ mv "${ED}"/usr/${libdir}/${tlib%${suffix}}.*${suffix#.} "${ED}"/${libdir}/ || die
+ fi
rm -f "${ED}"/${libdir}/${lib}
fi
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-08-15 15:12 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-08-15 15:12 UTC (permalink / raw
To: gentoo-commits
grobian 09/08/15 15:12:56
Modified: toolchain-funcs.eclass
Log:
add HPUX support for gen_usr_ldscript from Prefix
Revision Changes Path
1.93 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.93&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.93&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.92&r2=1.93
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- toolchain-funcs.eclass 15 Aug 2009 15:11:17 -0000 1.92
+++ toolchain-funcs.eclass 15 Aug 2009 15:12:56 -0000 1.93
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.92 2009/08/15 15:11:17 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.93 2009/08/15 15:12:56 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -480,7 +480,7 @@
ln -snf "../../${libdir}/${tlib}" "${lib}"
popd > /dev/null
;;
- *-aix*|*-irix*|*-hpux*|*-interix*|*-winnt*)
+ *-aix*|*-irix*|*64*-hpux*|*-interix*|*-winnt*)
if ${auto} ; then
mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
# no way to retrieve soname on these platforms (?)
@@ -514,6 +514,31 @@
ln -snf "../../${libdir}/${tlib}" "${lib}"
popd > /dev/null
;;
+ hppa*-hpux*) # PA-RISC 32bit (SOM) only, others (ELF) match *64*-hpux* above.
+ if ${auto} ; then
+ tlib=$(chatr "${ED}"/usr/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
+ [[ -z ${tlib} ]] && tlib=${lib}
+ tlib=${tlib##*/} # 'internal name' can have a path component
+ mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
+ # some SONAMEs are funky: they encode a version before the .so
+ if [[ ${tlib} != ${lib}* ]] ; then
+ mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die
+ fi
+ [[ ${tlib} != ${lib} ]] &&
+ rm -f "${ED}"/${libdir}/${lib}
+ else
+ tlib=$(chatr "${ED}"/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
+ [[ -z ${tlib} ]] && tlib=${lib}
+ tlib=${tlib##*/} # 'internal name' can have a path component
+ fi
+ pushd "${ED}"/usr/${libdir} >/dev/null
+ ln -snf "../../${libdir}/${tlib}" "${lib}"
+ # need the internal name in usr/lib too, to be available at runtime
+ # when linked with /path/to/lib.sl (hardcode_direct_absolute=yes)
+ [[ ${tlib} != ${lib} ]] &&
+ ln -snf "../../${libdir}/${tlib}" "${tlib}"
+ popd >/dev/null
+ ;;
*)
if ${auto} ; then
tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-09-02 9:00 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-09-02 9:00 UTC (permalink / raw
To: gentoo-commits
grobian 09/09/02 09:00:08
Modified: toolchain-funcs.eclass
Log:
Make the lib we're going to update using install_name_tool writable if
it isn't. Restore write permissions afterwards, fixes bug #283424
Revision Changes Path
1.94 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.94&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.94&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.93&r2=1.94
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- toolchain-funcs.eclass 15 Aug 2009 15:12:56 -0000 1.93
+++ toolchain-funcs.eclass 2 Sep 2009 09:00:08 -0000 1.94
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.93 2009/08/15 15:12:56 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.94 2009/09/02 09:00:08 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -471,9 +471,14 @@
# libdir=/lib because that messes up libtool files.
# Make sure we don't lose the specific version, so just modify the
# existing install_name
+ if [[ ! -w "${ED}/${libdir}/${tlib}" ]] ; then
+ fperms u+w "${libdir}/${tlib}" # needed to write to it
+ local nowrite=yes
+ fi
install_name_tool \
-id "${EPREFIX}"/${libdir}/${tlib} \
- "${ED}"/${libdir}/${tlib}
+ "${ED}"/${libdir}/${tlib} || die "install_name_tool failed"
+ [[ -n ${nowrite} ]] && fperms u-w "${libdir}/${tlib}"
# Now as we don't use GNU binutils and our linker doesn't
# understand linker scripts, just create a symlink.
pushd "${ED}/usr/${libdir}" > /dev/null
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-09-02 20:08 Fabian Groffen (grobian)
0 siblings, 0 replies; 58+ messages in thread
From: Fabian Groffen (grobian) @ 2009-09-02 20:08 UTC (permalink / raw
To: gentoo-commits
grobian 09/09/02 20:08:31
Modified: toolchain-funcs.eclass
Log:
fix bug #283424 for real
Revision Changes Path
1.95 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.95&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.95&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.94&r2=1.95
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- toolchain-funcs.eclass 2 Sep 2009 09:00:08 -0000 1.94
+++ toolchain-funcs.eclass 2 Sep 2009 20:08:31 -0000 1.95
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.94 2009/09/02 09:00:08 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.95 2009/09/02 20:08:31 grobian Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -472,13 +472,13 @@
# Make sure we don't lose the specific version, so just modify the
# existing install_name
if [[ ! -w "${ED}/${libdir}/${tlib}" ]] ; then
- fperms u+w "${libdir}/${tlib}" # needed to write to it
+ chmod u+w "${ED}${libdir}/${tlib}" # needed to write to it
local nowrite=yes
fi
install_name_tool \
-id "${EPREFIX}"/${libdir}/${tlib} \
"${ED}"/${libdir}/${tlib} || die "install_name_tool failed"
- [[ -n ${nowrite} ]] && fperms u-w "${libdir}/${tlib}"
+ [[ -n ${nowrite} ]] && chmod u-w "${ED}${libdir}/${tlib}"
# Now as we don't use GNU binutils and our linker doesn't
# understand linker scripts, just create a symlink.
pushd "${ED}/usr/${libdir}" > /dev/null
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-11-27 21:31 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2009-11-27 21:31 UTC (permalink / raw
To: gentoo-commits
vapier 09/11/27 21:31:29
Modified: toolchain-funcs.eclass
Log:
start a tc-get helper for pkg-config
Revision Changes Path
1.96 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.96&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.96&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.95&r2=1.96
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- toolchain-funcs.eclass 2 Sep 2009 20:08:31 -0000 1.95
+++ toolchain-funcs.eclass 27 Nov 2009 21:31:29 -0000 1.96
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.95 2009/09/02 20:08:31 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.96 2009/11/27 21:31:29 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -88,6 +88,10 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the java compiler
tc-getGCJ() { tc-getPROG GCJ gcj "$@"; }
+# @FUNCTION: tc-getPKG_CONFIG
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the pkg-config tool
+tc-getPKG_CONFIG() { tc-getPROG PKG_CONFIG pkg-config "$@"; }
# @FUNCTION: tc-getBUILD_CC
# @USAGE: [toolchain prefix]
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2009-12-01 4:44 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2009-12-01 4:44 UTC (permalink / raw
To: gentoo-commits
vapier 09/12/01 04:44:17
Modified: toolchain-funcs.eclass
Log:
tc-has-tls: new thread local storage test function
Revision Changes Path
1.97 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.97&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.97&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.96&r2=1.97
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- toolchain-funcs.eclass 27 Nov 2009 21:31:29 -0000 1.96
+++ toolchain-funcs.eclass 1 Dec 2009 04:44:17 -0000 1.97
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.96 2009/11/27 21:31:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.97 2009/12/01 04:44:17 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -170,6 +170,35 @@
return $([[ ${host} == *-mint* ]])
}
+# @FUNCTION: tc-has-tls
+# @USAGE: [-s|-c|-l] [toolchain prefix]
+# @DESCRIPTION:
+# See if the toolchain supports thread local storage (TLS). Use -s to test the
+# compiler, -c to also test the assembler, and -l to also test the C library
+# (the default).
+tc-has-tls() {
+ local base="${T}/test-tc-tls"
+ cat <<-EOF > "${base}.c"
+ int foo(int *i) {
+ static __thread int j = 0;
+ return *i ? j : *i;
+ }
+ EOF
+ local flags
+ case $1 in
+ -s) flags="-S";;
+ -c) flags="-c";;
+ -l) ;;
+ -*) die "Usage: tc-has-tls [-c|-l] [toolchain prefix]";;
+ esac
+ : ${flags:=-fPIC -shared -Wl,-z,defs}
+ [[ $1 == -* ]] && shift
+ $(tc-getCC "$@") ${flags} "${base}.c" -o "${base}" >&/dev/null
+ local ret=$?
+ rm -f "${base}"*
+ return ${ret}
+}
+
# Parse information from CBUILD/CHOST/CTARGET rather than
# use external variables from the profile.
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-03-15 23:51 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2010-03-15 23:51 UTC (permalink / raw
To: gentoo-commits
vapier 10/03/15 23:51:14
Modified: toolchain-funcs.eclass
Log:
tc-get{RC,DLLWRAP}: new helper functions for dealing with Windows toolchains
Revision Changes Path
1.98 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.98&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.98&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.97&r2=1.98
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- toolchain-funcs.eclass 1 Dec 2009 04:44:17 -0000 1.97
+++ toolchain-funcs.eclass 15 Mar 2010 23:51:14 -0000 1.98
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.97 2009/12/01 04:44:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.98 2010/03/15 23:51:14 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -92,6 +92,14 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the pkg-config tool
tc-getPKG_CONFIG() { tc-getPROG PKG_CONFIG pkg-config "$@"; }
+# @FUNCTION: tc-getRC
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the Windows resource compiler
+tc-getRC() { tc-getPROG RC windres "$@"; }
+# @FUNCTION: tc-getDLLWRAP
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the Windows dllwrap utility
+tc-getDLLWRAP() { tc-getPROG DLLWRAP dllwrap "$@"; }
# @FUNCTION: tc-getBUILD_CC
# @USAGE: [toolchain prefix]
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-04-22 18:28 Raul Porcel (armin76)
0 siblings, 0 replies; 58+ messages in thread
From: Raul Porcel (armin76) @ 2010-04-22 18:28 UTC (permalink / raw
To: gentoo-commits
armin76 10/04/22 18:28:11
Modified: toolchain-funcs.eclass
Log:
Add tc-is-hardfloat function, rename 'no' of tc-is-softfloat to 'target doesn't support softfloat', acked by vapier, bug #315987
Revision Changes Path
1.99 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.99&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.99&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.98&r2=1.99
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- toolchain-funcs.eclass 15 Mar 2010 23:51:14 -0000 1.98
+++ toolchain-funcs.eclass 22 Apr 2010 18:28:11 -0000 1.99
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.98 2010/03/15 23:51:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.99 2010/04/22 18:28:11 armin76 Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -150,7 +150,7 @@
# The possible return values:
# - only: the target is always softfloat (never had fpu)
# - yes: the target should support softfloat
-# - no: the target should support hardfloat
+# - no: the target doesn't support softfloat
# @CODE
# This allows us to react differently where packages accept
# softfloat flags in the case where support is optional, but
@@ -167,6 +167,19 @@
esac
}
+# @FUNCTION: tc-is-hardfloat
+# @DESCRIPTION:
+# See if this toolchain is a hardfloat based one.
+# @CODE
+# The possible return values:
+# - yes: the target should support hardfloat
+# - no: the target doesn't support hardfloat
+tc-is-hardfloat() {
+ [[ ${CTARGET//_/-} == *-hardfloat-* ]] \
+ && echo "yes" \
+ || echo "no"
+}
+
# @FUNCTION: tc-is-static-only
# @DESCRIPTION:
# Return shell true if the target does not support shared libs, shell false
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-05-23 2:00 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2010-05-23 2:00 UTC (permalink / raw
To: gentoo-commits
vapier 10/05/23 02:00:17
Modified: toolchain-funcs.eclass
Log:
add new tc-has-openmp helper func #320215 by Samuli Suominen
Revision Changes Path
1.100 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.100&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.100&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.99&r2=1.100
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- toolchain-funcs.eclass 22 Apr 2010 18:28:11 -0000 1.99
+++ toolchain-funcs.eclass 23 May 2010 02:00:17 -0000 1.100
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.99 2010/04/22 18:28:11 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.100 2010/05/23 02:00:17 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -191,6 +191,30 @@
return $([[ ${host} == *-mint* ]])
}
+# @FUNCTION: tc-has-openmp
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# See if the toolchain supports OpenMP.
+tc-has-openmp() {
+ local base="${T}/test-tc-openmp"
+ cat <<-EOF > "${base}.c"
+ #include <omp.h>
+ int main() {
+ int nthreads, tid, ret = 0;
+ #pragma omp parallel private(nthreads, tid)
+ {
+ tid = omp_get_thread_num();
+ nthreads = omp_get_num_threads(); ret += tid + nthreads;
+ }
+ return ret;
+ }
+ EOF
+ $(tc-getCC "$@") -fopenmp "${base}.c" -o "${base}" >&/dev/null
+ local ret=$?
+ rm -f "${base}"*
+ return ${ret}
+}
+
# @FUNCTION: tc-has-tls
# @USAGE: [-s|-c|-l] [toolchain prefix]
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-08-20 15:04 Donnie Berkholz (dberkholz)
0 siblings, 0 replies; 58+ messages in thread
From: Donnie Berkholz (dberkholz) @ 2010-08-20 15:04 UTC (permalink / raw
To: gentoo-commits
dberkholz 10/08/20 15:04:11
Modified: toolchain-funcs.eclass
Log:
Make tc-getF77() fall back to the gcc-provided gfortran, not some nonexistent 'f77'.
Revision Changes Path
1.101 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.101&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.101&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.100&r2=1.101
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- toolchain-funcs.eclass 23 May 2010 02:00:17 -0000 1.100
+++ toolchain-funcs.eclass 20 Aug 2010 15:04:11 -0000 1.101
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.100 2010/05/23 02:00:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.101 2010/08/20 15:04:11 dberkholz Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -79,7 +79,7 @@
# @FUNCTION: tc-getF77
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 77 compiler
-tc-getF77() { tc-getPROG F77 f77 "$@"; }
+tc-getF77() { tc-getPROG F77 gfortran "$@"; }
# @FUNCTION: tc-getFC
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 90 compiler
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-09-11 17:12 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2010-09-11 17:12 UTC (permalink / raw
To: gentoo-commits
vapier 10/09/11 17:12:20
Modified: toolchain-funcs.eclass
Log:
convert gcc version funcs to query the preprocessor for its gcc version to work with different compilers #335943 by Ambroz Bizjak
Revision Changes Path
1.102 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.102&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.102&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.101&r2=1.102
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- toolchain-funcs.eclass 20 Aug 2010 15:04:11 -0000 1.101
+++ toolchain-funcs.eclass 11 Sep 2010 17:12:20 -0000 1.102
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.101 2010/08/20 15:04:11 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.102 2010/09/11 17:12:20 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -360,30 +360,39 @@
esac
}
+# Internal func. The first argument is the version info to expand.
+# Query the preprocessor to improve compatibility across different
+# compilers rather than maintaining a --version flag matrix. #335943
+_gcc_fullversion() {
+ local ver="$1"; shift
+ set -- `$(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__"`
+ eval echo "$ver"
+}
+
# @FUNCTION: gcc-fullversion
# @RETURN: compiler version (major.minor.micro: [3.4.6])
gcc-fullversion() {
- $(tc-getCC "$@") -dumpversion
+ _gcc_fullversion '$1.$2.$3' "$@"
}
# @FUNCTION: gcc-version
# @RETURN: compiler version (major.minor: [3.4].6)
gcc-version() {
- gcc-fullversion "$@" | cut -f1,2 -d.
+ _gcc_fullversion '$1.$2' "$@"
}
# @FUNCTION: gcc-major-version
# @RETURN: major compiler version (major: [3].4.6)
gcc-major-version() {
- gcc-version "$@" | cut -f1 -d.
+ _gcc_fullversion '$1' "$@"
}
# @FUNCTION: gcc-minor-version
# @RETURN: minor compiler version (minor: 3.[4].6)
gcc-minor-version() {
- gcc-version "$@" | cut -f2 -d.
+ _gcc_fullversion '$2' "$@"
}
# @FUNCTION: gcc-micro-version
# @RETURN: micro compiler version (micro: 3.4.[6])
gcc-micro-version() {
- gcc-fullversion "$@" | cut -f3 -d. | cut -f1 -d-
+ _gcc_fullversion '$3' "$@"
}
# Returns the installation directory - internal toolchain
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2010-10-28 4:16 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2010-10-28 4:16 UTC (permalink / raw
To: gentoo-commits
vapier 10/10/28 04:16:27
Modified: toolchain-funcs.eclass
Log:
tc-arch: re-indent the ppc code and check the $type before KV_to_int to avoid useless calculations
Revision Changes Path
1.103 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.103&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.103&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.102&r2=1.103
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- toolchain-funcs.eclass 11 Sep 2010 17:12:20 -0000 1.102
+++ toolchain-funcs.eclass 28 Oct 2010 04:16:27 -0000 1.103
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.102 2010/09/11 17:12:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.103 2010/10/28 04:16:27 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -277,25 +277,25 @@
nios2*) echo nios2;;
nios*) echo nios;;
powerpc*)
- # Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
- # have been unified into simply 'powerpc', but until 2.6.16,
- # ppc32 is still using ARCH="ppc" as default
- if [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] && [[ ${type} == "kern" ]] ; then
- echo powerpc
- elif [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] && [[ ${type} == "kern" ]] ; then
- if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
- echo powerpc
- else
- echo ppc
- fi
- elif [[ ${host} == powerpc64* ]] ; then
- echo ppc64
- elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
- ninj ppc64 ppc
- else
- echo ppc
- fi
- ;;
+ # Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
+ # have been unified into simply 'powerpc', but until 2.6.16,
+ # ppc32 is still using ARCH="ppc" as default
+ if [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]] ; then
+ echo powerpc
+ elif [[ ${type} == "kern" ]] && [[ $(KV_to_int ${KV}) -eq $(KV_to_int 2.6.15) ]] ; then
+ if [[ ${host} == powerpc64* ]] || [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
+ echo powerpc
+ else
+ echo ppc
+ fi
+ elif [[ ${host} == powerpc64* ]] ; then
+ echo ppc64
+ elif [[ ${PROFILE_ARCH} == "ppc64" ]] ; then
+ ninj ppc64 ppc
+ else
+ echo ppc
+ fi
+ ;;
s390*) echo s390;;
sh64*) ninj sh64 sh;;
sh*) echo sh;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-07-12 14:29 Alexis Ballier (aballier)
0 siblings, 0 replies; 58+ messages in thread
From: Alexis Ballier (aballier) @ 2011-07-12 14:29 UTC (permalink / raw
To: gentoo-commits
aballier 11/07/12 14:29:41
Modified: toolchain-funcs.eclass
Log:
output correct kernel directory for amd64-fbsd in tc-arch-kernel, bug #374893
Revision Changes Path
1.104 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.104&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.104&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.103&r2=1.104
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- toolchain-funcs.eclass 28 Oct 2010 04:16:27 -0000 1.103
+++ toolchain-funcs.eclass 12 Jul 2011 14:29:41 -0000 1.104
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.103 2010/10/28 04:16:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.104 2011/07/12 14:29:41 aballier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -305,6 +305,7 @@
|| echo sparc
;;
vax*) echo vax;;
+ x86_64*freebsd*) echo amd64;;
x86_64*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
# trees have been unified into 'x86'.
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-09-06 22:54 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2011-09-06 22:54 UTC (permalink / raw
To: gentoo-commits
vapier 11/09/06 22:54:45
Modified: toolchain-funcs.eclass
Log:
unify tc-getPROG and tc-getBUILD_CC implementations, and add new tc-getBUILD_{CPP,CXX} helpers on top of that
Revision Changes Path
1.105 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.105&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.105&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.104&r2=1.105
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- toolchain-funcs.eclass 12 Jul 2011 14:29:41 -0000 1.104
+++ toolchain-funcs.eclass 6 Sep 2011 22:54:45 -0000 1.105
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.104 2011/07/12 14:29:41 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.105 2011/09/06 22:54:45 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -18,23 +18,31 @@
DESCRIPTION="Based on the ${ECLASS} eclass"
-tc-getPROG() {
- local var=$1
- local prog=$2
-
- if [[ -n ${!var} ]] ; then
- echo "${!var}"
- return 0
- fi
+# tc-getPROG <VAR [search vars]> <default> [tuple]
+_tc-getPROG() {
+ local tuple=$1
+ local v var vars=$2
+ local prog=$3
+
+ var=${vars%% *}
+ for v in ${vars} ; do
+ if [[ -n ${!v} ]] ; then
+ export ${var}=${!v}
+ echo "${!v}"
+ return 0
+ fi
+ done
local search=
- [[ -n $3 ]] && search=$(type -p "$3-${prog}")
- [[ -z ${search} && -n ${CHOST} ]] && search=$(type -p "${CHOST}-${prog}")
+ [[ -n $4 ]] && search=$(type -p "$4-${prog}")
+ [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}")
[[ -n ${search} ]] && prog=${search##*/}
export ${var}=${prog}
echo "${!var}"
}
+tc-getBUILD_PROG() { _tc-getPROG CBUILD "$@"; }
+tc-getPROG() { _tc-getPROG CHOST "$@"; }
# @FUNCTION: tc-getAR
# @USAGE: [toolchain prefix]
@@ -104,26 +112,15 @@
# @FUNCTION: tc-getBUILD_CC
# @USAGE: [toolchain prefix]
# @RETURN: name of the C compiler for building binaries to run on the build machine
-tc-getBUILD_CC() {
- local v
- for v in CC_FOR_BUILD BUILD_CC HOSTCC ; do
- if [[ -n ${!v} ]] ; then
- export BUILD_CC=${!v}
- echo "${!v}"
- return 0
- fi
- done
-
- local search=
- if [[ -n ${CBUILD} ]] ; then
- search=$(type -p ${CBUILD}-gcc)
- search=${search##*/}
- fi
- search=${search:-gcc}
-
- export BUILD_CC=${search}
- echo "${search}"
-}
+tc-getBUILD_CC() { tc-getBUILD_PROG "BUILD_CC CC_FOR_BUILD HOSTCC" gcc "$@"; }
+# @FUNCTION: tc-getBUILD_CPP
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the C preprocessor for building binaries to run on the build machine
+tc-getBUILD_CPP() { tc-getBUILD_PROG "BUILD_CPP CPP_FOR_BUILD HOSTCPP" cpp "$@"; }
+# @FUNCTION: tc-getBUILD_CXX
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the C++ compiler for building binaries to run on the build machine
+tc-getBUILD_CXX() { tc-getBUILD_PROG "BUILD_CXX CXX_FOR_BUILD HOSTCXX" g++ "$@"; }
# @FUNCTION: tc-export
# @USAGE: <list of toolchain variables>
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-09-09 19:14 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2011-09-09 19:14 UTC (permalink / raw
To: gentoo-commits
vapier 11/09/09 19:14:19
Modified: toolchain-funcs.eclass
Log:
quote flags value in export
Revision Changes Path
1.106 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.106&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.106&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.105&r2=1.106
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- toolchain-funcs.eclass 6 Sep 2011 22:54:45 -0000 1.105
+++ toolchain-funcs.eclass 9 Sep 2011 19:14:19 -0000 1.106
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.105 2011/09/06 22:54:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.106 2011/09/09 19:14:19 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -27,7 +27,7 @@
var=${vars%% *}
for v in ${vars} ; do
if [[ -n ${!v} ]] ; then
- export ${var}=${!v}
+ export ${var}="${!v}"
echo "${!v}"
return 0
fi
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-09-12 21:42 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2011-09-12 21:42 UTC (permalink / raw
To: gentoo-commits
vapier 11/09/12 21:42:08
Modified: toolchain-funcs.eclass
Log:
add more BUILD_xxx helpers, and unify the variable lookup logic a bit more in tc-getBUILD_PROG
Revision Changes Path
1.107 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.107&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.107&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.106&r2=1.107
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- toolchain-funcs.eclass 9 Sep 2011 19:14:19 -0000 1.106
+++ toolchain-funcs.eclass 12 Sep 2011 21:42:08 -0000 1.107
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.106 2011/09/09 19:14:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.107 2011/09/12 21:42:08 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -41,7 +41,7 @@
export ${var}=${prog}
echo "${!var}"
}
-tc-getBUILD_PROG() { _tc-getPROG CBUILD "$@"; }
+tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
tc-getPROG() { _tc-getPROG CHOST "$@"; }
# @FUNCTION: tc-getAR
@@ -109,18 +109,50 @@
# @RETURN: name of the Windows dllwrap utility
tc-getDLLWRAP() { tc-getPROG DLLWRAP dllwrap "$@"; }
+# @FUNCTION: tc-getBUILD_AR
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the archiver for building binaries to run on the build machine
+tc-getBUILD_AR() { tc-getBUILD_PROG AR ar "$@"; }
+# @FUNCTION: tc-getBUILD_AS
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the assembler for building binaries to run on the build machine
+tc-getBUILD_AS() { tc-getBUILD_PROG AS as "$@"; }
# @FUNCTION: tc-getBUILD_CC
# @USAGE: [toolchain prefix]
# @RETURN: name of the C compiler for building binaries to run on the build machine
-tc-getBUILD_CC() { tc-getBUILD_PROG "BUILD_CC CC_FOR_BUILD HOSTCC" gcc "$@"; }
+tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; }
# @FUNCTION: tc-getBUILD_CPP
# @USAGE: [toolchain prefix]
# @RETURN: name of the C preprocessor for building binaries to run on the build machine
-tc-getBUILD_CPP() { tc-getBUILD_PROG "BUILD_CPP CPP_FOR_BUILD HOSTCPP" cpp "$@"; }
+tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; }
# @FUNCTION: tc-getBUILD_CXX
# @USAGE: [toolchain prefix]
# @RETURN: name of the C++ compiler for building binaries to run on the build machine
-tc-getBUILD_CXX() { tc-getBUILD_PROG "BUILD_CXX CXX_FOR_BUILD HOSTCXX" g++ "$@"; }
+tc-getBUILD_CXX() { tc-getBUILD_PROG CXX g++ "$@"; }
+# @FUNCTION: tc-getBUILD_LD
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the linker for building binaries to run on the build machine
+tc-getBUILD_LD() { tc-getBUILD_PROG LD ld "$@"; }
+# @FUNCTION: tc-getBUILD_STRIP
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the strip program for building binaries to run on the build machine
+tc-getBUILD_STRIP() { tc-getBUILD_PROG STRIP strip "$@"; }
+# @FUNCTION: tc-getBUILD_NM
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the symbol/object thingy for building binaries to run on the build machine
+tc-getBUILD_NM() { tc-getBUILD_PROG NM nm "$@"; }
+# @FUNCTION: tc-getBUILD_RANLIB
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the archiver indexer for building binaries to run on the build machine
+tc-getBUILD_RANLIB() { tc-getBUILD_PROG RANLIB ranlib "$@"; }
+# @FUNCTION: tc-getBUILD_OBJCOPY
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the object copier for building binaries to run on the build machine
+tc-getBUILD_OBJCOPY() { tc-getBUILD_PROG OBJCOPY objcopy "$@"; }
+# @FUNCTION: tc-getBUILD_PKG_CONFIG
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the pkg-config tool for building binaries to run on the build machine
+tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; }
# @FUNCTION: tc-export
# @USAGE: <list of toolchain variables>
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-10-17 19:11 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2011-10-17 19:11 UTC (permalink / raw
To: gentoo-commits
vapier 11/10/17 19:11:49
Modified: toolchain-funcs.eclass
Log:
add econf_build helper for cross-compiling some packages
Revision Changes Path
1.108 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.108&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.108&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.107&r2=1.108
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- toolchain-funcs.eclass 12 Sep 2011 21:42:08 -0000 1.107
+++ toolchain-funcs.eclass 17 Oct 2011 19:11:49 -0000 1.108
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.107 2011/09/12 21:42:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.108 2011/10/17 19:11:49 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -220,6 +220,73 @@
return $([[ ${host} == *-mint* ]])
}
+# @FUNCTION: tc-env_build
+# @USAGE: <command> [command args]
+# @INTERNAL
+# @DESCRIPTION:
+# Setup the compile environment to the build tools and then execute the
+# specified command. We use tc-getBUILD_XX here so that we work with
+# all of the semi-[non-]standard env vars like $BUILD_CC which often
+# the target build system does not check.
+tc-env_build() {
+ CFLAGS=${BUILD_CFLAGS:--O1 -pipe} \
+ CXXFLAGS=${BUILD_CXXFLAGS:--O1 -pipe} \
+ CPPFLAGS=${BUILD_CPPFLAGS} \
+ LDFLAGS=${BUILD_LDFLAGS} \
+ AR=$(tc-getBUILD_AR) \
+ AS=$(tc-getBUILD_AS) \
+ CC=$(tc-getBUILD_CC) \
+ CPP=$(tc-getBUILD_CPP) \
+ CXX=$(tc-getBUILD_CXX) \
+ LD=$(tc-getBUILD_LD) \
+ NM=$(tc-getBUILD_NM) \
+ PKG_CONFIG=$(tc-getBUILD_PKG_CONFIG) \
+ RANLIB=$(tc-getBUILD_RANLIB) \
+ "$@"
+}
+
+# @FUNCTION: econf_build
+# @USAGE: [econf flags]
+# @DESCRIPTION:
+# Sometimes we need to locally build up some tools to run on CBUILD because
+# the package has helper utils which are compiled+executed when compiling.
+# This won't work when cross-compiling as the CHOST is set to a target which
+# we cannot natively execute.
+#
+# For example, the python package will build up a local python binary using
+# a portable build system (configure+make), but then use that binary to run
+# local python scripts to build up other components of the overall python.
+# We cannot rely on the python binary in $PATH as that often times will be
+# a different version, or not even installed in the first place. Instead,
+# we compile the code in a different directory to run on CBUILD, and then
+# use that binary when compiling the main package to run on CHOST.
+#
+# For example, with newer EAPIs, you'd do something like:
+# @CODE
+# src_configure() {
+# ECONF_SOURCE=${S}
+# if tc-is-cross-compiler ; then
+# mkdir "${WORKDIR}"/${CBUILD}
+# pushd "${WORKDIR}"/${CBUILD} >/dev/null
+# econf_build --disable-some-unused-stuff
+# popd >/dev/null
+# fi
+# ... normal build paths ...
+# }
+# src_compile() {
+# if tc-is-cross-compiler ; then
+# pushd "${WORKDIR}"/${CBUILD} >/dev/null
+# emake one-or-two-build-tools
+# ln/mv build-tools to normal build paths in ${S}/
+# popd >/dev/null
+# fi
+# ... normal build paths ...
+# }
+# @CODE
+econf_build() {
+ tc-env_build econf --build=${CBUILD:-${CHOST}} "$@"
+}
+
# @FUNCTION: tc-has-openmp
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2011-12-10 19:45 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2011-12-10 19:45 UTC (permalink / raw
To: gentoo-commits
vapier 11/12/10 19:45:00
Modified: toolchain-funcs.eclass
Log:
avoid multiple inclusions when possible to speed caching up
Revision Changes Path
1.109 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.109&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.109&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.108&r2=1.109
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- toolchain-funcs.eclass 17 Oct 2011 19:11:49 -0000 1.108
+++ toolchain-funcs.eclass 10 Dec 2011 19:45:00 -0000 1.109
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.108 2011/10/17 19:11:49 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.109 2011/12/10 19:45:00 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -13,8 +13,10 @@
# in such a way that you can rely on the function always returning
# something sane.
-___ECLASS_RECUR_TOOLCHAIN_FUNCS="yes"
-[[ -z ${___ECLASS_RECUR_MULTILIB} ]] && inherit multilib
+if [[ ${___ECLASS_ONCE_TOOLCHAIN_FUNCS} != "recur -_+^+_- spank" ]] ; then
+___ECLASS_ONCE_TOOLCHAIN_FUNCS="recur -_+^+_- spank"
+
+inherit multilib
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -759,3 +761,5 @@
fperms a+x "/usr/${libdir}/${lib}" || die "could not change perms on ${lib}"
done
}
+
+fi
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-05-10 3:31 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-10 3:31 UTC (permalink / raw
To: gentoo-commits
vapier 12/05/10 03:31:22
Modified: toolchain-funcs.eclass
Log:
have tc-is-cross-compiler default to CHOST if CTARGET isnt set #414527 by Raúl Porcel
Revision Changes Path
1.110 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.110&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.110&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.109&r2=1.110
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- toolchain-funcs.eclass 10 Dec 2011 19:45:00 -0000 1.109
+++ toolchain-funcs.eclass 10 May 2012 03:31:22 -0000 1.110
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.109 2011/12/10 19:45:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.110 2012/05/10 03:31:22 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -187,6 +187,7 @@
# softfloat flags in the case where support is optional, but
# rejects softfloat flags where the target always lacks an fpu.
tc-is-softfloat() {
+ local CTARGET=${CTARGET:-${CHOST}}
case ${CTARGET} in
bfin*|h8300*)
echo "only" ;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-06-14 3:38 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-06-14 3:38 UTC (permalink / raw
To: gentoo-commits
vapier 12/06/14 03:38:51
Modified: toolchain-funcs.eclass
Log:
unify build env var setup a bit so other packages can use it #391363
Revision Changes Path
1.112 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.112&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.112&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.111&r2=1.112
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- toolchain-funcs.eclass 9 Jun 2012 06:56:14 -0000 1.111
+++ toolchain-funcs.eclass 14 Jun 2012 03:38:51 -0000 1.112
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.111 2012/06/09 06:56:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.112 2012/06/14 03:38:51 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -215,6 +215,19 @@
return $([[ ${host} == *-mint* ]])
}
+# @FUNCTION: tc-export_build_env
+# @USAGE: [compiler variables]
+# @DESCRIPTION:
+# Export common build related compiler settings.
+tc-export_build_env() {
+ tc-export "$@"
+ : ${BUILD_CFLAGS:=-O1 -pipe}
+ : ${BUILD_CXXFLAGS:=-O1 -pipe}
+ : ${BUILD_CPPFLAGS:=}
+ : ${BUILD_LDFLAGS:=}
+ export BUILD_{C,CXX,CPP,LD}FLAGS
+}
+
# @FUNCTION: tc-env_build
# @USAGE: <command> [command args]
# @INTERNAL
@@ -224,8 +237,9 @@
# all of the semi-[non-]standard env vars like $BUILD_CC which often
# the target build system does not check.
tc-env_build() {
- CFLAGS=${BUILD_CFLAGS:--O1 -pipe} \
- CXXFLAGS=${BUILD_CXXFLAGS:--O1 -pipe} \
+ tc-export_build_env
+ CFLAGS=${BUILD_CFLAGS} \
+ CXXFLAGS=${BUILD_CXXFLAGS} \
CPPFLAGS=${BUILD_CPPFLAGS} \
LDFLAGS=${BUILD_LDFLAGS} \
AR=$(tc-getBUILD_AR) \
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-07-21 16:11 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-07-21 16:11 UTC (permalink / raw
To: gentoo-commits
vapier 12/07/21 16:11:01
Modified: toolchain-funcs.eclass
Log:
stop creating linker scripts for non darwin/linux systems #417451
Revision Changes Path
1.113 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.113&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.113&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.112&r2=1.113
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- toolchain-funcs.eclass 14 Jun 2012 03:38:51 -0000 1.112
+++ toolchain-funcs.eclass 21 Jul 2012 16:11:01 -0000 1.113
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.112 2012/06/14 03:38:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.113 2012/07/21 16:11:01 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -612,6 +612,13 @@
tc-is-static-only && return
+ # Eventually we'd like to get rid of this func completely #417451
+ case ${CTARGET:-${CHOST}} in
+ *-darwin*) ;;
+ *linux*) use prefix && return 0 ;;
+ *) return 0 ;;
+ esac
+
# Just make sure it exists
dodir /usr/${libdir}
@@ -678,66 +685,7 @@
ln -snf "../../${libdir}/${tlib}" "${lib}"
popd > /dev/null
;;
- *-aix*|*-irix*|*64*-hpux*|*-interix*|*-winnt*)
- if ${auto} ; then
- mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
- # no way to retrieve soname on these platforms (?)
- tlib=$(readlink "${ED}"/${libdir}/${lib})
- tlib=${tlib##*/}
- if [[ -z ${tlib} ]] ; then
- # ok, apparently was not a symlink, don't remove it and
- # just link to it
- tlib=${lib}
- else
- rm -f "${ED}"/${libdir}/${lib}
- fi
- else
- tlib=${lib}
- fi
-
- # we don't have GNU binutils on these platforms, so we symlink
- # instead, which seems to work fine. Keep it relative, otherwise
- # we break some QA checks in Portage
- # on interix, the linker scripts would work fine in _most_
- # situations. if a library links to such a linker script the
- # absolute path to the correct library is inserted into the binary,
- # which is wrong, since anybody linking _without_ libtool will miss
- # some dependencies, since the stupid linker cannot find libraries
- # hardcoded with absolute paths (as opposed to the loader, which
- # seems to be able to do this).
- # this has been seen while building shared-mime-info which needs
- # libxml2, but links without libtool (and does not add libz to the
- # command line by itself).
- pushd "${ED}/usr/${libdir}" > /dev/null
- ln -snf "../../${libdir}/${tlib}" "${lib}"
- popd > /dev/null
- ;;
- hppa*-hpux*) # PA-RISC 32bit (SOM) only, others (ELF) match *64*-hpux* above.
- if ${auto} ; then
- tlib=$(chatr "${ED}"/usr/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
- [[ -z ${tlib} ]] && tlib=${lib}
- tlib=${tlib##*/} # 'internal name' can have a path component
- mv "${ED}"/usr/${libdir}/${lib}* "${ED}"/${libdir}/ || die
- # some SONAMEs are funky: they encode a version before the .so
- if [[ ${tlib} != ${lib}* ]] ; then
- mv "${ED}"/usr/${libdir}/${tlib}* "${ED}"/${libdir}/ || die
- fi
- [[ ${tlib} != ${lib} ]] &&
- rm -f "${ED}"/${libdir}/${lib}
- else
- tlib=$(chatr "${ED}"/${libdir}/${lib} | sed -n '/internal name:/{n;s/^ *//;p;q}')
- [[ -z ${tlib} ]] && tlib=${lib}
- tlib=${tlib##*/} # 'internal name' can have a path component
- fi
- pushd "${ED}"/usr/${libdir} >/dev/null
- ln -snf "../../${libdir}/${tlib}" "${lib}"
- # need the internal name in usr/lib too, to be available at runtime
- # when linked with /path/to/lib.sl (hardcode_direct_absolute=yes)
- [[ ${tlib} != ${lib} ]] &&
- ln -snf "../../${libdir}/${tlib}" "${tlib}"
- popd >/dev/null
- ;;
- *)
+ *linux*)
if ${auto} ; then
tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
[[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-07-25 18:27 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-07-25 18:27 UTC (permalink / raw
To: gentoo-commits
vapier 12/07/25 18:27:56
Modified: toolchain-funcs.eclass
Log:
enable generation of ldscripts for freebsd systems #428014 by Yuta SATOH
Revision Changes Path
1.114 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.114&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.114&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.113&r2=1.114
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- toolchain-funcs.eclass 21 Jul 2012 16:11:01 -0000 1.113
+++ toolchain-funcs.eclass 25 Jul 2012 18:27:56 -0000 1.114
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.113 2012/07/21 16:11:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.114 2012/07/25 18:27:56 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -615,7 +615,8 @@
# Eventually we'd like to get rid of this func completely #417451
case ${CTARGET:-${CHOST}} in
*-darwin*) ;;
- *linux*) use prefix && return 0 ;;
+ *linux*|*-freebsd*)
+ use prefix && return 0 ;;
*) return 0 ;;
esac
@@ -685,7 +686,7 @@
ln -snf "../../${libdir}/${tlib}" "${lib}"
popd > /dev/null
;;
- *linux*)
+ *)
if ${auto} ; then
tlib=$(scanelf -qF'%S#F' "${ED}"/usr/${libdir}/${lib})
[[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}"
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-07-26 16:43 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-07-26 16:43 UTC (permalink / raw
To: gentoo-commits
vapier 12/07/26 16:43:59
Modified: toolchain-funcs.eclass
Log:
also enable usr ldscripts for openbsd & netbsd #417451#38
Revision Changes Path
1.115 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.115&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.115&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.114&r2=1.115
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- toolchain-funcs.eclass 25 Jul 2012 18:27:56 -0000 1.114
+++ toolchain-funcs.eclass 26 Jul 2012 16:43:59 -0000 1.115
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.114 2012/07/25 18:27:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.115 2012/07/26 16:43:59 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -615,7 +615,7 @@
# Eventually we'd like to get rid of this func completely #417451
case ${CTARGET:-${CHOST}} in
*-darwin*) ;;
- *linux*|*-freebsd*)
+ *linux*|*-freebsd*|*-openbsd*|*-netbsd*)
use prefix && return 0 ;;
*) return 0 ;;
esac
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-09-13 5:06 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-09-13 5:06 UTC (permalink / raw
To: gentoo-commits
vapier 12/09/13 05:06:34
Modified: toolchain-funcs.eclass
Log:
initial aarch64 support
Revision Changes Path
1.116 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.116&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.116&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.115&r2=1.116
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- toolchain-funcs.eclass 26 Jul 2012 16:43:59 -0000 1.115
+++ toolchain-funcs.eclass 13 Sep 2012 05:06:34 -0000 1.116
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.115 2012/07/26 16:43:59 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.116 2012/09/13 05:06:34 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -360,6 +360,7 @@
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}
case ${host} in
+ aarch64*) ninj aarch64 arm;;
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
@@ -446,6 +447,8 @@
host=${host%%-*}
case ${host} in
+ aarch64*be) echo big;;
+ aarch64) echo little;;
alpha*) echo big;;
arm*b*) echo big;;
arm*) echo little;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2012-12-29 5:08 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2012-12-29 5:08 UTC (permalink / raw
To: gentoo-commits
vapier 12/12/29 05:08:54
Modified: toolchain-funcs.eclass
Log:
tc-arch-kernel: return arm64 for aarch64-* targets #449108 by James Cloos
Revision Changes Path
1.120 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.120&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.120&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.119&r2=1.120
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- toolchain-funcs.eclass 28 Sep 2012 15:07:30 -0000 1.119
+++ toolchain-funcs.eclass 29 Dec 2012 05:08:54 -0000 1.120
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.119 2012/09/28 15:07:30 axs Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.120 2012/12/29 05:08:54 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -362,7 +362,7 @@
ewarn "QA: Kernel version could not be determined, please inherit kernel-2 or linux-info"
case ${host} in
- aarch64*) ninj aarch64 arm;;
+ aarch64*) ninj arm64 arm;;
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2013-05-14 20:40 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2013-05-14 20:40 UTC (permalink / raw
To: gentoo-commits
vapier 13/05/14 20:40:34
Modified: toolchain-funcs.eclass
Log:
tc-arch: add more targets that are in at least linux-3.9
Revision Changes Path
1.121 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.121&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.121&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.120&r2=1.121
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- toolchain-funcs.eclass 29 Dec 2012 05:08:54 -0000 1.120
+++ toolchain-funcs.eclass 14 May 2013 20:40:34 -0000 1.121
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.120 2012/12/29 05:08:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.121 2013/05/14 20:40:34 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -367,7 +367,10 @@
arm*) echo arm;;
avr*) ninj avr32 avr;;
bfin*) ninj blackfin bfin;;
+ c6x) echo c6x;;
cris*) echo cris;;
+ frv) echo frv;;
+ hexagon) echo hexagon;;
hppa*) ninj parisc hppa;;
i?86*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
@@ -381,9 +384,11 @@
;;
ia64*) echo ia64;;
m68*) echo m68k;;
+ metag) echo metag;;
mips*) echo mips;;
nios2*) echo nios2;;
nios*) echo nios;;
+ or32) echo openrisc;;
powerpc*)
# Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
# have been unified into simply 'powerpc', but until 2.6.16,
@@ -405,6 +410,7 @@
fi
;;
s390*) echo s390;;
+ score) echo score;;
sh64*) ninj sh64 sh;;
sh*) echo sh;;
sparc64*) ninj sparc64 sparc;;
@@ -412,6 +418,7 @@
&& ninj sparc64 sparc \
|| echo sparc
;;
+ tile*) echo tile;;
vax*) echo vax;;
x86_64*freebsd*) echo amd64;;
x86_64*)
@@ -423,6 +430,7 @@
ninj x86_64 amd64
fi
;;
+ xtensa*) echo xtensa;;
# since our usage of tc-arch is largely concerned with
# normalizing inputs for testing ${CTARGET}, let's filter
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2013-09-30 1:34 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2013-09-30 1:34 UTC (permalink / raw
To: gentoo-commits
vapier 13/09/30 01:34:25
Modified: toolchain-funcs.eclass
Log:
tc-export_build_env: also export XXX_FOR_BUILD env vars to match the BUILD_XXX as many packages use those instead
Revision Changes Path
1.122 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.122&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.122&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.121&r2=1.122
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- toolchain-funcs.eclass 14 May 2013 20:40:34 -0000 1.121
+++ toolchain-funcs.eclass 30 Sep 2013 01:34:25 -0000 1.122
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.121 2013/05/14 20:40:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.122 2013/09/30 01:34:25 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -224,6 +224,12 @@
: ${BUILD_CPPFLAGS:=}
: ${BUILD_LDFLAGS:=}
export BUILD_{C,CXX,CPP,LD}FLAGS
+
+ # Some packages use XXX_FOR_BUILD.
+ local v
+ for v in BUILD_{C,CXX,CPP,LD}FLAGS ; do
+ export ${v#BUILD_}_FOR_BUILD="${!v}"
+ done
}
# @FUNCTION: tc-env_build
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2013-10-12 21:31 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2013-10-12 21:31 UTC (permalink / raw
To: gentoo-commits
vapier 13/10/12 21:31:01
Modified: toolchain-funcs.eclass
Log:
gen_usr_ldscript: handle the gold linker when generating the OUTPUT_FORMAT section #487696 by Michał Górny
Revision Changes Path
1.123 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.123&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.123&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.122&r2=1.123
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- toolchain-funcs.eclass 30 Sep 2013 01:34:25 -0000 1.122
+++ toolchain-funcs.eclass 12 Oct 2013 21:31:01 -0000 1.123
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.122 2013/09/30 01:34:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.123 2013/10/12 21:31:01 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -650,7 +650,15 @@
# OUTPUT_FORMAT gives hints to the linker as to what binary format
# is referenced ... makes multilib saner
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ local flags=( ${CFLAGS} ${LDFLAGS} -Wl,--verbose )
+ if $(tc-getLD) --version | grep -q 'GNU gold' ; then
+ # If they're using gold, manually invoke the old bfd. #487696
+ local d="${T}/bfd-linker"
+ mkdir -p "${d}"
+ ln -sf $(which ${CHOST}-ld.bfd) "${d}"/ld
+ flags+=( -B"${d}" )
+ fi
+ output_format=$($(tc-getCC) "${flags[@]}" 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
[[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
for lib in "$@" ; do
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-01-14 5:33 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2014-01-14 5:33 UTC (permalink / raw
To: gentoo-commits
vapier 14/01/14 05:33:12
Modified: toolchain-funcs.eclass
Log:
split aarch64 off into its own keyword
Revision Changes Path
1.124 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.124&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.124&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.123&r2=1.124
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- toolchain-funcs.eclass 12 Oct 2013 21:31:01 -0000 1.123
+++ toolchain-funcs.eclass 14 Jan 2014 05:33:12 -0000 1.124
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.123 2013/10/12 21:31:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.124 2014/01/14 05:33:12 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -368,7 +368,7 @@
ewarn "QA: Kernel version could not be determined, please inherit kernel-2 or linux-info"
case ${host} in
- aarch64*) ninj arm64 arm;;
+ aarch64*) ninj arm64 aarch64;;
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-01-14 20:48 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2014-01-14 20:48 UTC (permalink / raw
To: gentoo-commits
vapier 14/01/14 20:48:26
Modified: toolchain-funcs.eclass
Log:
rename aarch64 keyword to arm64
Revision Changes Path
1.125 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.125&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.125&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.124&r2=1.125
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- toolchain-funcs.eclass 14 Jan 2014 05:33:12 -0000 1.124
+++ toolchain-funcs.eclass 14 Jan 2014 20:48:26 -0000 1.125
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.124 2014/01/14 05:33:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.125 2014/01/14 20:48:26 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -368,7 +368,7 @@
ewarn "QA: Kernel version could not be determined, please inherit kernel-2 or linux-info"
case ${host} in
- aarch64*) ninj arm64 aarch64;;
+ aarch64*) echo arm64;;
alpha*) echo alpha;;
arm*) echo arm;;
avr*) ninj avr32 avr;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-01-17 3:46 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2014-01-17 3:46 UTC (permalink / raw
To: gentoo-commits
vapier 14/01/17 03:46:31
Modified: toolchain-funcs.eclass
Log:
tc-endian: support little endian ppc targets
Revision Changes Path
1.126 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.126&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.126&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.125&r2=1.126
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- toolchain-funcs.eclass 14 Jan 2014 20:48:26 -0000 1.125
+++ toolchain-funcs.eclass 17 Jan 2014 03:46:31 -0000 1.126
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.125 2014/01/14 20:48:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.126 2014/01/17 03:46:31 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -475,6 +475,7 @@
m68*) echo big;;
mips*l*) echo little;;
mips*) echo big;;
+ powerpc*le) echo little;;
powerpc*) echo big;;
s390*) echo big;;
sh*b*) echo big;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-10-15 22:27 Anthony G. Basile (blueness)
0 siblings, 0 replies; 58+ messages in thread
From: Anthony G. Basile (blueness) @ 2014-10-15 22:27 UTC (permalink / raw
To: gentoo-commits
blueness 14/10/15 22:27:25
Modified: toolchain-funcs.eclass
Log:
Clean up return code in gcc-specs functions in toolchain-funcs.eclass
Revision Changes Path
1.128 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.128&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.128&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.127&r2=1.128
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- toolchain-funcs.eclass 11 Jul 2014 08:21:58 -0000 1.127
+++ toolchain-funcs.eclass 15 Oct 2014 22:27:25 -0000 1.128
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+n Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.127 2014/07/11 08:21:58 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.128 2014/10/15 22:27:25 blueness Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -169,7 +169,7 @@
# @FUNCTION: tc-is-cross-compiler
# @RETURN: Shell true if we are using a cross-compiler, shell false otherwise
tc-is-cross-compiler() {
- return $([[ ${CBUILD:-${CHOST}} != ${CHOST} ]])
+ [[ ${CBUILD:-${CHOST}} != ${CHOST} ]]
}
# @FUNCTION: tc-is-softfloat
@@ -210,7 +210,7 @@
local host=${CTARGET:-${CHOST}}
# *MiNT doesn't have shared libraries, only platform so far
- return $([[ ${host} == *-mint* ]])
+ [[ ${host} == *-mint* ]]
}
# @FUNCTION: tc-export_build_env
@@ -578,37 +578,37 @@
gcc-specs-relro() {
local directive
directive=$(gcc-specs-directive link_command)
- return $([[ "${directive/\{!norelro:}" != "${directive}" ]])
+ [[ "${directive/\{!norelro:}" != "${directive}" ]]
}
# Returns true if gcc sets now
gcc-specs-now() {
local directive
directive=$(gcc-specs-directive link_command)
- return $([[ "${directive/\{!nonow:}" != "${directive}" ]])
+ [[ "${directive/\{!nonow:}" != "${directive}" ]]
}
# Returns true if gcc builds PIEs
gcc-specs-pie() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ "${directive/\{!nopie:}" != "${directive}" ]])
+ [[ "${directive/\{!nopie:}" != "${directive}" ]]
}
# Returns true if gcc builds with the stack protector
gcc-specs-ssp() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ "${directive/\{!fno-stack-protector:}" != "${directive}" ]])
+ [[ "${directive/\{!fno-stack-protector:}" != "${directive}" ]]
}
# Returns true if gcc upgrades fstack-protector to fstack-protector-all
gcc-specs-ssp-to-all() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ "${directive/\{!fno-stack-protector-all:}" != "${directive}" ]])
+ [[ "${directive/\{!fno-stack-protector-all:}" != "${directive}" ]]
}
# Returns true if gcc builds with fno-strict-overflow
gcc-specs-nostrict() {
local directive
directive=$(gcc-specs-directive cc1)
- return $([[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]])
+ [[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]]
}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-10-15 22:30 Anthony G. Basile (blueness)
0 siblings, 0 replies; 58+ messages in thread
From: Anthony G. Basile (blueness) @ 2014-10-15 22:30 UTC (permalink / raw
To: gentoo-commits
blueness 14/10/15 22:30:56
Modified: toolchain-funcs.eclass
Log:
Add gcc-specs-stack-check() to toolchain-funcs.eclass
Revision Changes Path
1.129 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.129&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.129&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.128&r2=1.129
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- toolchain-funcs.eclass 15 Oct 2014 22:27:25 -0000 1.128
+++ toolchain-funcs.eclass 15 Oct 2014 22:30:56 -0000 1.129
@@ -1,6 +1,6 @@
n Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.128 2014/10/15 22:27:25 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.129 2014/10/15 22:30:56 blueness Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -610,6 +610,12 @@
directive=$(gcc-specs-directive cc1)
[[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]]
}
+# Returns true if gcc builds with fstack-check
+gcc-specs-stack-check() {
+ local directive
+ directive=$(gcc-specs-directive cc1)
+ [[ "${directive/\{!fno-stack-check:}" != "${directive}" ]]
+}
# @FUNCTION: gen_usr_ldscript
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-10-15 22:52 Anthony G. Basile (blueness)
0 siblings, 0 replies; 58+ messages in thread
From: Anthony G. Basile (blueness) @ 2014-10-15 22:52 UTC (permalink / raw
To: gentoo-commits
blueness 14/10/15 22:52:25
Modified: toolchain-funcs.eclass
Log:
toolchain-funcs.eclass: fix copyright line
Revision Changes Path
1.130 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.130&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.130&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.129&r2=1.130
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- toolchain-funcs.eclass 15 Oct 2014 22:30:56 -0000 1.129
+++ toolchain-funcs.eclass 15 Oct 2014 22:52:25 -0000 1.130
@@ -1,6 +1,6 @@
-n Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.129 2014/10/15 22:30:56 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.130 2014/10/15 22:52:25 blueness Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2014-11-01 5:19 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2014-11-01 5:19 UTC (permalink / raw
To: gentoo-commits
vapier 14/11/01 05:19:20
Modified: toolchain-funcs.eclass
Log:
add risc v handling #527170 by Palmer Dabbelt
Revision Changes Path
1.131 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.131&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.131&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.130&r2=1.131
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- toolchain-funcs.eclass 15 Oct 2014 22:52:25 -0000 1.130
+++ toolchain-funcs.eclass 1 Nov 2014 05:19:20 -0000 1.131
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.130 2014/10/15 22:52:25 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.131 2014/11/01 05:19:20 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -415,6 +415,7 @@
echo ppc
fi
;;
+ riscv*) echo riscv;;
s390*) echo s390;;
score) echo score;;
sh64*) ninj sh64 sh;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-02-27 6:08 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-02-27 6:08 UTC (permalink / raw
To: gentoo-commits
vapier 15/02/27 06:08:39
Modified: toolchain-funcs.eclass
Log:
tc-ninja_magic_to_arch: fix matching for unofficial arches
this code matches a $CHOST and not an $ARCH, so we need a glob. also add microblaze.
Revision Changes Path
1.132 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.132&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.132&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.131&r2=1.132
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- toolchain-funcs.eclass 1 Nov 2014 05:19:20 -0000 1.131
+++ toolchain-funcs.eclass 27 Feb 2015 06:08:39 -0000 1.132
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.131 2014/11/01 05:19:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.132 2015/02/27 06:08:39 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -373,10 +373,10 @@
arm*) echo arm;;
avr*) ninj avr32 avr;;
bfin*) ninj blackfin bfin;;
- c6x) echo c6x;;
+ c6x*) echo c6x;;
cris*) echo cris;;
- frv) echo frv;;
- hexagon) echo hexagon;;
+ frv*) echo frv;;
+ hexagon*) echo hexagon;;
hppa*) ninj parisc hppa;;
i?86*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
@@ -390,11 +390,12 @@
;;
ia64*) echo ia64;;
m68*) echo m68k;;
- metag) echo metag;;
+ metag*) echo metag;;
+ microblaze*) echo microblaze;;
mips*) echo mips;;
nios2*) echo nios2;;
nios*) echo nios;;
- or32) echo openrisc;;
+ or32*) echo openrisc;;
powerpc*)
# Starting with linux-2.6.15, the 'ppc' and 'ppc64' trees
# have been unified into simply 'powerpc', but until 2.6.16,
@@ -417,7 +418,7 @@
;;
riscv*) echo riscv;;
s390*) echo s390;;
- score) echo score;;
+ score*) echo score;;
sh64*) ninj sh64 sh;;
sh*) echo sh;;
sparc64*) ninj sparc64 sparc;;
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-03-10 17:56 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-03-10 17:56 UTC (permalink / raw
To: gentoo-commits
vapier 15/03/10 17:56:30
Modified: toolchain-funcs.eclass
Log:
econf_build: set --host=${CBUILD} otherwise we get the cross-compile target as the host
Revision Changes Path
1.133 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.133&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.133&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.132&r2=1.133
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- toolchain-funcs.eclass 27 Feb 2015 06:08:39 -0000 1.132
+++ toolchain-funcs.eclass 10 Mar 2015 17:56:30 -0000 1.133
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.132 2015/02/27 06:08:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.133 2015/03/10 17:56:30 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -297,7 +297,8 @@
# }
# @CODE
econf_build() {
- tc-env_build econf --build=${CBUILD:-${CHOST}} "$@"
+ local CBUILD=${CBUILD:-${CHOST}}
+ tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@"
}
# @FUNCTION: tc-has-openmp
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-03-16 19:26 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-03-16 19:26 UTC (permalink / raw
To: gentoo-commits
vapier 15/03/16 19:26:40
Modified: toolchain-funcs.eclass
Log:
tc-getOBJDUMP: new helper a few ebuilds want
Revision Changes Path
1.134 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.134&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.134&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.133&r2=1.134
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- toolchain-funcs.eclass 10 Mar 2015 17:56:30 -0000 1.133
+++ toolchain-funcs.eclass 16 Mar 2015 19:26:39 -0000 1.134
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.133 2015/03/10 17:56:30 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.134 2015/03/16 19:26:39 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -84,6 +84,10 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the object copier
tc-getOBJCOPY() { tc-getPROG OBJCOPY objcopy "$@"; }
+# @FUNCTION: tc-getOBJDUMP
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the object dumper
+tc-getOBJDUMP() { tc-getPROG OBJDUMP objdump "$@"; }
# @FUNCTION: tc-getF77
# @USAGE: [toolchain prefix]
# @RETURN: name of the Fortran 77 compiler
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-03-16 21:12 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-03-16 21:12 UTC (permalink / raw
To: gentoo-commits
vapier 15/03/16 21:12:27
Modified: toolchain-funcs.eclass
Log:
tc-ld-is-gold/tc-ld-disable-gold: add helpers for detecting & disabling gold
Revision Changes Path
1.135 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.135&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.135&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.134&r2=1.135
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- toolchain-funcs.eclass 16 Mar 2015 19:26:39 -0000 1.134
+++ toolchain-funcs.eclass 16 Mar 2015 21:12:27 -0000 1.135
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.134 2015/03/16 19:26:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.135 2015/03/16 21:12:27 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -305,6 +305,73 @@
tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@"
}
+# @FUNCTION: tc-ld-is-gold
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# Return true if the current linker is set to gold.
+tc-ld-is-gold() {
+ local out
+
+ # First check the linker directly.
+ out=$($(tc-getLD "$@") --version 2>&1)
+ if [[ ${out} == *"GNU gold"* ]] ; then
+ return 0
+ fi
+
+ # Then see if they're selecting gold via compiler flags.
+ # Note: We're assuming they're using LDFLAGS to hold the
+ # options and not CFLAGS/CXXFLAGS.
+ local base="${T}/test-tc-gold"
+ cat <<-EOF > "${base}.c"
+ int main() { return 0; }
+ EOF
+ out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
+ rm -f "${base}"*
+ if [[ ${out} == *"GNU gold"* ]] ; then
+ return 0
+ fi
+
+ # No gold here!
+ return 1
+}
+
+# @FUNCTION: tc-ld-disable-gold
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# If the gold linker is currently selected, configure the compilation
+# settings so that we use the older bfd linker instead.
+tc-ld-disable-gold() {
+ if ! tc-ld-is-gold "$@" ; then
+ # They aren't using gold, so nothing to do!
+ return
+ fi
+
+ ewarn "Forcing usage of the BFD linker instead of GOLD"
+
+ # Set up LD to point directly to bfd if it's available.
+ local bfd_ld="$(tc-getLD "$@").bfd"
+ local path_ld=$(which "${bfd_ld}" 2>/dev/null)
+ [[ -e ${path_ld} ]] && export LD=${bfd_ld}
+
+ # Set up LDFLAGS to select gold based on the gcc version.
+ local major=$(gcc-major-version "$@")
+ local minor=$(gcc-minor-version "$@")
+ if [[ ${major} -lt 4 ]] || [[ ${major} -eq 4 && ${minor} -lt 8 ]] ; then
+ # <=gcc-4.7 requires some coercion. Only works if bfd exists.
+ if [[ -e ${path_ld} ]] ; then
+ local d="${T}/bfd-linker"
+ mkdir -p "${d}"
+ ln -sf "${path_ld}" "${d}"/ld
+ export LDFLAGS="${LDFLAGS} -B${d}"
+ else
+ die "unable to locate a BFD linker to bypass gold"
+ fi
+ else
+ # gcc-4.8+ supports -fuse-ld directly.
+ export LDFLAGS="${LDFLAGS} -fuse-ld=bfd"
+ fi
+}
+
# @FUNCTION: tc-has-openmp
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-03-31 4:27 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-03-31 4:27 UTC (permalink / raw
To: gentoo-commits
vapier 15/03/31 04:27:29
Modified: toolchain-funcs.eclass
Log:
tc-export_build_env: export BUILD_CPPFLAGS/BUILD_LDFLAGS to non-empty values so they do not get defaulted by build systems #526734 by Matthias Maier
Revision Changes Path
1.136 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.136&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.136&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.135&r2=1.136
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- toolchain-funcs.eclass 16 Mar 2015 21:12:27 -0000 1.135
+++ toolchain-funcs.eclass 31 Mar 2015 04:27:29 -0000 1.136
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.135 2015/03/16 21:12:27 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.136 2015/03/31 04:27:29 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -223,10 +223,13 @@
# Export common build related compiler settings.
tc-export_build_env() {
tc-export "$@"
+ # Some build envs will initialize vars like:
+ # : ${BUILD_LDFLAGS:-${LDFLAGS}}
+ # So make sure all variables are non-empty. #526734
: ${BUILD_CFLAGS:=-O1 -pipe}
: ${BUILD_CXXFLAGS:=-O1 -pipe}
- : ${BUILD_CPPFLAGS:=}
- : ${BUILD_LDFLAGS:=}
+ : ${BUILD_CPPFLAGS:= }
+ : ${BUILD_LDFLAGS:= }
export BUILD_{C,CXX,CPP,LD}FLAGS
# Some packages use XXX_FOR_BUILD.
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-04-13 5:38 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-04-13 5:38 UTC (permalink / raw
To: gentoo-commits
vapier 15/04/13 05:38:17
Modified: toolchain-funcs.eclass
Log:
tc-ld-disable-gold: handle LD having flags appended to it #545218
Revision Changes Path
1.137 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.137&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.137&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.136&r2=1.137
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- toolchain-funcs.eclass 31 Mar 2015 04:27:29 -0000 1.136
+++ toolchain-funcs.eclass 13 Apr 2015 05:38:17 -0000 1.137
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.136 2015/03/31 04:27:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.137 2015/04/13 05:38:17 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -352,7 +352,10 @@
ewarn "Forcing usage of the BFD linker instead of GOLD"
# Set up LD to point directly to bfd if it's available.
- local bfd_ld="$(tc-getLD "$@").bfd"
+ # We need to extract the first word in case there are flags appended
+ # to its value (like multilib). #545218
+ local ld=$(tc-getLD "$@")
+ local bfd_ld="${ld%% *}.bfd"
local path_ld=$(which "${bfd_ld}" 2>/dev/null)
[[ -e ${path_ld} ]] && export LD=${bfd_ld}
^ permalink raw reply [flat|nested] 58+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass
@ 2015-05-28 7:51 Mike Frysinger (vapier)
0 siblings, 0 replies; 58+ messages in thread
From: Mike Frysinger (vapier) @ 2015-05-28 7:51 UTC (permalink / raw
To: gentoo-commits
vapier 15/05/28 07:51:10
Modified: toolchain-funcs.eclass
Log:
tc-getGO: new helper from Chromium OS for locating the Go compiler
Revision Changes Path
1.138 eclass/toolchain-funcs.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.138&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?rev=1.138&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-funcs.eclass?r1=1.137&r2=1.138
Index: toolchain-funcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- toolchain-funcs.eclass 13 Apr 2015 05:38:17 -0000 1.137
+++ toolchain-funcs.eclass 28 May 2015 07:51:10 -0000 1.138
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.137 2015/04/13 05:38:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.138 2015/05/28 07:51:10 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -100,6 +100,10 @@
# @USAGE: [toolchain prefix]
# @RETURN: name of the java compiler
tc-getGCJ() { tc-getPROG GCJ gcj "$@"; }
+# @FUNCTION: tc-getGO
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the Go compiler
+tc-getGO() { tc-getPROG GO gccgo "$@"; }
# @FUNCTION: tc-getPKG_CONFIG
# @USAGE: [toolchain prefix]
# @RETURN: name of the pkg-config tool
^ permalink raw reply [flat|nested] 58+ messages in thread
end of thread, other threads:[~2015-05-28 7:51 UTC | newest]
Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 21:31 [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass Mike Frysinger (vapier)
-- strict thread matches above, loose matches on Subject: below --
2015-05-28 7:51 Mike Frysinger (vapier)
2015-04-13 5:38 Mike Frysinger (vapier)
2015-03-31 4:27 Mike Frysinger (vapier)
2015-03-16 21:12 Mike Frysinger (vapier)
2015-03-16 19:26 Mike Frysinger (vapier)
2015-03-10 17:56 Mike Frysinger (vapier)
2015-02-27 6:08 Mike Frysinger (vapier)
2014-11-01 5:19 Mike Frysinger (vapier)
2014-10-15 22:52 Anthony G. Basile (blueness)
2014-10-15 22:30 Anthony G. Basile (blueness)
2014-10-15 22:27 Anthony G. Basile (blueness)
2014-01-17 3:46 Mike Frysinger (vapier)
2014-01-14 20:48 Mike Frysinger (vapier)
2014-01-14 5:33 Mike Frysinger (vapier)
2013-10-12 21:31 Mike Frysinger (vapier)
2013-09-30 1:34 Mike Frysinger (vapier)
2013-05-14 20:40 Mike Frysinger (vapier)
2012-12-29 5:08 Mike Frysinger (vapier)
2012-09-13 5:06 Mike Frysinger (vapier)
2012-07-26 16:43 Mike Frysinger (vapier)
2012-07-25 18:27 Mike Frysinger (vapier)
2012-07-21 16:11 Mike Frysinger (vapier)
2012-06-14 3:38 Mike Frysinger (vapier)
2012-05-10 3:31 Mike Frysinger (vapier)
2011-12-10 19:45 Mike Frysinger (vapier)
2011-10-17 19:11 Mike Frysinger (vapier)
2011-09-12 21:42 Mike Frysinger (vapier)
2011-09-09 19:14 Mike Frysinger (vapier)
2011-09-06 22:54 Mike Frysinger (vapier)
2011-07-12 14:29 Alexis Ballier (aballier)
2010-10-28 4:16 Mike Frysinger (vapier)
2010-09-11 17:12 Mike Frysinger (vapier)
2010-08-20 15:04 Donnie Berkholz (dberkholz)
2010-05-23 2:00 Mike Frysinger (vapier)
2010-04-22 18:28 Raul Porcel (armin76)
2010-03-15 23:51 Mike Frysinger (vapier)
2009-12-01 4:44 Mike Frysinger (vapier)
2009-09-02 20:08 Fabian Groffen (grobian)
2009-09-02 9:00 Fabian Groffen (grobian)
2009-08-15 15:12 Fabian Groffen (grobian)
2009-08-15 15:11 Fabian Groffen (grobian)
2009-05-24 7:25 Fabian Groffen (grobian)
2009-04-05 7:50 Fabian Groffen (grobian)
2009-04-04 17:17 Fabian Groffen (grobian)
2009-03-28 11:09 Mike Frysinger (vapier)
2009-03-01 8:09 Mike Frysinger (vapier)
2009-02-25 0:25 Joshua Kinard (kumba)
2009-01-27 23:35 Mike Frysinger (vapier)
2009-01-08 11:06 Gordon Malm (gengor)
2009-01-08 9:56 Gordon Malm (gengor)
2009-01-08 6:33 Gordon Malm (gengor)
2009-01-08 3:46 Gordon Malm (gengor)
2008-09-16 6:40 Mike Frysinger (vapier)
2008-07-03 5:26 Donnie Berkholz (dberkholz)
2008-06-01 8:56 Alexis Ballier (aballier)
2008-04-16 14:16 Mike Frysinger (vapier)
2008-01-02 1:01 Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox