Subject: Re: Shared Libs and executables: How?
To: Olaf Schroeder <olaf@digirule.com>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: netbsd-help
Date: 10/28/1996 21:21:57
> Do you know if gcc can be instructed to use shared/static libs on a
> file-by-file basis? Atleast for my version of gcc, it's an all or
> nothing deal, but ld seems to have this capability.

Use gcc's `-Xlinker' option for this. It passesthe next argument to
the linker verbatim. E.g.:

	cc -v x.o -Xlinker -Bstatic -lm -Xlinker -Bdynamic

produces

	ld -e start -dc -dp /usr/lib/crt0.o -L/usr/libexec x.o -Bstatic -lm -Bdynamic -lgcc -lc -lgcc


-pk