summaryrefslogtreecommitdiff
path: root/eclass
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
commitea842a53f9d3740518fb4116987eab6ddc74ffd8 (patch)
tree6681fa8f0bf31a22c91ef3d577e8a0f6143be45b /eclass
parentMark amd64 stable. (diff)
downloadgentoo-2-ea842a53f9d3740518fb4116987eab6ddc74ffd8.tar.gz
gentoo-2-ea842a53f9d3740518fb4116987eab6ddc74ffd8.tar.bz2
gentoo-2-ea842a53f9d3740518fb4116987eab6ddc74ffd8.zip
Knock off the version-fu and use test-flags-CC
Diffstat (limited to '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} ]])