PATCH: Don't set HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes

H.J. Lu hjl.tools@gmail.com
Sat Aug 25 22:31:00 GMT 2012


On Sat, Aug 25, 2012 at 3:27 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Saturday 25 August 2012 11:58:08 H.J. Lu wrote:
>> On Sat, Aug 25, 2012 at 8:31 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> > Hi,
>> >
>> > Setting HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes causes:
>> >
>> > as: error while loading shared libraries:
>> > /builddir/build/BUILD/binutils/./opcodes/.libs/libopcodes-2.23.51.0.2-0.1
>> > .fc17.so: file too short
>> > make[4]: *** [gold-threads.o] Error 2
>> >
>> > when compiling gold using binutils linked with the same versions of
>> > libbfd and libopcodes. As far as I can tell, one can run the newly built
>> > binutils without setting them since libtool already sets up proper
>> > DT_RPATH.
>>
>> The change was introduced by
>>
>> http://gcc.gnu.org/ml/gcc-cvs/2005-03/msg01452.html
>>
>> Paolo, do you remember the reason for this?
>>
>> I tested this patch and works fine with --enable-shared for binutils.
>> I tested both separate build directory and in-source build.  OK
>> to install?
>
> does this also fix:
> http://sourceware.org/bugzilla/show_bug.cgi?id=4970
> -mike

Yes, it should.  That is the same bug I ran into.  Please
give my patch a try.

Thanks.

-- 
H.J.



More information about the Gcc mailing list