Subject: Re: ARGH: cc on alpha
To: Tim Rightnour <root@garbled.net>
From: Todd Vierling <tv@pobox.com>
List: port-alpha
Date: 07/25/1998 12:58:59
On Fri, 24 Jul 1998, Tim Rightnour wrote:

: rigel# cc foo.c -R/usr/X11R6/lib -I/usr/X11R6/include -L/usr/X11R6/lib -lXpm
: cc: unrecognized option `-R/usr/X11R6/lib'
: then proceeds to *ignore it* and make a broken binary...
: 
: How the heck do you create a portable build target like this??!

Try the following:

cc foo.c -Wl,-R/usr/X11R6/lib ...

I have a feeling that -R means the same to Alpha's ld as -rpath, and if
that's true, this option should be accepted by all NetBSD platforms' ld
linkers.  (It's graciously accepted on a.out ld with or without -static.)

This would be the appropriate way to fix pkgsrc while retaining
compatibility, but alpha's gcc LINK_SPEC should be fixed to pass -R to ld.
I'll be addressing that when I import the egcs 1.1 sources. (This could be
done for 1.3.x with a little script that dumps gcc's specs and writes a
modified version to, ick!, /usr/libexec/NetBSD/${MACHINE_ARCH}/2.7.2.2/specs
...which would override the compiled-in specs implicitly.)

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)