Qt versions >=4.3 have configure script with introduced new option "-reduce-relocations". It reduces relocations in the libraries through safe extra linker optimizations. I suggest adding this option to >=qt-4.3.0_rc1.ebuild. Upstream wouldn't add such an option if it was unsafe. Some fragments of configure script: CFG_REDUCE_RELOCATIONS=no ... reduce-relocations) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_REDUCE_RELOCATIONS="$VAL" else UNKNOWN_OPT=yes fi ;; ... if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then CFG_REDUCE_RELOCATIONS=no else CFG_REDUCE_RELOCATIONS=yes fi fi The content of unixtests/bsymbolic_functions.test: #!/bin/sh BSYMBOLIC_FUNCTIONS_SUPPORT=no COMPILER=$1 VERBOSE=$2 cat >>bsymbolic_functions.c << EOF int main() { return 0; } EOF "$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes rm -f bsymbolic_functions.c libtest.so # done if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled." exit 0 else [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled." exit 1 fi As you can see it is safe to add this option to ebuild, because, if a user uses archaic linker, symbolic function binding will be disabled. In other cases it will be enabled and it won't cause any errors.
I think this is okay. The only problem I can think of is what if you emerge this, but then downgrade binutils? Will that pose a problem?
(In reply to comment #1) > The only problem I can think of is what if you emerge this, but then downgrade > binutils? Will that pose a problem? No, because -Bsymbolic-functions only affects the internals of shared libraries. It binds global functions references locally (Locally means inside the code of given library). This option doesn't affect executables. Also even GCC developers decided to enable -Bsymbolic-functions defaultly when building libstdc++.so and other libraries with ld supporting it: http://gcc.gnu.org/ml/gcc/2007-01/msg00342.html http://gcc.gnu.org/ml/gcc/2007-01/msg00463.html
added to 4.3.0. Thanks!