summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2008-04-18 17:45:53 +0300
committerGeorge Sapountzis <gsap7@yahoo.gr>2008-04-23 18:11:55 +0300
commitefb723e166e5fa89e90c7b400fb4c7979b1f50c0 (patch)
treef95f98c9118a30ff6f5ed94b637148ea9ddb3fb7
parentfbad87f2ae9f97fcb43546b0fa35f1100415dfec (diff)
glcore: prepare for dynamic loading
glcore gets linked with -ldl, -lpthread for s3tc and glapi xserver needs DLOPEN_LIBS - to dlopen the glcore dso LD_EXPORT_SYMBOLS_FLAG - to export symbols for glcore to use the ld flag is added to kdrive only when GLX is enabled, the net overhead for Xephyr is ~155KB, could be reduced with --dynamic-list.
-rw-r--r--configure.ac3
-rw-r--r--hw/kdrive/ati/Makefile.am4
-rw-r--r--hw/kdrive/chips/Makefile.am4
-rw-r--r--hw/kdrive/ephyr/Makefile.am4
-rw-r--r--hw/kdrive/epson/Makefile.am4
-rw-r--r--hw/kdrive/fake/Makefile.am4
-rw-r--r--hw/kdrive/fbdev/Makefile.am4
-rw-r--r--hw/kdrive/i810/Makefile.am4
-rw-r--r--hw/kdrive/mach64/Makefile.am4
-rw-r--r--hw/kdrive/mga/Makefile.am4
-rw-r--r--hw/kdrive/neomagic/Makefile.am4
-rw-r--r--hw/kdrive/nvidia/Makefile.am4
-rw-r--r--hw/kdrive/pm2/Makefile.am4
-rw-r--r--hw/kdrive/r128/Makefile.am4
-rw-r--r--hw/kdrive/sdl/Makefile.am4
-rw-r--r--hw/kdrive/sis300/Makefile.am4
-rw-r--r--hw/kdrive/smi/Makefile.am4
-rw-r--r--hw/kdrive/vesa/Makefile.am4
-rw-r--r--hw/kdrive/via/Makefile.am4
19 files changed, 74 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 995a652a4..5da56b575 100644
--- a/configure.ac
+++ b/configure.ac
@@ -848,6 +848,7 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
if test $? -ne 0; then
AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.])
fi
+ GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
else
GLX=no
fi
@@ -1969,7 +1970,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
- KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
+ KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am
index 8429250f3..31462bb04 100644
--- a/hw/kdrive/ati/Makefile.am
+++ b/hw/kdrive/ati/Makefile.am
@@ -58,6 +58,10 @@ ATI_LIBS = \
$(DRI_LIBS) \
@KDRIVE_LIBS@
+if GLX
+Xati_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xati_LDADD = \
$(ATI_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am
index 51b0edf31..46e176051 100644
--- a/hw/kdrive/chips/Makefile.am
+++ b/hw/kdrive/chips/Makefile.am
@@ -20,6 +20,10 @@ CHIPS_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xchips_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xchips_LDADD = \
$(CHIPS_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 81d3d69ea..7ef22a304 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -67,6 +67,10 @@ libxephyr_a_CFLAGS = \
Xephyr_SOURCES = \
ephyrinit.c
+if GLX
+Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xephyr_LDADD = \
libxephyr.a \
libxephyr-hostx.a \
diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am
index 2a440149d..14bb04996 100644
--- a/hw/kdrive/epson/Makefile.am
+++ b/hw/kdrive/epson/Makefile.am
@@ -20,6 +20,10 @@ EPSON_LIBS = \
libepson.a \
@KDRIVE_LIBS@
+if GLX
+Xepson_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xepson_LDADD = \
$(EPSON_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am
index 09d179eb0..0f8865699 100644
--- a/hw/kdrive/fake/Makefile.am
+++ b/hw/kdrive/fake/Makefile.am
@@ -16,6 +16,10 @@ libfake_a_SOURCES = \
Xfake_SOURCES = \
fakeinit.c
+if GLX
+Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xfake_LDADD = \
libfake.a \
@KDRIVE_LIBS@ \
diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am
index 420855b8d..c77f146ee 100644
--- a/hw/kdrive/fbdev/Makefile.am
+++ b/hw/kdrive/fbdev/Makefile.am
@@ -14,6 +14,10 @@ bin_PROGRAMS = Xfbdev
Xfbdev_SOURCES = \
fbinit.c
+if GLX
+Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xfbdev_LDADD = \
libfbdev.a \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am
index ea02cb67d..30919fad9 100644
--- a/hw/kdrive/i810/Makefile.am
+++ b/hw/kdrive/i810/Makefile.am
@@ -23,6 +23,10 @@ I810_LIBS = \
libi810.a \
@KDRIVE_LIBS@
+if GLX
+Xi810_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xi810_LDADD = \
$(I810_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am
index 746ffff8f..6ca376ab2 100644
--- a/hw/kdrive/mach64/Makefile.am
+++ b/hw/kdrive/mach64/Makefile.am
@@ -27,6 +27,10 @@ MACH64_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a
+if GLX
+Xmach64_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xmach64_LDADD = \
$(MACH64_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am
index 37bc50cf2..a7dd2cbf6 100644
--- a/hw/kdrive/mga/Makefile.am
+++ b/hw/kdrive/mga/Makefile.am
@@ -22,6 +22,10 @@ MGA_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xmga_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xmga_LDADD = \
$(MGA_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am
index 95f0e1eaa..b449c37c5 100644
--- a/hw/kdrive/neomagic/Makefile.am
+++ b/hw/kdrive/neomagic/Makefile.am
@@ -32,6 +32,10 @@ NEOMAGIC_LIBS = \
${VESA_LIBS} \
@KDRIVE_LIBS@
+if GLX
+Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xneomagic_LDADD = \
$(NEOMAGIC_LIBS) \
@KDRIVE_LIBS@ \
diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am
index b380e44ee..81736c311 100644
--- a/hw/kdrive/nvidia/Makefile.am
+++ b/hw/kdrive/nvidia/Makefile.am
@@ -23,6 +23,10 @@ NVIDIA_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xnvidia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xnvidia_LDADD = \
$(NVIDIA_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am
index 208d0319e..cb28de6cb 100644
--- a/hw/kdrive/pm2/Makefile.am
+++ b/hw/kdrive/pm2/Makefile.am
@@ -21,6 +21,10 @@ PM2_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xpm2_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xpm2_LDADD = \
$(PM2_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am
index 62c1fcfa3..344fbebf7 100644
--- a/hw/kdrive/r128/Makefile.am
+++ b/hw/kdrive/r128/Makefile.am
@@ -20,6 +20,10 @@ R128_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xr128_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xr128_LDADD = \
$(R128_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am
index fe9309e46..a70d147de 100644
--- a/hw/kdrive/sdl/Makefile.am
+++ b/hw/kdrive/sdl/Makefile.am
@@ -7,6 +7,10 @@ bin_PROGRAMS = Xsdl
Xsdl_SOURCES = sdl.c
+if GLX
+Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xsdl_LDADD = \
@KDRIVE_LIBS@ \
@XSDL_LIBS@
diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am
index 3e8ce90b7..af2500aee 100644
--- a/hw/kdrive/sis300/Makefile.am
+++ b/hw/kdrive/sis300/Makefile.am
@@ -34,6 +34,10 @@ SIS_LIBS = \
$(VESA_LIBS) \
@KDRIVE_LIBS@
+if GLX
+Xsis_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xsis_LDADD = \
$(SIS_LIBS) \
@KDRIVE_LIBS@ \
diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am
index a4d6624c5..bd7077c56 100644
--- a/hw/kdrive/smi/Makefile.am
+++ b/hw/kdrive/smi/Makefile.am
@@ -25,6 +25,10 @@ SMI_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
+if GLX
+Xsmi_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xsmi_LDADD = \
$(SMI_LIBS) \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/vesa/Makefile.am b/hw/kdrive/vesa/Makefile.am
index ac50d2bf5..ec35c1e2b 100644
--- a/hw/kdrive/vesa/Makefile.am
+++ b/hw/kdrive/vesa/Makefile.am
@@ -19,6 +19,10 @@ libvesa_a_SOURCES = \
Xvesa_SOURCES = \
vesainit.c
+if GLX
+Xvesa_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xvesa_LDADD = \
libvesa.a \
@KDRIVE_LIBS@
diff --git a/hw/kdrive/via/Makefile.am b/hw/kdrive/via/Makefile.am
index 249b3f31e..c659379f0 100644
--- a/hw/kdrive/via/Makefile.am
+++ b/hw/kdrive/via/Makefile.am
@@ -21,6 +21,10 @@ VIA_LIBS = \
libvia.a \
$(top_builddir)/hw/kdrive/vesa/libvesa.a
+if GLX
+Xvia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+endif
+
Xvia_LDADD = \
$(VIA_LIBS) \
@KDRIVE_LIBS@