summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-06-10 00:24:57 +0000
committerTravis Tilley <lv@gentoo.org>2004-06-10 00:24:57 +0000
commiteb0d6ad9b2fbc7415be704377870f4f30346e4e3 (patch)
tree9a0fb45298411c5e6dc7616d3ca2de5d007fa66b /eclass
parentFix use invocation (diff)
downloadhistorical-eb0d6ad9b2fbc7415be704377870f4f30346e4e3.tar.gz
historical-eb0d6ad9b2fbc7415be704377870f4f30346e4e3.tar.bz2
historical-eb0d6ad9b2fbc7415be704377870f4f30346e4e3.zip
added has_m64 and has_m32 to flag-o-matic. this should make checking for multilib as simple as has_m64 && has_m32 on all multilib archs other than mips.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/flag-o-matic.eclass23
1 files changed, 22 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 48a2c2f89142..741a52932dfa 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.55 2004/06/08 20:49:52 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.56 2004/06/10 00:24:57 lv Exp $
#
# Author Bart Verwilst <verwilst@gentoo.org>
@@ -301,6 +301,26 @@ has_ssp() {
return 1
}
+has_m64() {
+ temp=`mktemp`
+ echo "int main() { return(0); }" > ${temp}.c
+ gcc -m64 -o /dev/null ${temp}.c > /dev/null 2>&1
+ ret=$?
+ rm -f ${temp}.c
+ [ "$ret" != "1" ] && return 0
+ return 1
+}
+
+has_m32() {
+ temp=`mktemp`
+ echo "int main() { return(0); }" > ${temp}.c
+ gcc -m32 -o /dev/null ${temp}.c > /dev/null 2>&1
+ ret=$?
+ rm -f ${temp}.c
+ [ "$ret" != "1" ] && return 0
+ return 1
+}
+
replace-sparc64-flags() {
local SPARC64_CPUS="ultrasparc v9"
@@ -369,3 +389,4 @@ fstack-flags() {
export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
fi
}
+