/[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.44 Revision 1.45
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.44 2004/04/08 21:53:15 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.45 2004/04/09 22:21:35 tseng 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"
268} 268}
269 269
270has_pic() { 270has_pic() {
271 [ "${CFLAGS/-fPIC}" != "${CFLAGS}" ] && return 0 271 [ "${CFLAGS/-fPIC}" != "${CFLAGS}" ] && return 0
272 [ "${CFLAGS/-fpic}" != "${CFLAGS}" ] && return 0 272 [ "${CFLAGS/-fpic}" != "${CFLAGS}" ] && return 0
273 [ has_version sys-devel/hardened-gcc ] && return 0 273 has_version sys-devel/hardened-gcc && return 0
274 [ ! -z "`${CC/ .*/} --version| grep pie`" ] && return 0 274 [ ! -z "`${CC/ .*/} --version| grep pie`" ] && return 0
275 return 1 275 return 1
276} 276}
277 277
278has_pie() { 278has_pie() {
279 [ "${CFLAGS/-fPIE}" != "${CFLAGS}" ] && return 0 279 [ "${CFLAGS/-fPIE}" != "${CFLAGS}" ] && return 0
280 [ "${CFLAGS/-fpie}" != "${CFLAGS}" ] && return 0 280 [ "${CFLAGS/-fpie}" != "${CFLAGS}" ] && return 0
281 [ has_version sys-devel/hardened-gcc ] && return 0 281 has_version sys-devel/hardened-gcc && return 0
282 [ ! -z "`${CC/ .*/} --version| grep pie`" ] && return 0 282 [ ! -z "`${CC/ .*/} --version| grep pie`" ] && return 0
283 return 1 283 return 1
284} 284}
285 285
286has_ssp() { 286has_ssp() {
287 [ "${CFLAGS/-fstack-protector}" != "${CFLAGS}" ] && return 0 287 [ "${CFLAGS/-fstack-protector}" != "${CFLAGS}" ] && return 0
288 [ has_version sys-devel/hardened-gcc ] && return 0 288 has_version sys-devel/hardened-gcc && return 0
289 [ ! -z "`${CC/ .*/} --version| grep ssp`" ] && return 0 289 [ ! -z "`${CC/ .*/} --version| grep ssp`" ] && return 0
290 return 1 290 return 1
291} 291}
292 292
293replace-sparc64-flags() { 293replace-sparc64-flags() {

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.20