diff -uN Mesa-7.11.2/src/gallium/include/pipe/p_config.h.ORG Mesa-7.11.2/src/gallium/include/pipe/p_config.h
--- Mesa-7.11.2/src/gallium/include/pipe/p_config.h.ORG	2011-10-15 09:43:58.000000000 +0900
+++ Mesa-7.11.2/src/gallium/include/pipe/p_config.h	2016-02-26 17:51:14.778789000 +0900
@@ -139,6 +139,11 @@
 
 #endif
 
+#if defined(__sparc)
+#define PIPE_ARCH_SPARC
+#define PIPE_ARCH_BIG_ENDIAN
+#endif
+
 #if !defined(PIPE_ARCH_LITTLE_ENDIAN) && !defined(PIPE_ARCH_BIG_ENDIAN)
 #error Unknown Endianness
 #endif
diff -uN Mesa-7.11.2/src/glut/glx/glutint.h.ORG Mesa-7.11.2/src/glut/glx/glutint.h
--- Mesa-7.11.2/src/glut/glx/glutint.h.ORG	2011-10-15 09:43:58.000000000 +0900
+++ Mesa-7.11.2/src/glut/glx/glutint.h	2016-02-26 17:51:14.784415000 +0900
@@ -92,7 +92,7 @@
 #define IS_AT_OR_AFTER(t1, t2) ((t2).val >= (t1).val)
 
 #else
-#if defined(SVR4) && !defined(sun)  /* Sun claims SVR4, but
+#if defined(SVR4) && !defined(__sun)  /* Sun claims SVR4, but
                                        wants 2 args. */
 #define GETTIMEOFDAY(_x) gettimeofday(_x)
 #else
diff -uN Mesa-7.11.2/src/glu/sgi/Makefile.ORG Mesa-7.11.2/src/glu/sgi/Makefile
--- Mesa-7.11.2/src/glu/sgi/Makefile.ORG	2010-12-15 06:43:14.000000000 +0900
+++ Mesa-7.11.2/src/glu/sgi/Makefile	2016-02-26 22:08:47.017921000 +0900
@@ -136,10 +136,11 @@
 
 # Make the library:
 $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
+	grep -v mglu glu.exports > glu.exports.sun
 	$(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
 		-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
 		-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
-		-exports glu.exports -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
+		-exports glu.exports.sun -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
 		$(GLU_LIB_DEPS) $(OBJECTS)
 
 
diff -uN Mesa-7.11.2/src/mesa/drivers/x11/Makefile.ORG Mesa-7.11.2/src/mesa/drivers/x11/Makefile
--- Mesa-7.11.2/src/mesa/drivers/x11/Makefile.ORG	2011-10-15 09:43:58.000000000 +0900
+++ Mesa-7.11.2/src/mesa/drivers/x11/Makefile	2016-03-04 17:48:16.978597000 +0900
@@ -45,7 +45,7 @@
 	-I$(TOP)/src/mesa/main \
 	$(X11_INCLUDES)
 
-CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a
+CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mapi/glapi/libglapi.a $(TOP)/src/glsl/libglsl.a
 
 ifeq ($(SHARED_GLAPI),1)
 GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
@@ -60,7 +60,7 @@
 
 
 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
-	@ $(MKLIB) -o $(GL_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
+	$(MKLIB) -o $(GL_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
 		-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
 		-install $(TOP)/$(LIB_DIR) \
 		-cplusplus $(MKLIB_OPTIONS) \
diff -uN Mesa-7.11.2/bin/mklib.ORG Mesa-7.11.2/bin/mklib
--- Mesa-7.11.2/bin/mklib.ORG	2011-10-15 09:43:58.000000000 +0900
+++ Mesa-7.11.2/bin/mklib	2016-03-04 17:38:20.916845000 +0900
@@ -514,10 +514,12 @@
 	    #echo "mklib: linker is" ${LINK} ${OPTS}
 	    if [ $NOPREFIX = 1 ] ; then
 		rm -f ${LIBNAME}
+		echo "${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}"
 		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
 		FINAL_LIBS="${LIBNAME}"
 	    else
 		rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
+		echo "${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}"
 		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
 		ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
 		FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
@@ -545,6 +547,7 @@
                 OPTS=${ALTOPTS}
             fi
 	    rm -f ${LIBNAME}
+	    echo "${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}"
 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
 	    FINAL_LIBS=${LIBNAME}
         elif [ $STATIC = 1 ] ; then
@@ -568,6 +571,7 @@
             fi
 	    echo "mklib: Making FreeBSD shared library: " ${SHLIB}
 	    rm -f ${SHLIB}
+	    echo "${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}"
 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
 	    ln -sf ${SHLIB} "lib${LIBNAME}.so"
 	    FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
