/[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.123 Revision 1.132
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2009 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.123 2008/06/07 16:42:32 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.132 2009/01/21 00:42:20 gengor Exp $
4 4
5# @ECLASS: flag-o-matic.eclass 5# @ECLASS: flag-o-matic.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# toolchain@gentoo.org 7# toolchain@gentoo.org
8# @BLURB: common functions to manipulate and query toolchain flags 8# @BLURB: common functions to manipulate and query toolchain flags
24# has_pic 24# has_pic
25# has_ssp_all 25# has_ssp_all
26# has_ssp 26# has_ssp
27 27
28 28
29# C[XX]FLAGS that we allow in strip-flags 29# {C,CXX,F,FC}FLAGS that we allow in strip-flags
30# Note: shell globs and character lists are allowed 30# Note: shell globs and character lists are allowed
31setup-allowed-flags() { 31setup-allowed-flags() {
32 if [[ -z ${ALLOWED_FLAGS} ]] ; then 32 if [[ -z ${ALLOWED_FLAGS} ]] ; then
33 export ALLOWED_FLAGS="-pipe" 33 export ALLOWED_FLAGS="-pipe"
34 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune" 34 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune"
35 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all" 35 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all"
36 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking" 36 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow"
37 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time" 37 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time"
38 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+" 38 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
39 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident" 39 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident"
40 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w" 40 export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w"
41 fi 41 fi
42 # allow a bunch of flags that negate features / control ABI 42 # allow a bunch of flags that negate features / control ABI
43 ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \ 43 ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \
44 -fno-strict-aliasing -fno-bounds-checking" 44 -fno-strict-aliasing -fno-bounds-checking -fstrict-overflow"
45 ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \ 45 ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \
46 -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow \ 46 -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow \
47 -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 \ 47 -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 \
48 -msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \ 48 -msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
49 -mieee -mieee-with-inexact -mschedule \ 49 -mieee -mieee-with-inexact -mschedule \
50 -mtls-direct-seg-refs -mno-tls-direct-seg-refs \ 50 -mtls-direct-seg-refs -mno-tls-direct-seg-refs \
51 -mflat -mno-flat -mno-faster-structs -mfaster-structs \ 51 -mflat -mno-flat -mno-faster-structs -mfaster-structs \
52 -m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \ 52 -m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
53 -mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \ 53 -mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
54 -msecure-plt -D*" 54 -msecure-plt -m*-toc -D* -U*"
55 55
56 # C[XX]FLAGS that we are think is ok, but needs testing 56 # {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
57 # NOTE: currently -Os have issues with gcc3 and K6* arch's 57 # NOTE: currently -Os have issues with gcc3 and K6* arch's
58 export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks" 58 export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"
59 return 0 59 return 0
60} 60}
61 61
71 -fPIC|-fpic|-fPIE|-fpie|-Wl,pie|-pie) 71 -fPIC|-fpic|-fPIE|-fpie|-Wl,pie|-pie)
72 gcc-specs-pie || continue 72 gcc-specs-pie || continue
73 is-flagq -nopie || append-flags -nopie;; 73 is-flagq -nopie || append-flags -nopie;;
74 -fstack-protector) 74 -fstack-protector)
75 gcc-specs-ssp || continue 75 gcc-specs-ssp || continue
76 is-flagq -fno-stack-protector || append-flags -fno-stack-protector;; 76 is-flagq -fno-stack-protector || append-flags $(test-flags -fno-stack-protector);;
77 -fstack-protector-all) 77 -fstack-protector-all)
78 gcc-specs-ssp-to-all || continue 78 gcc-specs-ssp-to-all || continue
79 is-flagq -fno-stack-protector-all || append-flags -fno-stack-protector-all;; 79 is-flagq -fno-stack-protector-all || append-flags $(test-flags -fno-stack-protector-all);;
80 -fno-strict-overflow)
81 gcc-specs-nostrict || continue
82 is-flagq -fstrict-overflow || append-flags $(test-flags -fstrict-overflow);;
80 esac 83 esac
81 done 84 done
82} 85}
83 86
84# Remove occurrences of strings from variable given in $1 87# Remove occurrences of strings from variable given in $1
102} 105}
103 106
104# @FUNCTION: filter-flags 107# @FUNCTION: filter-flags
105# @USAGE: <flags> 108# @USAGE: <flags>
106# @DESCRIPTION: 109# @DESCRIPTION:
107# Remove particular <flags> from {C,CPP,CXX}FLAGS. Accepts shell globs. 110# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS. Accepts shell globs.
108filter-flags() { 111filter-flags() {
109 _filter-hardened "$@" 112 _filter-hardened "$@"
110 _filter-var CFLAGS "$@" 113 _filter-var CFLAGS "$@"
111 _filter-var CPPFLAGS "$@" 114 _filter-var CPPFLAGS "$@"
112 _filter-var CXXFLAGS "$@" 115 _filter-var CXXFLAGS "$@"
116 _filter-var FFLAGS "$@"
117 _filter-var FCFLAGS "$@"
113 return 0 118 return 0
114} 119}
115 120
116# @FUNCTION: filter-lfs-flags 121# @FUNCTION: filter-lfs-flags
117# @DESCRIPTION: 122# @DESCRIPTION:
129 [[ -z $* ]] && return 0 134 [[ -z $* ]] && return 0
130 export CPPFLAGS="${CPPFLAGS} $*" 135 export CPPFLAGS="${CPPFLAGS} $*"
131 return 0 136 return 0
132} 137}
133 138
139# @FUNCTION: append-cxxflags
140# @USAGE: <flags>
141# @DESCRIPTION:
142# Add extra <flags> to the current CXXFLAGS.
143append-cxxflags() {
144 [[ -z $* ]] && return 0
145 export CXXFLAGS="${CXXFLAGS} $*"
146 return 0
147}
148
149# @FUNCTION: append-fflags
150# @USAGE: <flags>
151# @DESCRIPTION:
152# Add extra <flags> to the current {F,FC}FLAGS.
153append-fflags() {
154 [[ -z $* ]] && return 0
155 export FFLAGS="${FFLAGS} $*"
156 export FCFLAGS="${FCFLAGS} $*"
157 return 0
158}
159
134# @FUNCTION: append-lfs-flags 160# @FUNCTION: append-lfs-flags
135# @DESCRIPTION: 161# @DESCRIPTION:
136# Add flags that enable Large File Support. 162# Add flags that enable Large File Support.
137append-lfs-flags() { 163append-lfs-flags() {
138 [[ -n $@ ]] && die "append-lfs-flags takes no arguments" 164 [[ -n $@ ]] && die "append-lfs-flags takes no arguments"
140} 166}
141 167
142# @FUNCTION: append-flags 168# @FUNCTION: append-flags
143# @USAGE: <flags> 169# @USAGE: <flags>
144# @DESCRIPTION: 170# @DESCRIPTION:
145# Add extra <flags> to your current C[XX]FLAGS. 171# Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
146append-flags() { 172append-flags() {
147 [[ -z $* ]] && return 0 173 [[ -z $* ]] && return 0
148 export CFLAGS="${CFLAGS} $*" 174 export CFLAGS="${CFLAGS} $*"
149 export CXXFLAGS="${CXXFLAGS} $*" 175 export CXXFLAGS="${CXXFLAGS} $*"
176 export FFLAGS="${FFLAGS} $*"
177 export FCFLAGS="${FCFLAGS} $*"
150 return 0 178 return 0
151} 179}
152 180
153# @FUNCTION: replace-flags 181# @FUNCTION: replace-flags
154# @USAGE: <old> <new> 182# @USAGE: <old> <new>
158 [[ $# != 2 ]] \ 186 [[ $# != 2 ]] \
159 && echo && eerror "Usage: replace-flags <old flag> <new flag>" \ 187 && echo && eerror "Usage: replace-flags <old flag> <new flag>" \
160 && die "replace-flags takes 2 arguments, not $#" 188 && die "replace-flags takes 2 arguments, not $#"
161 189
162 local f fset 190 local f fset
163 declare -a new_CFLAGS new_CXXFLAGS 191 declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS
164 192
165 for fset in CFLAGS CXXFLAGS; do 193 for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
166 # Looping over the flags instead of using a global 194 # Looping over the flags instead of using a global
167 # substitution ensures that we're working with flag atoms. 195 # substitution ensures that we're working with flag atoms.
168 # Otherwise globs like -O* have the potential to wipe out the 196 # Otherwise globs like -O* have the potential to wipe out the
169 # list of flags. 197 # list of flags.
170 for f in ${!fset}; do 198 for f in ${!fset}; do
205} 233}
206 234
207# @FUNCTION: is-flagq 235# @FUNCTION: is-flagq
208# @USAGE: <flag> 236# @USAGE: <flag>
209# @DESCRIPTION: 237# @DESCRIPTION:
210# Returns shell true if <flag> is in C[XX]FLAGS, else returns shell false. Accepts shell globs. 238# Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false. Accepts shell globs.
211is-flagq() { 239is-flagq() {
212 [[ -n $2 ]] && die "Usage: is-flag <flag>" 240 [[ -n $2 ]] && die "Usage: is-flag <flag>"
213 _is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 241 _is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1
214} 242}
215 243
216# @FUNCTION: is-flag 244# @FUNCTION: is-flag
217# @USAGE: <flag> 245# @USAGE: <flag>
218# @DESCRIPTION: 246# @DESCRIPTION:
219# Echo's "true" if flag is set in C[XX]FLAGS. Accepts shell globs. 247# Echo's "true" if flag is set in {C,CXX,F,FC}FLAGS. Accepts shell globs.
220is-flag() { 248is-flag() {
221 is-flagq "$@" && echo true 249 is-flagq "$@" && echo true
222} 250}
223 251
224# @FUNCTION: is-ldflagq 252# @FUNCTION: is-ldflagq
274 302
275# @FUNCTION: strip-flags 303# @FUNCTION: strip-flags
276# @DESCRIPTION: 304# @DESCRIPTION:
277# Strip C[XX]FLAGS of everything except known good/safe flags. 305# Strip C[XX]FLAGS of everything except known good/safe flags.
278strip-flags() { 306strip-flags() {
279 local x y flag NEW_CFLAGS NEW_CXXFLAGS 307 local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS
280 308
281 setup-allowed-flags 309 setup-allowed-flags
282 310
283 local NEW_CFLAGS="" 311 local NEW_CFLAGS=""
284 local NEW_CXXFLAGS="" 312 local NEW_CXXFLAGS=""
313 local NEW_FFLAGS=""
314 local NEW_FCFLAGS=""
285 315
286 # Allow unstable C[XX]FLAGS if we are using unstable profile ... 316 # Allow unstable C[XX]FLAGS if we are using unstable profile ...
287 if has ~$(tc-arch) ${ACCEPT_KEYWORDS} ; then 317 if has ~$(tc-arch) ${ACCEPT_KEYWORDS} ; then
288 ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}" 318 ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}"
289 fi 319 fi
308 break 338 break
309 fi 339 fi
310 done 340 done
311 done 341 done
312 342
343 for x in ${FFLAGS}; do
344 for y in ${ALLOWED_FLAGS}; do
345 flag=${x%%=*}
346 if [ "${flag%%${y}}" = "" ] ; then
347 NEW_FFLAGS="${NEW_FFLAGS} ${x}"
348 break
349 fi
350 done
351 done
352
353 for x in ${FCFLAGS}; do
354 for y in ${ALLOWED_FLAGS}; do
355 flag=${x%%=*}
356 if [ "${flag%%${y}}" = "" ] ; then
357 NEW_FCFLAGS="${NEW_FCFLAGS} ${x}"
358 break
359 fi
360 done
361 done
362
313 # In case we filtered out all optimization flags fallback to -O2 363 # In case we filtered out all optimization flags fallback to -O2
314 if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then 364 if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then
315 NEW_CFLAGS="${NEW_CFLAGS} -O2" 365 NEW_CFLAGS="${NEW_CFLAGS} -O2"
316 fi 366 fi
317 if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then 367 if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then
318 NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2" 368 NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"
319 fi 369 fi
370 if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then
371 NEW_FFLAGS="${NEW_FFLAGS} -O2"
372 fi
373 if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then
374 NEW_FCFLAGS="${NEW_FCFLAGS} -O2"
375 fi
320 376
321 set +f # re-enable pathname expansion 377 set +f # re-enable pathname expansion
322 378
323 export CFLAGS="${NEW_CFLAGS}" 379 export CFLAGS="${NEW_CFLAGS}"
324 export CXXFLAGS="${NEW_CXXFLAGS}" 380 export CXXFLAGS="${NEW_CXXFLAGS}"
381 export FFLAGS="${NEW_FFLAGS}"
382 export FCFLAGS="${NEW_FCFLAGS}"
325 return 0 383 return 0
326} 384}
327 385
328test-flag-PROG() { 386test-flag-PROG() {
329 local comp=$1 387 local comp=$1
346# @FUNCTION: test-flag-CXX 404# @FUNCTION: test-flag-CXX
347# @USAGE: <flag> 405# @USAGE: <flag>
348# @DESCRIPTION: 406# @DESCRIPTION:
349# Returns shell true if <flag> is supported by the C++ compiler, else returns shell false. 407# Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
350test-flag-CXX() { test-flag-PROG "CXX" "$1"; } 408test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
409
410# @FUNCTION: test-flag-F77
411# @USAGE: <flag>
412# @DESCRIPTION:
413# Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false.
414test-flag-F77() { test-flag-PROG "F77" "$1"; }
415
416# @FUNCTION: test-flag-FC
417# @USAGE: <flag>
418# @DESCRIPTION:
419# Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false.
420test-flag-FC() { test-flag-PROG "FC" "$1"; }
351 421
352test-flags-PROG() { 422test-flags-PROG() {
353 local comp=$1 423 local comp=$1
354 local flags 424 local flags
355 local x 425 local x
378# @FUNCTION: test-flags-CXX 448# @FUNCTION: test-flags-CXX
379# @USAGE: <flags> 449# @USAGE: <flags>
380# @DESCRIPTION: 450# @DESCRIPTION:
381# Returns shell true if <flags> are supported by the C++ compiler, else returns shell false. 451# Returns shell true if <flags> are supported by the C++ compiler, else returns shell false.
382test-flags-CXX() { test-flags-PROG "CXX" "$@"; } 452test-flags-CXX() { test-flags-PROG "CXX" "$@"; }
453
454# @FUNCTION: test-flags-F77
455# @USAGE: <flags>
456# @DESCRIPTION:
457# Returns shell true if <flags> are supported by the Fortran 77 compiler, else returns shell false.
458test-flags-F77() { test-flags-PROG "F77" "$@"; }
459
460# @FUNCTION: test-flags-FC
461# @USAGE: <flags>
462# @DESCRIPTION:
463# Returns shell true if <flags> are supported by the Fortran 90 compiler, else returns shell false.
464test-flags-FC() { test-flags-PROG "FC" "$@"; }
383 465
384# @FUNCTION: test-flags 466# @FUNCTION: test-flags
385# @USAGE: <flags> 467# @USAGE: <flags>
386# @DESCRIPTION: 468# @DESCRIPTION:
387# Short-hand that should hopefully work for both C and C++ compiler, but 469# Short-hand that should hopefully work for both C and C++ compiler, but
410 fi 492 fi
411} 493}
412 494
413# @FUNCTION: strip-unsupported-flags 495# @FUNCTION: strip-unsupported-flags
414# @DESCRIPTION: 496# @DESCRIPTION:
415# Strip C[XX]FLAGS of any flags not supported by the active toolchain. 497# Strip {C,CXX,F,FC}FLAGS of any flags not supported by the active toolchain.
416strip-unsupported-flags() { 498strip-unsupported-flags() {
417 export CFLAGS=$(test-flags-CC ${CFLAGS}) 499 export CFLAGS=$(test-flags-CC ${CFLAGS})
418 export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS}) 500 export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS})
501 export FFLAGS=$(test-flags-F77 ${FFLAGS})
502 export FCFLAGS=$(test-flags-FC ${FCFLAGS})
419} 503}
420 504
421# @FUNCTION: get-flag 505# @FUNCTION: get-flag
422# @USAGE: <flag> 506# @USAGE: <flag>
423# @DESCRIPTION: 507# @DESCRIPTION:
428 # this code looks a little flaky but seems to work for 512 # this code looks a little flaky but seems to work for
429 # everything we want ... 513 # everything we want ...
430 # for example, if CFLAGS="-march=i686": 514 # for example, if CFLAGS="-march=i686":
431 # `get-flag -march` == "-march=i686" 515 # `get-flag -march` == "-march=i686"
432 # `get-flag march` == "i686" 516 # `get-flag march` == "i686"
433 for f in ${CFLAGS} ${CXXFLAGS} ; do 517 for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do
434 if [ "${f/${findflag}}" != "${f}" ] ; then 518 if [ "${f/${findflag}}" != "${f}" ] ; then
435 printf "%s\n" "${f/-${findflag}=}" 519 printf "%s\n" "${f/-${findflag}=}"
436 return 0 520 return 0
437 fi 521 fi
438 done 522 done
482 ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >&2 566 ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >&2
483 567
484 # note; this matches only -fstack-protector-all 568 # note; this matches only -fstack-protector-all
485 [[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \ 569 [[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \
486 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \ 570 -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \
487 gcc-specs-ssp-all 571 gcc-specs-ssp-to-all
488} 572}
489 573
490# @FUNCTION: has_ssp 574# @FUNCTION: has_ssp
491# @DESCRIPTION: 575# @DESCRIPTION:
492# DEPRECATED - use gcc-specs-ssp from toolchain-funcs 576# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
618# @FUNCTION: bindnow-flags 702# @FUNCTION: bindnow-flags
619# @RETURN: Returns the flags to enable "now" binding in the current selected linker. 703# @RETURN: Returns the flags to enable "now" binding in the current selected linker.
620# @DESCRIPTION: 704# @DESCRIPTION:
621# DEPRECATED - Gets the flags needed for "NOW" binding 705# DEPRECATED - Gets the flags needed for "NOW" binding
622bindnow-flags() { 706bindnow-flags() {
623 ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild" >&2 707 ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
624
625 case $($(tc-getLD) -v 2>&1 </dev/null) in
626 *GNU* | *'with BFD'*) # GNU ld
627 echo "-Wl,-z,now" ;;
628 *Apple*) # Darwin ld
629 echo "-bind_at_load" ;;
630 *)
631 # Some linkers just recognize -V instead of -v
632 case $($(tc-getLD) -V 2>&1 </dev/null) in
633 *Solaris*) # Solaris accept almost the same GNU options
634 echo "-Wl,-z,now" ;;
635 esac
636 ;;
637 esac
638} 708}
639 709
640 710
641# Some tests for when we screw with things and want to make 711# Some tests for when we screw with things and want to make
642# sure we didn't break anything 712# sure we didn't break anything

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.132

  ViewVC Help
Powered by ViewVC 1.1.20