| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] correct order of linker options to avoid link errors with recent toolchains
 On 23/07/2010 17:44, "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> Olaf Hering writes ("[Xen-devel] [PATCH] correct order of linker options to
> avoid link errors with recent toolchains"):
>> The order of objects and linked libraries is important with recent toolchain
>> when --as-needed is used. Move LDFLAGS to the end of cc commandline options.
>> Without this change, symbols in libbzip2 are not found when building with
>> openSuSE 11.2 and newer.
> 
> Thanks, but:
> 
> I infer that libbzip2 is in LDFLAGS (as -lbzip2, I guess).  Is that
> right ?  But I think that libraries should be in *_LIBS, not LDFLAGS.
> LDFLAGS needs to stay at the beginning so that it can work if you set
> it to -static or something.
> 
>>  libxenguest.so.$(MAJOR).$(MINOR): LDFLAGS += $(call zlib-options,l)
> 
> What is this program "zlib-options" ?  I don't have it on my system.
It's right there in the same Makefile directly above the line you quoted.
Yes, the above line can add -l<lib> items to LDFLAGS. Sounds like the right
fix would indeed be to define a new COMPRESSION_LIBS variable and put it at
the end of the linker command line.
 -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |