/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

Diff of /eclass/flag-o-matic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.55 Revision 1.56
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.55 2004/06/08 20:49:52 lv Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.56 2004/06/10 00:24:57 lv Exp $
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
299 [ "${CFLAGS/-fstack-protector}" != "${CFLAGS}" ] && return 0 299 [ "${CFLAGS/-fstack-protector}" != "${CFLAGS}" ] && return 0
300 [ ! -z "`${CC/ .*/} --version| grep ssp`" ] && return 0 300 [ ! -z "`${CC/ .*/} --version| grep ssp`" ] && return 0
301 return 1 301 return 1
302} 302}
303 303
304has_m64() {
305 temp=`mktemp`
306 echo "int main() { return(0); }" > ${temp}.c
307 gcc -m64 -o /dev/null ${temp}.c > /dev/null 2>&1
308 ret=$?
309 rm -f ${temp}.c
310 [ "$ret" != "1" ] && return 0
311 return 1
312}
313
314has_m32() {
315 temp=`mktemp`
316 echo "int main() { return(0); }" > ${temp}.c
317 gcc -m32 -o /dev/null ${temp}.c > /dev/null 2>&1
318 ret=$?
319 rm -f ${temp}.c
320 [ "$ret" != "1" ] && return 0
321 return 1
322}
323
304replace-sparc64-flags() { 324replace-sparc64-flags() {
305 local SPARC64_CPUS="ultrasparc v9" 325 local SPARC64_CPUS="ultrasparc v9"
306 326
307 if [ "${CFLAGS/mtune}" != "${CFLAGS}" ] 327 if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]
308 then 328 then
367 if [ $? == 0 ] ; then 387 if [ $? == 0 ] ; then
368 [ -z "`is-flag -fno-stack-protector`" ] && 388 [ -z "`is-flag -fno-stack-protector`" ] &&
369 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`" 389 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
370 fi 390 fi
371} 391}
392

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20