Index: flag-o-matic.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v retrieving revision 1.66 diff -u -b -B -w -p -r1.66 flag-o-matic.eclass --- flag-o-matic.eclass 28 Jul 2004 02:18:38 -0000 1.66 +++ flag-o-matic.eclass 28 Jul 2004 04:33:09 -0000 @@ -410,18 +410,22 @@ filter-ldflags() { etexec-flags() { # if you're not using a hardened compiler you wont need this - # PIC/no-pic kludge in the first place. + # PIC/no-pic workaround. has_hardened || return 0 - # this kludge breaks on amd64, and probably other -fPIC dependant - # archs. - use amd64 && return 0 - if has_pie || has_pic; then + if has_pie then; + [ -z "`is-flag -fno-pie`" ] && + export CFLAGS="${CFLAGS} `test_flag -fno-pie`" + fi + + # On arch amd64, and probably other -fPIC dependant + # archs we don't want to invert the -f to -fno logic. + use amd64 && return 0 + if has_pic; then [ -z "`is-flag -fno-pic`" ] && export CFLAGS="${CFLAGS} `test_flag -fno-pic`" - [ -z "`is-flag -nopie`" ] && - export CFLAGS="${CFLAGS} `test_flag -nopie`" fi + return 0 }