PATCH: Support LD_SYMBOLIC and LD_SYMBOLIC_FUNCTIONS
Nick Clifton
nickc@redhat.com
Tue Jan 30 15:10:00 GMT 2007
Hi H.J.
>> I tried it and gave up. With an environment variable, I just need
>> to do
>>
>> # LD_SYMBOLIC_FUNCTIONS=1 rpmbuild --rebuild openoffice.org-2.0.4-5.5.10.src.rpm
But you do not have -Bsymbolic-functions in your spec file, so if you
forget this trick in the future and rebuild the openoffice.org binaries
again you will miss out on the optimization. With this new feature
restricted to the -Bsymbolic-functions command line switch users that
want it are forced to do the right thing and add it to the spec file.
>> With an environment variable, you can add
>>
>> export LD_SYMBOLIC_FUNCTIONS=1
>>
>> to openoffice.org.spec and you just need to do
>>
>> # rpmbuild -ba openoffice.org.spec
>>
>> You don't have to change sources of Open Office.
Right, but then adding a new command line switch does not require that
the sources be changed either.
> One more example, it will be nice to build binutils configured using
> --enable-shared with -Bsymbolic-functions. With LD_SYMBOLIC_FUNCTIONS
> and rpm, I just need to add
>
> export LD_SYMBOLIC_FUNCTIONS=1
>
> to binutils.spec and I am done.
Or you could just edit the binutils.spec file and add
-Wl-Bsymbolic-functions to the CFLAGS definition and you can achieve the
same effect without needing an environment variable.
So really, what has the environment variable gained you ? It does make
quick rebuilds of tools a little bit easier yes, but it is not that hard
to edit build scripts, makefiles and spec files to add the necessary
command line switch. Honestly, I do not see adding the environment
variable gains us anything.
Patch refused.
Cheers
Nick
More information about the Binutils
mailing list