mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Use a small test library instead of libpthread.so for testing RTLD_GLOBAL
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de> * configure.in: Use a small test library instead of libpthread.so for testing RTLD_GLOBAL brokenness. (#139567, Julio M. Merino Vidal)
This commit is contained in:
committed by
Matthias Clasen
parent
906a83b7f6
commit
5994d59be1
@@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* configure.in: Use a small test library instead of
|
||||||
|
libpthread.so for testing RTLD_GLOBAL brokenness. (#139567,
|
||||||
|
Julio M. Merino Vidal)
|
||||||
|
|
||||||
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
||||||
|
|
||||||
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* configure.in: Use a small test library instead of
|
||||||
|
libpthread.so for testing RTLD_GLOBAL brokenness. (#139567,
|
||||||
|
Julio M. Merino Vidal)
|
||||||
|
|
||||||
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
||||||
|
|
||||||
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* configure.in: Use a small test library instead of
|
||||||
|
libpthread.so for testing RTLD_GLOBAL brokenness. (#139567,
|
||||||
|
Julio M. Merino Vidal)
|
||||||
|
|
||||||
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
||||||
|
|
||||||
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* configure.in: Use a small test library instead of
|
||||||
|
libpthread.so for testing RTLD_GLOBAL brokenness. (#139567,
|
||||||
|
Julio M. Merino Vidal)
|
||||||
|
|
||||||
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
||||||
|
|
||||||
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
Sun Jul 4 01:52:18 2004 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* configure.in: Use a small test library instead of
|
||||||
|
libpthread.so for testing RTLD_GLOBAL brokenness. (#139567,
|
||||||
|
Julio M. Merino Vidal)
|
||||||
|
|
||||||
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
2004-07-02 Sebastian Wilhelmi <seppi@seppi.de>
|
||||||
|
|
||||||
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
* glib/gatomic.c: Rename __asm to __asm__ and __volatile to
|
||||||
|
14
configure.in
14
configure.in
@@ -1061,6 +1061,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
|
|||||||
LIBS="$G_MODULE_LIBS $LIBS"
|
LIBS="$G_MODULE_LIBS $LIBS"
|
||||||
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
|
LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
|
||||||
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
|
dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
|
||||||
|
echo "void glib_plugin_test(void) { }" > plugin.c
|
||||||
|
${SHELL} ./libtool --mode=compile ${CC} -shared \
|
||||||
|
-export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
|
||||||
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
|
AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
|
||||||
glib_cv_rtldglobal_broken,[
|
glib_cv_rtldglobal_broken,[
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
@@ -1071,19 +1074,20 @@ dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
|
|||||||
#ifndef RTLD_LAZY
|
#ifndef RTLD_LAZY
|
||||||
# define RTLD_LAZY 0
|
# define RTLD_LAZY 0
|
||||||
#endif
|
#endif
|
||||||
int pthread_create;
|
int glib_plugin_test;
|
||||||
int main () {
|
int main () {
|
||||||
void *handle, *global, *local;
|
void *handle, *global, *local;
|
||||||
global = &pthread_create;
|
global = &glib_plugin_test;
|
||||||
handle = dlopen ("libpthread.so", RTLD_GLOBAL | RTLD_LAZY);
|
handle = dlopen ("./.libs/plugin.o", RTLD_GLOBAL | RTLD_LAZY);
|
||||||
if (!handle) return 0;
|
if (!handle) return 0;
|
||||||
local = dlsym (handle, "pthread_create");
|
local = dlsym (handle, "glib_plugin_test");
|
||||||
return global == local;
|
return global == local;
|
||||||
} ],
|
} ],
|
||||||
[glib_cv_rtldglobal_broken=no],
|
[glib_cv_rtldglobal_broken=no],
|
||||||
[glib_cv_rtldglobal_broken=yes],
|
[glib_cv_rtldglobal_broken=yes],
|
||||||
[glib_cv_rtldglobal_broken=no])
|
[glib_cv_rtldglobal_broken=no])
|
||||||
rm -f plugin.c plugin.o plugin.lo
|
rm -f plugin.c plugin.o plugin.lo .libs/plugin.o
|
||||||
|
rmdir .libs 2>/dev/null
|
||||||
])
|
])
|
||||||
if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
|
if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
|
||||||
G_MODULE_BROKEN_RTLD_GLOBAL=1
|
G_MODULE_BROKEN_RTLD_GLOBAL=1
|
||||||
|
Reference in New Issue
Block a user