[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NPTL and static linking



[Jason Lunz]
> I just figured out a way to do this for the ssh binary. Maybe this would
> work for you?

As others have pointed out, there is -Wl,-Bstatic and -Wl,-Bdynamic -
but even absent those, you can just refer to the .a files directly if
you wish.  So instead of -Lopenbsd-compat/ -lopenbsd-compat, you can
just say openbsd-compat/libopenbsd-compat.a on the link line.  Same
with the -L. -lssh thing - if you don't want "." going into your
runtime library path (with some linkers), just saying "libssh.a" is
easier.

In general, linking your own libraries staticly and the system
libraries dynamically is probably a good plan - if you need anything
static at all.

Peter

Attachment: signature.asc
Description: Digital signature


Reply to: