Use Mono prefix for libMonoPosixHelper
authorAndrea Canciani <ranma42@gmail.com>
Tue, 27 May 2014 10:57:38 +0000 (12:57 +0200)
committerAndrea Canciani <ranma42@gmail.com>
Tue, 1 Jul 2014 12:25:12 +0000 (14:25 +0200)
The libMonoPosixHelper is installed together with Mono, hence its path
in the configuration should be relative to the Mono prefix.

It was previously assumed to reside in a system path, so the the
dynamic linker would find it anyway.

This patch is based on the one included in bug #18555 (by GaĆ«tan
Lehmann <gaetan.lehmann@gmail.com>), but it also updates
runtime/Makefile.am to keep runtime/etc/mono/config consistent.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=18555

data/config.in
runtime/Makefile.am

index 3cc39732e1c7dc58800b7a9894fc9733613faac7..fc764c7a02943f75a25fe94dad4950eabd58ae79 100644 (file)
@@ -10,7 +10,7 @@
        <dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
        <dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
        <dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
-       <dllmap dll="MonoPosixHelper" target="libMonoPosixHelper@libsuffix@" os="!windows" />
+       <dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
        <dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
        <dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
        <dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
index 6b784a3d6e8b5506f8928956d370b2d8dc52172f..7c9b6006673d0c11190037859c7cf967e41e1a78 100644 (file)
@@ -168,7 +168,7 @@ CLEANFILES = etc/mono/config
 # depend on $(symlinks) to ensure 'etc/mono' directory exists
 etc/mono/config: ../data/config Makefile $(symlinks)
        d=`cd ../support && pwd`; \
-       sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
+       sed 's,target="$(prefix)/lib/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
        if test -z "$(libgdiplus_loc)"; then :; else \
          sed 's,target="[^"]*libgdiplus[^"]*",target="$(libgdiplus_loc)",' $@t > $@tt; \
          mv -f $@tt $@t; fi