Slow xfrun, [was: new dev branch stuff]

edscott wilson garcia edscott at xfce.org
Sun Jan 23 15:55:26 CET 2005


El sáb, 22-01-2005 a las 18:27 -0800, Brian J. Tarricone escribió:
> edscott wilson garcia wrote:
> 
> >El sáb, 22-01-2005 a las 12:04 +0200, Mihai Bazon escribió:
> >  
> >
> >>On Fri, 21 Jan 2005 19:50:32 -0600, edscott wilson garcia
> >><edscott at xfce.org> wrote:
> >>    
> >>
> >>>Will do, as soon as I get back to the city on monday (as I am on the
> >>>road now).
> >>>      
> >>>
> >>Great! :-)
> >>
> >>    
> >>
> >>>>And, how do you link static?  I tried with LDFLAGS="-static" but it
> >>>>doesn't work (lots of error at link phase); have to admit, I didn't
> >>>>dig it too much.
> >>>>        
> >>>>
> >>>If it is a library located in /some/directory, and called libhdf5.a, you
> >>>would simply write:
> >>>
> >>>$cc -o program -c program.c -L/some/directory -lhdf5
> >>>      
> >>>
> >>Maybe I'm missing something, but isn't this the way you link dynamically?
> >>    
> >>
> >
> >I believe the default for C is static. Maybe for C++ the default is
> >dynamic.  If you use the -static directive you might have problems if
> >you want to link to *both* static and dynamic libraries at the same time
> >(different libraries, of course).
> >  
> >
> nope.  ld's default is to prefer dynamic libraries, at least with recent 
> binutils versions.  i don't think it has anything to do with the 
> lanugage used (how would ld know anyway?  it just works with object 
> files).  if you want to link to the static library, you have to 
> explicitly give it the .a filename.  i don't think you need to specify 
> -static though.  i think you can be more flexible if using libtool: in 
> that case you just give it the .la file, and tell it to prefer static or 
> dynamic.  i don't remember exactly how to do this though.

Whether ld chooses static or dynamic would also depend on the executable
output format as well. a.out cannot be linked dynamically, elf format
can. The default is probably chosen on the output type, static for a.out
and dynamic for elf (and falling back to the .a file if the .so file is
not present). The language choice could be made by ld if called from cc
or cpp or f77 (I never invoke ld directly myself), but I've never
checked this on point (although I eventually will, just out of
curiousity).

 
regards,

Edscott



More information about the Xfce4-dev mailing list