Module: Mesa
Branch: master
Commit: 9a939adf7d25f273048d5f92cf9d96d10e664c23
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a939adf7d25f273048d5f92cf9d96d10e664c23

Author: Chia-I Wu <[email protected]>
Date:   Thu Feb 18 12:38:47 2010 +0800

winsys/drm: Do not use --whole-archive in Makefile.egl.

--whole-archive is not portable.  Have the drivers reference _eglMain as
a poor man's --whole-archive.

---

 src/gallium/winsys/drm/Makefile.egl        |    3 +--
 src/gallium/winsys/drm/i965/egl/dummy.c    |    4 +++-
 src/gallium/winsys/drm/intel/egl/dummy.c   |    4 +++-
 src/gallium/winsys/drm/nouveau/egl/dummy.c |    4 +++-
 src/gallium/winsys/drm/radeon/egl/dummy.c  |    4 +++-
 src/gallium/winsys/drm/swrast/egl/dummy.c  |    4 +++-
 src/gallium/winsys/drm/vmware/egl/dummy.c  |    4 +++-
 7 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/gallium/winsys/drm/Makefile.egl 
b/src/gallium/winsys/drm/Makefile.egl
index b1f2038..8363de6 100644
--- a/src/gallium/winsys/drm/Makefile.egl
+++ b/src/gallium/winsys/drm/Makefile.egl
@@ -38,8 +38,7 @@ $(EGL_DISPLAY_LIBS): $(TOP)/$(LIB_DIR)/%.so: %.so
 
 define mklib-egl
 $(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-       $(MKLIB_OPTIONS) $(EGL_DRIVER_OBJECTS) \
-       -Wl,--whole-archive $($(1)_ST) -Wl,--no-whole-archive \
+       $(MKLIB_OPTIONS) $(EGL_DRIVER_OBJECTS) $($(1)_ST) \
        $(EGL_DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $($(1)_LIBS) 
$(EGL_DRIVER_LIBS)
 endef
 
diff --git a/src/gallium/winsys/drm/i965/egl/dummy.c 
b/src/gallium/winsys/drm/i965/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/i965/egl/dummy.c
+++ b/src/gallium/winsys/drm/i965/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/winsys/drm/intel/egl/dummy.c 
b/src/gallium/winsys/drm/intel/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/intel/egl/dummy.c
+++ b/src/gallium/winsys/drm/intel/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/winsys/drm/nouveau/egl/dummy.c 
b/src/gallium/winsys/drm/nouveau/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/nouveau/egl/dummy.c
+++ b/src/gallium/winsys/drm/nouveau/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/winsys/drm/radeon/egl/dummy.c 
b/src/gallium/winsys/drm/radeon/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/radeon/egl/dummy.c
+++ b/src/gallium/winsys/drm/radeon/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/winsys/drm/swrast/egl/dummy.c 
b/src/gallium/winsys/drm/swrast/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/swrast/egl/dummy.c
+++ b/src/gallium/winsys/drm/swrast/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;
diff --git a/src/gallium/winsys/drm/vmware/egl/dummy.c 
b/src/gallium/winsys/drm/vmware/egl/dummy.c
index 4a1bc28..3181d0b 100644
--- a/src/gallium/winsys/drm/vmware/egl/dummy.c
+++ b/src/gallium/winsys/drm/vmware/egl/dummy.c
@@ -1 +1,3 @@
-/* mklib expects at least one object file */
+/* A poor man's --whole-archive for EGL drivers */
+void *_eglMain(void *);
+void *_eglWholeArchive = (void *) _eglMain;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to