[M3devel] a hope for dynamic linking!

Jay jayk123 at hotmail.com
Sat Apr 19 17:10:16 CEST 2008


(ok, actually I meant maybe for cm3cg but ok either way, there'd only be one use of "/usr/local/cm3/bin/libgmp.so" so might as well be static)




From: jayk123 at hotmail.com
To: hosking at cs.purdue.edu
Date: Sat, 19 Apr 2008 15:02:44 +0000
CC: m3devel at elegosoft.com
Subject: Re: [M3devel] a hope for dynamic linking!







I mean for the "regular" Modula-3 "app" stuff, not cm3cg.

It looks like it is already static, good.

1) http://gcc.gnu.org/ml/gcc/2006-10/msg00141.html

2) The current code:

m3-sys/m3cc/gcc/Makefile.in:

configure-gmp: 
...
    echo Configuring in $(HOST_SUBDIR)/gmp; \
...
      $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
      --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \
      || exit 1
@endif gmp


configure-mpfr: 
...
    echo Configuring in $(HOST_SUBDIR)/mpfr; \
...
      $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
      --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp \
      || exit 1
@endif mpfr


Let me test it and then I'll remove the Quake code related to this.


 - Jay


CC: m3devel at elegosoft.com
From: hosking at cs.purdue.edu
To: jayk123 at hotmail.com
Subject: Re: [M3devel] a hope for dynamic linking!
Date: Sat, 19 Apr 2008 10:50:04 -0400

Hold on!  I am strongly in favor of static linking for cm3cg/m3cgc1 so that it is a standalone executable.  Should be easy enough with gcc configure. 
On Apr 19, 2008, at 10:31 AM, Jay wrote:http://www.eyrie.org/~eagle/notes/rpath.html
http://people.debian.org/~che/personal/rpath-considered-harmful


but yet:

http://www.scons.org/wiki/UsingOrigin

So you can either colocate executables and .sos in the same directory or, like
  /cm3/bin 
  /cm3/lib/m3core.so 

and vary the install root.

We should be using this where available -- Linux, Solaris, Irix.
Too bad not supported elsewhere.
On Windows you can colocate; the .exe's directory is always searched.

 - Jay


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080419/b39cce61/attachment-0002.html>


More information about the M3devel mailing list