From: Perry Smith Date: 2011-01-29T11:25:12+09:00 Subject: [ruby-core:34966] Re: Setting libpath for AIX On Jan 28, 2011, at 7:17 PM, Yutaka Kanemoto wrote: > Hi, > > If you add -L. when you link a library/executable, the linker add . > (current dir) to libpath by default. > We need to avoid this not to load unexpected library for security > reason. That is the reason why now we use -blibpath to explicitly > decide the libpath. > > I think it is hard to eliminate "-L.", "-L../.." from current build process. > We need to look for another way to add such path to libpath. > If you have any nice idea, please let me know. I believe what you are saying is currently, the link lines often have -L . and -L .. so you want to avoid adding . and .. to the internal libpath of the shared library or executable. Curiously, -blibpath is not specified in the places that -L . and -L .. is being passed. libpath is specified only in three places in the build I just did. The link of miniruby, libruby.so, and ruby There are other ways to avoid -L . and -L .. if that really is needed but I don't see how that concern relates to the link commands that specify libpath. The link of these three specify: -Wl,-blibpath:/usr/local//rvm/rubies/ruby-1.9.1-p378/lib:/usr/lib:/lib I'm suggesting replace that with: -L /usr/local//rvm/rubies/ruby-1.9.1-p378/lib Perry