Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: Passing flags from cc to ld
@ 1994-07-22 22:09 Jonathan Rozes
  1994-07-25 14:33 ` Frank Wortner
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Rozes @ 1994-07-22 22:09 UTC (permalink / raw)


Hello OSFers--

I'm using DEC C v3.11 on OSF 1.3 to build a program that uses libraries installed
in non-standard paths. I need to have cc pass the '-rpath /usr/foo/lib' option to 
ld but can't find a way to do so. If I simply do this on the coommand line:

cc -L/usr/foo/lib -rpath /usr/foo/lib -o prog prog.o bar.o biff.o -lfum

cc parses the options wrong and invokes the linker something like this:

ld [...] -L/usr/foo/lib -rpath -o prog /usr/foo/lib prog.o bar.o biff.o -lfum

Naturally, this bombs with a bad magic number error, since ld thinks /usr/foo/lib
is an object file. What I need is something like gcc's -Xlinker switch that tells
cc to ust blindly pass the next argument to the linker. So far, the only way I have found to get around this is to link by hand, which certainly is not acceptable.

So have I missed something or is this a misfeature of cc and/or ld? Any help would 
be greatly appreciated...

Thanks,
jonathan

+++ Jonathan Rozes, jrozes@musketeers.tufts.edu, jrozes@emerald.tufts.edu
+++ http://www.cs.tufts.edu/~jrozes/
+++ Editing simplified: A one-character RE is a RE that matches whatever
    the one-character RE matches. <a href=/usr/share/man/cat1/ed.1></a>




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Passing flags from cc to ld
  1994-07-22 22:09 Passing flags from cc to ld Jonathan Rozes
@ 1994-07-25 14:33 ` Frank Wortner
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Wortner @ 1994-07-25 14:33 UTC (permalink / raw)



In article <CtD48I.CGI@news.tufts.edu>, jrozes@musketeers.tufts.edu (Jonathan Rozes) writes:
|>What I need is something like gcc's -Xlinker switch that tells
|>cc to ust blindly pass the next argument to the linker.

Try something like this:

	cc -Wl,-rpath,/some/where ...

CC replaces the commas "," with spaces before passing the options to
the linker.

GCC also accepts the same syntax for passing linker options.

					Frank






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-07-25 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-07-22 22:09 Passing flags from cc to ld Jonathan Rozes
1994-07-25 14:33 ` Frank Wortner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox