First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 178535
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Qt Bug Alias <qt@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 178535 depends on: Show dependency tree
Bug 178535 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-05-14 17:11 0000
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.

------- Comment #1 From Caleb Tennis 2007-05-22 14:56:56 0000 -------
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?

------- Comment #2 From Arfrever Frehtes Taifersar Arahesis 2007-05-24 14:15:13 0000 -------
(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

------- Comment #3 From Caleb Tennis 2007-06-20 20:33:47 0000 -------
added to 4.3.0.  Thanks!

First Last Prev Next    No search results available      Search page      Enter new bug