<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div> It appears FreeBSD system ld gained -z origin support in 4.7. </div><div><br></div><div><br> This probably maps back to a particular GNU ld change/version. </div><div><br></div><div><br> This issue bugs me. I want something simple and portable. There seems to be no perfect solution. </div><div><br></div><div><br> Options include:</div><div><br></div><div> 1 drop support for old systems</div><div><br></div><div> 2 relink or chrpath/patchelf upon install (Apple and I think Solaris have similar utilities) </div><div><br></div><div> 3 better predict the install path at build time<br> I think this is what we do by default actually, just not for building "distributions" (at least make-dist.py) </div><div><br></div><div> 4 wrapper scripts that set LD_LIBRARY_PATH; seems a popular suggestion I find<br> anything involving wrapper scripts inelegant </div><div><br></div><div> 5 use libtool and whatever it does, which is probably I'd guess is relink-upon-install </div><div><br></div><div> 6 use autoconf to detect -z origin and fallback to ?</div><div><br></div><div><br> $ORIGIN has the downside of possibly not working with setuid/setgid. </div><div><br></div><div><br> yes: <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+10.0-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+7.0-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+5.0-RELEASE&arch=default&format=html <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+4.7-RELEASE&arch=default&format=html </div><div><br></div><div><br> no: <br> http://www.freebsd.org/cgi/man.cgi?query=ld&apropos=0&sektion=0&manpath=FreeBSD+4.0-RELEASE&arch=default&format=html </div><div><br></div><div><br> - Jay<br><br><br><br><br><br></div><div>> Date: Fri, 5 Jun 2015 07:50:33 +0200<br>> From: adacore@marino.st<br>> To: jay.krell@cornell.edu; m3devel@elegosoft.com<br>> Subject: Re: [M3devel] rpath woes<br>> <br>> On 6/5/2015 06:16, Jay K wrote:<br>> > The FreeBSD4 users were surprisingly vocal surprisingly recently.<br>> > So I put some work into it.<br>> > I agree it is an old system.<br>> <br>> It's completely unsupported (for 7 years now) and they don't need the<br>> latest M3 right? Old release still work fine, that should be enough<br>> justification to change this on trunk.<br>> <br>> <br>> <br>> > Linux.common and FreeBSD.common look very similar but I agree different<br>> > and if it is working for you, good, I can ignore it?<br>> > I guess the main thing was "-Wl,-z,origin"? Needed to make $ORIGIN work?<br>> > Was this right for FreeBSD 5 or 6 or 7 or 8?<br>> <br>> yes. I am using the latest binutils (thus latest ld) with M3. The base<br>> ld is ancient and hand maintained (a GPLv3 issue) so I don't know,<br>> Actually, the linux way is opposite: It explicitly defines SYSTEM_LD<br>> rather than use flags for SYSTEM_CC. So rather than flags, we are<br>> talking about the approach.<br>> <br>> Really nobody with a supported FreeBSD release needs to build from<br>> scratch because it exists in ports. If anybody absolutely wants to,<br>> just say "emulates what the port is doing". This is actually easier<br>> said than done because in addition to using the latest binutils, there<br>> are a number of inline substitutions that are done, see post-patch<br>> target here, starting line 78:<br>> <br>> https://svnweb.freebsd.org/ports/head/lang/modula3/Makefile?revision=388555&view=markup<br>> <br>> line 85 is where newer gcc and newer as is set for m3.<br>> <br>> John<br></div> </div></body>
</html>