Dan Nicholson wrote:
> Alan, I just pushed a match that removes the EXTRA_CONFIG_LINES
> setting, but keeps the POSIX_SHELL checks for Solaris. I simulated it
> on Linux and it works correctly for me, but you may want to check. See
> here:
> 
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfb27b5fc020437d95b1185f0fce850209744d92

Works for me.

Attached are a couple more quick patches.   One follows your suggestion
of adding -lc in the mklib script instead of tacking it onto every library
line in the configure.ac.   Another adds support for -exports in mklib
on Solaris (almost identical to the Linux version of -exports, just using
the Solaris linker flag and mapfile naming convention).   The last just adds
Solaris to the OS'es that use mmap(...PROT_EXEC...) to get heap space with
executable permissions.   (Non-executable heap isn't the default on Solaris,
but it's an option, and we use that option when building the X packages that
go into Solaris.)

-- 
        -Alan Coopersmith-           [EMAIL PROTECTED]
         Sun Microsystems, Inc. - X Window System Engineering

>From 69e492a50f64d5fd4adb483af399164883efc3cd Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <[EMAIL PROTECTED]>
Date: Wed, 16 Jul 2008 12:56:29 -0700
Subject: [PATCH] Move Solaris -lc linking flag for shared objects from 
configure.ac to mklib
---
 bin/mklib    |    5 +++++
 configure.ac |   23 ++++++-----------------
 2 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/bin/mklib b/bin/mklib
index 69e8242..698e241 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -378,6 +378,11 @@ #      rm -f exptmp
             if [ "${ALTOPTS}" ] ; then
                 OPTS=${ALTOPTS}
             fi
+
+           # Solaris linker requires explicitly listing the Standard C & C++
+           # libraries in the link path when building shared objects
+           DEPS="${DEPS} -lc"
+
            # for debug:
            #echo "mklib: linker is" ${LINK} ${OPTS}
            if [ $NOPREFIX = 1 ] ; then
diff --git a/configure.ac b/configure.ac
index acb29e4..fe93b06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,17 +345,6 @@ if test "x$enable_selinux" = "xyes"; the
     DEFINES="$DEFINES -DMESA_SELINUX"
 fi
 
-dnl OS-specific libraries
-OS_LIBS=""
-case "$host_os" in
-solaris*)
-    OS_LIBS="-lc"
-    if test "x$GXX" != xyes; then
-        OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
-    fi
-    ;;
-esac
-
 dnl
 dnl Driver configuration. Options are xlib, dri and osmesa right now.
 dnl More later: directfb, fbdev, ...
@@ -514,7 +503,7 @@ xlib)
         X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
         GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
     fi
-    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
+    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
 
     # if static, move the external libraries to the programs
     # and empty the libraries for libGL
@@ -558,11 +547,11 @@ dri)
     fi
 
     # need DRM libs, -lpthread, etc.
-    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
+    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
     ;;
 osmesa)
     # No libGL for osmesa
-    GL_LIB_DEPS="$OS_LIBS"
+    GL_LIB_DEPS=""
     ;;
 esac
 AC_SUBST([GL_LIB_DEPS])
@@ -814,7 +803,7 @@ osmesa)
     ;;
 esac
 if test "$enable_static" = no; then
-    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
+    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
 fi
 AC_SUBST([OSMESA_LIB_DEPS])
 AC_SUBST([OSMESA_MESA_DEPS])
@@ -891,7 +880,7 @@ if test "x$enable_glw" = xyes; then
     # If static, empty GLW_LIB_DEPS and add libs for programs to link
     if test "$enable_static" = no; then
         GLW_MESA_DEPS='-l$(GL_LIB)'
-        GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
+        GLW_LIB_DEPS="$GLW_LIB_DEPS"
     else
         APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
         GLW_LIB_DEPS=""
@@ -939,7 +928,7 @@ if test "x$enable_glut" = xyes; then
         # should check these...
         GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
     fi
-    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
+    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
 
     # If glut is available, we can build most programs
     if test "$with_demos" = yes; then
-- 
1.4.1

>From 4f1c222b8cc402d351b09cd9a8865dd6e4e8128b Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <[EMAIL PROTECTED]>
Date: Wed, 16 Jul 2008 13:16:19 -0700
Subject: [PATCH] Convert mklib -exports list into a linker mapfile on Solaris
---
 bin/mklib |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/bin/mklib b/bin/mklib
index 698e241..27eec9d 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -383,6 +383,17 @@ #      rm -f exptmp
            # libraries in the link path when building shared objects
            DEPS="${DEPS} -lc"
 
+           if [ $EXPORTS ] ; then
+               # Make the 'mapfile.scope' linker mapfile
+               echo "{" > mapfile.scope
+               echo "global:" >> mapfile.scope
+               sed 's/$/;/' ${EXPORTS} >> mapfile.scope
+               echo "local:" >> mapfile.scope
+               echo "    *;" >> mapfile.scope
+               echo "};" >> mapfile.scope
+               OPTS="${OPTS} -M mapfile.scope"
+           fi
+
            # for debug:
            #echo "mklib: linker is" ${LINK} ${OPTS}
            if [ $NOPREFIX = 1 ] ; then
-- 
1.4.1

>From af3016a8793c28b8d587a6384e280c89e0319072 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <[EMAIL PROTECTED]>
Date: Wed, 16 Jul 2008 12:47:27 -0700
Subject: [PATCH] Add Solaris to OS'es using PROT_EXEC mmap() to get executable 
heap space
---
 src/mesa/main/execmem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index f95c318..b71846c 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -36,7 +36,7 @@ #include "glapi/glthread.h"
 
 
 
-#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__)
+#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || 
defined(__sun)
 
 /*
  * Allocate a large block of memory which can hold code then dole it out
-- 
1.4.1

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to