open-src/lib/mesa/mklib-libc.patch
changeset 606 068c11b419c9
parent 493 f43507b5737d
equal deleted inserted replaced
605:e5259db5befc 606:068c11b419c9
       
     1 From 3ff63b8a12e2d266b59a22e380cb4f40c00cc895 Mon Sep 17 00:00:00 2001
       
     2 From: Alan Coopersmith <[email protected]>
       
     3 Date: Wed, 16 Jul 2008 12:56:29 -0700
       
     4 Subject: [PATCH] Move Solaris -lc linking flag for shared objects from configure.ac to mklib
       
     5 ---
       
     6  bin/mklib    |    5 +++++
       
     7  configure.ac |   23 ++++++-----------------
       
     8  2 files changed, 11 insertions(+), 17 deletions(-)
       
     9 
       
    10 diff --git a/bin/mklib b/bin/mklib
       
    11 index a25d5bf..aaae3a8 100755
       
    12 --- a/bin/mklib
       
    13 +++ b/bin/mklib
       
    14 @@ -384,6 +384,11 @@ #	    rm -f exptmp
       
    15              if [ "${ALTOPTS}" ] ; then
       
    16                  OPTS=${ALTOPTS}
       
    17              fi
       
    18 +
       
    19 +	    # Solaris linker requires explicitly listing the Standard C & C++
       
    20 +	    # libraries in the link path when building shared objects
       
    21 +	    DEPS="${DEPS} -lc"
       
    22 +
       
    23  	    # for debug:
       
    24  	    #echo "mklib: linker is" ${LINK} ${OPTS}
       
    25  	    if [ $NOPREFIX = 1 ] ; then
       
    26 diff --git a/configure.ac b/configure.ac
       
    27 index 463821b..5d89bfa 100644
       
    28 --- a/configure.ac
       
    29 +++ b/configure.ac
       
    30 @@ -345,17 +345,6 @@ if test "x$enable_selinux" = "xyes"; the
       
    31      DEFINES="$DEFINES -DMESA_SELINUX"
       
    32  fi
       
    33  
       
    34 -dnl OS-specific libraries
       
    35 -OS_LIBS=""
       
    36 -case "$host_os" in
       
    37 -solaris*)
       
    38 -    OS_LIBS="-lc"
       
    39 -    if test "x$GXX" != xyes; then
       
    40 -        OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
       
    41 -    fi
       
    42 -    ;;
       
    43 -esac
       
    44 -
       
    45  dnl
       
    46  dnl Driver configuration. Options are xlib, dri and osmesa right now.
       
    47  dnl More later: directfb, fbdev, ...
       
    48 @@ -514,7 +503,7 @@ xlib)
       
    49          X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
       
    50          GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
       
    51      fi
       
    52 -    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
       
    53 +    GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
       
    54  
       
    55      # if static, move the external libraries to the programs
       
    56      # and empty the libraries for libGL
       
    57 @@ -558,11 +547,11 @@ dri)
       
    58      fi
       
    59  
       
    60      # need DRM libs, -lpthread, etc.
       
    61 -    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
       
    62 +    GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
       
    63      ;;
       
    64  osmesa)
       
    65      # No libGL for osmesa
       
    66 -    GL_LIB_DEPS="$OS_LIBS"
       
    67 +    GL_LIB_DEPS=""
       
    68      ;;
       
    69  esac
       
    70  AC_SUBST([GL_LIB_DEPS])
       
    71 @@ -799,7 +788,7 @@ osmesa)
       
    72      ;;
       
    73  esac
       
    74  if test "$enable_static" = no; then
       
    75 -    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
       
    76 +    OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
       
    77  fi
       
    78  AC_SUBST([OSMESA_LIB_DEPS])
       
    79  AC_SUBST([OSMESA_MESA_DEPS])
       
    80 @@ -900,7 +889,7 @@ if test "x$enable_glw" = xyes; then
       
    81      # If static, empty GLW_LIB_DEPS and add libs for programs to link
       
    82      if test "$enable_static" = no; then
       
    83          GLW_MESA_DEPS='-l$(GL_LIB)'
       
    84 -        GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
       
    85 +        GLW_LIB_DEPS="$GLW_LIB_DEPS"
       
    86      else
       
    87          APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
       
    88          GLW_LIB_DEPS=""
       
    89 @@ -950,7 +939,7 @@ if test "x$enable_glut" = xyes; then
       
    90          # should check these...
       
    91          GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
       
    92      fi
       
    93 -    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
       
    94 +    GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
       
    95  
       
    96      # If glut is available, we can build most programs
       
    97      if test "$with_demos" = yes; then
       
    98 -- 
       
    99 1.4.1
       
   100