summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2010-08-22 21:38:46 +0000
committerMark Loeser <halcy0n@gentoo.org>2010-08-22 21:38:46 +0000
commit6cfb361fc319af5cea944f363960d532f61ee555 (patch)
treeda2f0418c486dd37f2bc715445be3fcd83fb3192 /profiles
parentAutomated update of use.local.desc (diff)
downloadhistorical-6cfb361fc319af5cea944f363960d532f61ee555.tar.gz
historical-6cfb361fc319af5cea944f363960d532f61ee555.tar.bz2
historical-6cfb361fc319af5cea944f363960d532f61ee555.zip
Remove profile.bashrc since it only did CFLAGS checks which shouldn't have existed to begin with; bug #296401
Diffstat (limited to 'profiles')
-rw-r--r--profiles/arch/amd64/ChangeLog6
-rw-r--r--profiles/arch/amd64/profile.bashrc93
2 files changed, 5 insertions, 94 deletions
diff --git a/profiles/arch/amd64/ChangeLog b/profiles/arch/amd64/ChangeLog
index 42a59e81b19b..ceb2a84d2075 100644
--- a/profiles/arch/amd64/ChangeLog
+++ b/profiles/arch/amd64/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for Gentoo/AMD64 profile directory
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/arch/amd64/ChangeLog,v 1.100 2010/08/19 19:45:30 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/arch/amd64/ChangeLog,v 1.101 2010/08/22 21:38:46 halcy0n Exp $
+
+ 22 Aug 2010; Mark Loeser <halcy0n@gentoo.org> -profile.bashrc:
+ Remove profile.bashrc since it only did CFLAGS checks which shouldn't have
+ existed to begin with; bug #296401
19 Aug 2010; Samuli Suominen <ssuominen@gentoo.org> package.use.mask:
Remove USE="ao" mask for zsnes wrt #333497.
diff --git a/profiles/arch/amd64/profile.bashrc b/profiles/arch/amd64/profile.bashrc
deleted file mode 100644
index e30b428eee1d..000000000000
--- a/profiles/arch/amd64/profile.bashrc
+++ /dev/null
@@ -1,93 +0,0 @@
-BAD_FLAGS=( "-fvisibility=hidden" "-fvisibility-hidden" "-fvisibility-inlines-hidden" "-fPIC" "-fpic" "-m32" "-m64" "-g3" "-ggdb3" "-ffast-math" )
-
-getPROG() {
- local var=$1 prog=$2
-
- if [[ -n ${!var} ]] ; then
- echo "${!var}"
- return 0
- fi
-
- local search=
- [[ -n $3 ]] && search=$(type -p "$3-${prog}")
- [[ -z ${search} && -n ${CHOST} ]] && search=$(type -p "${CHOST}-${prog}")
- [[ -n ${search} ]] && prog=${search##*/}
-
- export ${var}=${prog}
- echo "${!var}"
-}
-
-get_broken_flags() {
- local myprog="${1}" lang="${2}"
- shift 2
-
- # this finds general broken flags, such as -02 or bogus -f flags
- echo 'main(){}' | LC_ALL=C ${myprog} ${@} -x ${lang} -o /dev/null - 2>&1 | \
- egrep "unrecognized .*option" | \
- egrep -o -- '('\''|\"|`)-.*' | \
- sed -r 's/('\''|`|")//g; s/^/"/; s/$/"/'
-
- # this will find bogus debug output types, such as -gfoobar
- echo 'main(){}' | LC_ALL=C ${myprog} ${@} -x ${lang} -o /dev/null - 2>&1 | \
- egrep "unrecognised debug output" | \
- egrep -o -- '('\''|\"|`).*' | \
- sed -r 's/('\''|`|")//g; s/^/"-g/; s/$/"/'
-}
-
-remove_flag() {
- local remove="${1}"
- shift
-
- while [[ "${1}" ]]; do
- [[ "${1}" != "${remove}" ]] && echo -n "${1} "
- shift
- done
-}
-
-filter_invalid_flags() {
- local flag broken_flags
-
- eval broken_flags=( $(get_broken_flags $(getPROG CC gcc) c ${CFLAGS}) )
- for flag in "${broken_flags[@]}"; do
- ewarn "Filtering out invalid CFLAG \"${flag}\""
- CFLAGS="$(remove_flag "${flag}" ${CFLAGS})"
- done
-
- eval broken_flags=( $(get_broken_flags $(getPROG CXX g++) c++ ${CXXFLAGS}) )
- for flag in "${broken_flags[@]}"; do
- ewarn "Filtering out invalid CXXFLAG \"${flag}\""
- CXXFLAGS="$(remove_flag "${flag}" ${CXXFLAGS})"
- done
-}
-
-bashrc_has() {
- [[ " ${*:2} " == *" $1 "* ]]
-}
-
-if [[ ${EBUILD_PHASE} == "setup" ]]; then
-
- filter_invalid_flags
-
- unset trigger
-
- for flag in "${BAD_FLAGS[@]}"; do
- if bashrc_has ${flag} ${CFLAGS}; then
- trigger=1
- eerror "Your CFLAGS contains \"${flag}\" which can break packages."
- fi
- if bashrc_has ${flag} ${CXXFLAGS}; then
- trigger=1
- eerror "Your CXXFLAGS contains \"${flag}\" which can break packages."
- fi
- done
- if [[ ${trigger} ]]; then
- eerror ""
- eerror "Before you file a bug, please remove these flags and "
- eerror "re-compile the package in question as well as all its dependencies"
- sleep 5
- fi
-
- unset flag trigger
-fi
-
-unset BAD_FLAGS