Date: Tue, 29 Sep 1998 20:21:45 CDT From: Kent Vander Velden <graphix@iastate.edu> To: freebsd-current@FreeBSD.ORG Subject: ELF library questions (building and linking) Message-ID: <199809300121.UAA04701@isua5.iastate.edu>
next in thread | raw e-mail | index | archive | help
Building an ELF library questions: I have been trying to rebuild a few of the libraries that I use to be in elf format. Is the following the correct way to build an elf library? for every file: cc -c -fpic file.c ld -o shared/file.o -x -r file.o cc -shared -Wl,-x -o libA.so.1 -Wl,-soname,libA.so.1 `lorder file1 file2 ... | tsort` Does `ld -shared ...` not work correctly any longer? When I used `ld -shared ...` to build a shared library and `ar` to build an archive in the same directory, the linker seemed to prefer to link to the archive instead of the shared library. Mush ELF libraries have a name of the form libName.so.version or can try be of the form libName.so.version.reversion? Linking to an ELF library question: I seem to remember there being an environment variable that could be set that held a search path for the linker. Setting this variable was like adding a -L<path> flag to the link line. Is such a thing still available? Mainly I would like to avoid adding "-L/usr/X11/lib" to a bunch of Makefiles. Thanks. --- Kent Vander Velden kent@iastate.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809300121.UAA04701>