/[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.96 Revision 1.97
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
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.96 2005/12/08 12:16:12 azarah Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.97 2005/12/08 21:08:48 azarah Exp $
4 4
5 5
6# need access to emktemp() 6# need access to emktemp()
7inherit eutils toolchain-funcs multilib 7inherit eutils toolchain-funcs multilib
8 8
325 return 0 325 return 0
326} 326}
327 327
328# Depriciated, use test-flags() 328# Depriciated, use test-flags()
329test_flag() { 329test_flag() {
330 addwrite "/dev/stderr"
330 ewarn "test_flag: deprecated, please use test-flags()!" >/dev/stderr 331 ewarn "test_flag: deprecated, please use test-flags()!" >/dev/stderr
331 332
332 test-flags "$@" 333 test-flags "$@"
333} 334}
334 335
371 return 1 372 return 1
372} 373}
373 374
374# DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs 375# DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs
375has_hardened() { 376has_hardened() {
377 addwrite "/dev/stderr"
376 ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" \ 378 ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" \
377 >/dev/stderr 379 >/dev/stderr
378 380
379 test_version_info Hardened && return 0 381 test_version_info Hardened && return 0
380 # The specs file wont exist unless gcc has GCC_SPECS support 382 # The specs file wont exist unless gcc has GCC_SPECS support
382} 384}
383 385
384# DEPRECATED - use gcc-specs-pie from toolchain-funcs 386# DEPRECATED - use gcc-specs-pie from toolchain-funcs
385# indicate whether PIC is set 387# indicate whether PIC is set
386has_pic() { 388has_pic() {
389 addwrite "/dev/stderr"
387 ewarn "has_pic: deprecated, please use gcc-specs-pie()!" >/dev/stderr 390 ewarn "has_pic: deprecated, please use gcc-specs-pie()!" >/dev/stderr
388 391
389 [[ ${CFLAGS/-fPIC} != ${CFLAGS} || \ 392 [[ ${CFLAGS/-fPIC} != ${CFLAGS} || \
390 ${CFLAGS/-fpic} != ${CFLAGS} || \ 393 ${CFLAGS/-fpic} != ${CFLAGS} || \
391 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __PIC__) ]] 394 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __PIC__) ]]
392} 395}
393 396
394# DEPRECATED - use gcc-specs-pie from toolchain-funcs 397# DEPRECATED - use gcc-specs-pie from toolchain-funcs
395# indicate whether PIE is set 398# indicate whether PIE is set
396has_pie() { 399has_pie() {
400 addwrite "/dev/stderr"
397 ewarn "has_pie: deprecated, please use gcc-specs-pie()!" >/dev/stderr 401 ewarn "has_pie: deprecated, please use gcc-specs-pie()!" >/dev/stderr
398 402
399 [[ ${CFLAGS/-fPIE} != ${CFLAGS} || \ 403 [[ ${CFLAGS/-fPIE} != ${CFLAGS} || \
400 ${CFLAGS/-fpie} != ${CFLAGS} || \ 404 ${CFLAGS/-fpie} != ${CFLAGS} || \
401 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __PIE__) || \ 405 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __PIE__) || \
404} 408}
405 409
406# DEPRECATED - use gcc-specs-ssp from toolchain-funcs 410# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
407# indicate whether code for SSP is being generated for all functions 411# indicate whether code for SSP is being generated for all functions
408has_ssp_all() { 412has_ssp_all() {
413 addwrite "/dev/stderr"
409 ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >/dev/stderr 414 ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >/dev/stderr
410 415
411 # note; this matches only -fstack-protector-all 416 # note; this matches only -fstack-protector-all
412 [[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \ 417 [[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \
413 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \ 418 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \
415} 420}
416 421
417# DEPRECATED - use gcc-specs-ssp from toolchain-funcs 422# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
418# indicate whether code for SSP is being generated 423# indicate whether code for SSP is being generated
419has_ssp() { 424has_ssp() {
425 addwrite "/dev/stderr"
420 ewarn "has_ssp: deprecated, please use gcc-specs-ssp()!" >/dev/stderr 426 ewarn "has_ssp: deprecated, please use gcc-specs-ssp()!" >/dev/stderr
421 427
422 # note; this matches both -fstack-protector and -fstack-protector-all 428 # note; this matches both -fstack-protector and -fstack-protector-all
423 [[ ${CFLAGS/-fstack-protector} != ${CFLAGS} || \ 429 [[ ${CFLAGS/-fstack-protector} != ${CFLAGS} || \
424 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP__) ]] || \ 430 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP__) ]] || \

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.97

  ViewVC Help
Powered by ViewVC 1.1.20