1  # Copyright 19992013 Gentoo Foundation 
1  # Copyright 19992013 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/gentoox86/eclass/flagomatic.eclass,v 1.187 2013/01/12 14:32:31 jlec Exp $ 
3  # $Header: /var/cvsroot/gentoox86/eclass/flagomatic.eclass,v 1.188 2013/09/05 05:28:01 vapier Exp $ 
4  
4  
5  # @ECLASS: flagomatic.eclass 
5  # @ECLASS: flagomatic.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 
…  
…  
323  
323  
324  # save the original mfpmath flag 
324  # save the original mfpmath flag 
325  orig_mfpmath=$(getflag mfpmath) 
325  orig_mfpmath=$(getflag mfpmath) 
326  # get the value of the current mfpmath flag 
326  # get the value of the current mfpmath flag 
327  new_math=$(getflag mfpmath) 
327  new_math=$(getflag mfpmath) 


328  # convert "both" to something we can filter 


329  new_math=${new_math/both/387,sse} 
328  new_math=" ${new_math//,/ } " 
330  new_math=" ${new_math//[,+]/ } " 
329  # figure out which math values are to be removed 
331  # figure out which math values are to be removed 
330  prune_math="" 
332  prune_math="" 
331  for prune_math in "$@" ; do 
333  for prune_math in "$@" ; do 
332  new_math=${new_math/ ${prune_math} / } 
334  new_math=${new_math/ ${prune_math} / } 
333  done 
335  done 