Skip to content

Commit 9da2c69

Browse files
GeoffroyAubeyTautvydasZilys
authored andcommitted
Disable uscore check when cross-compiling
Signed-off-by: Tautvydas Žilys <[email protected]>
1 parent 8fc5e0e commit 9da2c69

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

configure.ac

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,22 +1620,27 @@ if test x$host_win32 = xno; then
16201620
LIBS="$LIBS $DL_LIB"
16211621
AC_DEFINE(HAVE_DL_LOADER,1,[dlopen-based dynamic loader available])
16221622
dnl from glib's configure.ac
1623-
AC_CACHE_CHECK([for preceeding underscore in symbols],
1624-
mono_cv_uscore,[
1625-
AC_TRY_RUN([#include <dlfcn.h>
1626-
int mono_underscore_test (void) { return 42; }
1627-
int main() {
1628-
void *f1 = (void*)0, *f2 = (void*)0, *handle;
1629-
handle = dlopen ((void*)0, 0);
1630-
if (handle) {
1631-
f1 = dlsym (handle, "mono_underscore_test");
1632-
f2 = dlsym (handle, "_mono_underscore_test");
1633-
} return (!f2 || f1);
1634-
}],
1623+
if test "x$cross_compiling" = "xyes"; then
1624+
AC_MSG_RESULT(cross compiling, assuming no)
1625+
mono_cv_uscore=no
1626+
else
1627+
AC_CACHE_CHECK([for preceeding underscore in symbols],
1628+
mono_cv_uscore,[
1629+
AC_TRY_RUN([#include <dlfcn.h>
1630+
int mono_underscore_test (void) { return 42; }
1631+
int main() {
1632+
void *f1 = (void*)0, *f2 = (void*)0, *handle;
1633+
handle = dlopen ((void*)0, 0);
1634+
if (handle) {
1635+
f1 = dlsym (handle, "mono_underscore_test");
1636+
f2 = dlsym (handle, "_mono_underscore_test");
1637+
} return (!f2 || f1);
1638+
}],
16351639
[mono_cv_uscore=yes],
16361640
[mono_cv_uscore=no],
1637-
[])
1638-
])
1641+
[])
1642+
])
1643+
fi
16391644
if test "x$mono_cv_uscore" = "xyes"; then
16401645
MONO_DL_NEED_USCORE=1
16411646
else

0 commit comments

Comments
 (0)