This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support LD_SYMBOLIC and LD_SYMBOLIC_FUNCTIONS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]