summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Malm <gengor@gentoo.org>2009-01-08 06:33:20 +0000
committerGordon Malm <gengor@gentoo.org>2009-01-08 06:33:20 +0000
commit41369f6f5da9c7d2bbbf6fb5c4d9d6eb21f8c70e (patch)
tree656b4291899df0ee446a2732019836c252aaaaad /eclass/toolchain-funcs.eclass
parentMark amd64 stable. (diff)
downloadhistorical-41369f6f5da9c7d2bbbf6fb5c4d9d6eb21f8c70e.tar.gz
historical-41369f6f5da9c7d2bbbf6fb5c4d9d6eb21f8c70e.tar.bz2
historical-41369f6f5da9c7d2bbbf6fb5c4d9d6eb21f8c70e.zip
Knock off the version-fu and use test-flags-CC
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 9d550b12e094..de56cf8fc7c1 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -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 @@ gcc-specs-pie() {
}
# 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} ]])