mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Revert "Mesa: update to Mesa-9.0"
This reverts commit b6b287e7783147fbd43a0c27420fb9173c81b0c0.
This commit is contained in:
parent
1895fb1bd8
commit
3c9f5a3185
@ -26,7 +26,7 @@ get_graphicdrivers
|
||||
|
||||
if [ "$LLVM_SUPPORT" = "yes" ]; then
|
||||
export LLVM_CONFIG="$SYSROOT_PREFIX/usr/bin/llvm-config"
|
||||
MESA_GALLIUM_LLVM="--enable-gallium-llvm --with-llvm-shared-libs"
|
||||
MESA_GALLIUM_LLVM="--enable-gallium-llvm"
|
||||
else
|
||||
MESA_GALLIUM_LLVM="--disable-gallium-llvm"
|
||||
fi
|
||||
@ -43,17 +43,20 @@ else
|
||||
MESA_VAAPI="--disable-va"
|
||||
fi
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
HOST_CC="$HOST_CC" \
|
||||
HOST_OPT_FLAGS="$HOST_CFLAGS" \
|
||||
X11_INCLUDES= \
|
||||
DRI_DRIVER_INSTALL_DIR="$XORG_PATH_DRI" \
|
||||
DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \
|
||||
|
||||
XA_CONFIG="--disable-xa"
|
||||
for drv in $GRAPHIC_DRIVERS; do
|
||||
[ "$drv" = "vmware" ] && \
|
||||
XA_CONFIG="--enable-xa"
|
||||
done
|
||||
|
||||
cd $PKG_BUILD
|
||||
CC_FOR_BUILD=$HOST_CC \
|
||||
CXX_FOR_BUILD=$HOST_CXX \
|
||||
CFLAGS_FOR_BUILD="-I`pwd`/include" \
|
||||
CXXFLAGS_FOR_BUILD="-I`pwd`/include" \
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
@ -90,7 +93,19 @@ CXXFLAGS_FOR_BUILD="-I`pwd`/include" \
|
||||
--with-gallium-drivers="$GALLIUM_DRIVERS" \
|
||||
--with-dri-drivers="$DRI_DRIVERS" \
|
||||
--with-x \
|
||||
--disable-silent-rules
|
||||
|
||||
make CC="$HOST_CC" \
|
||||
CXX="$HOST_CXX" \
|
||||
CFLAGS="$HOST_CFLAGS" \
|
||||
CXXFLAGS="$HOST_CXXFLAGS" \
|
||||
LDFLAGS="$HOST_LDFLAGS" \
|
||||
-C src/glsl builtin_compiler
|
||||
|
||||
cp src/glsl/builtin_compiler $ROOT/$TOOLCHAIN/bin
|
||||
make -C src/glsl clean
|
||||
|
||||
sed -e "s#\.\/builtin_compiler#$ROOT/$TOOLCHAIN/bin/builtin_compiler#g" -i src/glsl/Makefile
|
||||
|
||||
make
|
||||
$MAKEINSTALL
|
||||
|
||||
$MAKEINSTALL
|
||||
|
@ -23,12 +23,25 @@
|
||||
. config/options $1
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/src/glx/.libs/libGL.so.1.2.0 $INSTALL/usr/lib/libGL_mesa.so.1 # rename for cooperate with nvidia drivers
|
||||
cp -P $PKG_BUILD/lib/libGL.so.1.2 $INSTALL/usr/lib/libGL_mesa.so.1 # rename for cooperate with nvidia drivers
|
||||
ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so
|
||||
ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1
|
||||
cp -P $PKG_BUILD/src/mesa/libdricore/.libs/libdricore*.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/src/mapi/shared-glapi/.libs/libglapi.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/lib/libGLU.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/lib/libglapi.so* $INSTALL/usr/lib
|
||||
if [ -f $PKG_BUILD/lib/gallium/libxatracker.so ] ; then
|
||||
cp -P $PKG_BUILD/lib/gallium/libxatracker.so* $INSTALL/usr/lib || true
|
||||
fi
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/dri
|
||||
cp -P $PKG_BUILD/src/mesa/drivers/dri/*/.libs/*_dri.so $INSTALL/usr/lib/dri || true
|
||||
cp -P $PKG_BUILD/src/gallium/targets/*/*_dri.so $INSTALL/usr/lib/dri || true
|
||||
cp -P $PKG_BUILD/lib/libdricore.so $INSTALL/usr/lib/dri
|
||||
cp -P $PKG_BUILD/lib/libglsl.so $INSTALL/usr/lib/dri
|
||||
cp -P $PKG_BUILD/lib/*_dri.so $INSTALL/usr/lib/dri || true
|
||||
cp -P $PKG_BUILD/lib/gallium/*_dri.so $INSTALL/usr/lib/dri || true
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/xorg/modules/drivers
|
||||
cp -P $PKG_BUILD/lib/gallium/*_drv.so $INSTALL/usr/lib/xorg/modules/drivers || true
|
||||
|
||||
if [ "$MESA_VDPAU_SUPPORT" = "yes" ]; then
|
||||
mkdir -p $INSTALL/usr/lib/vdpau
|
||||
cp -P $PKG_BUILD/lib/gallium/libvdpau_*.so* $INSTALL/usr/lib/vdpau
|
||||
fi
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Mesa"
|
||||
PKG_VERSION="9.0"
|
||||
PKG_VERSION="8.0.5"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
@ -0,0 +1,50 @@
|
||||
diff --git a/bin/mklib b/bin/mklib
|
||||
index 9bac29e..70982d6 100755
|
||||
--- a/bin/mklib
|
||||
+++ b/bin/mklib
|
||||
@@ -49,8 +49,8 @@ expand_archives() {
|
||||
/*) ;;
|
||||
*) FILE="$ORIG_DIR/$FILE" ;;
|
||||
esac
|
||||
- MEMBERS=`ar t $FILE`
|
||||
- ar x $FILE
|
||||
+ MEMBERS=`$AR t $FILE`
|
||||
+ $AR x $FILE
|
||||
for MEMBER in $MEMBERS ; do
|
||||
NEWFILES="$NEWFILES $DIR/$MEMBER"
|
||||
done
|
||||
@@ -77,7 +77,7 @@ expand_archives() {
|
||||
make_ar_static_lib() {
|
||||
OPTS=$1
|
||||
shift;
|
||||
- RANLIB=$1
|
||||
+ _RANLIB=$1
|
||||
shift;
|
||||
LIBNAME=$1
|
||||
shift;
|
||||
@@ -87,11 +87,11 @@ make_ar_static_lib() {
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# make static lib
|
||||
- ar ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
+ $AR ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
|
||||
# run ranlib
|
||||
- if [ ${RANLIB} = 1 ] ; then
|
||||
- ranlib ${LIBNAME}
|
||||
+ if [ ${_RANLIB} = 1 ] ; then
|
||||
+ $RANLIB ${LIBNAME}
|
||||
fi
|
||||
|
||||
echo ${LIBNAME}
|
||||
@@ -313,9 +313,9 @@ case $ARCH in
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
# -linker was not specified so set default link command now
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
- LINK=g++
|
||||
+ LINK=$CXX
|
||||
else
|
||||
- LINK=gcc
|
||||
+ LINK=$CC
|
||||
fi
|
||||
fi
|
24
packages/graphics/Mesa/patches/Mesa-8.0.5-9b3ac17.patch
Normal file
24
packages/graphics/Mesa/patches/Mesa-8.0.5-9b3ac17.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Naur Mesa-8.0.4-old/src/mesa/drivers/dri/intel/intel_screen.c Mesa-8.0.4-new/src/mesa/drivers/dri/intel/intel_screen.c
|
||||
--- Mesa-8.0.4-old/src/mesa/drivers/dri/intel/intel_screen.c 2012-03-22 10:10:16.000000000 -0700
|
||||
+++ Mesa-8.0.4-new/src/mesa/drivers/dri/intel/intel_screen.c 2012-07-16 12:27:37.000000000 -0700
|
||||
@@ -118,13 +118,15 @@
|
||||
if (intel == NULL)
|
||||
return;
|
||||
|
||||
- if (intel->gen < 4)
|
||||
- INTEL_FIREVERTICES(intel);
|
||||
+ if (intel != NULL) {
|
||||
+ if (intel->gen < 4)
|
||||
+ INTEL_FIREVERTICES(intel);
|
||||
|
||||
- intel->need_throttle = true;
|
||||
+ intel->need_throttle = true;
|
||||
|
||||
- if (intel->batch.used)
|
||||
- intel_batchbuffer_flush(intel);
|
||||
+ if (intel->batch.used)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
}
|
||||
|
||||
static const struct __DRI2flushExtensionRec intelFlushExtension = {
|
12
packages/graphics/Mesa/patches/Mesa-8.0.5-llvm_so.patch
Normal file
12
packages/graphics/Mesa/patches/Mesa-8.0.5-llvm_so.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8/configure.ac mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8.patch/configure.ac
|
||||
--- mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8/configure.ac 2012-01-08 05:01:59.000000000 +0100
|
||||
+++ mesa-a56a732c6991f47d63f5ccbb27a45467541c43f8.patch/configure.ac 2012-01-08 15:21:49.167895590 +0100
|
||||
@@ -1771,7 +1771,7 @@
|
||||
if test "x$LLVM_CONFIG" != xno; then
|
||||
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
|
||||
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'`
|
||||
- LLVM_LIBS="`$LLVM_CONFIG --libs`"
|
||||
+ LLVM_LIBS="-lLLVM-$LLVM_VERSION"
|
||||
|
||||
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
|
@ -1,556 +0,0 @@
|
||||
diff -Naur Mesa-9.0/configure.ac Mesa-9.0.patch/configure.ac
|
||||
--- Mesa-9.0/configure.ac 2012-10-08 20:35:26.000000000 +0200
|
||||
+++ Mesa-9.0.patch/configure.ac 2012-10-29 21:38:41.096329451 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
-AC_CANONICAL_HOST
|
||||
+AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
|
||||
dnl http://people.gnome.org/~walters/docs/build-api.txt
|
||||
@@ -24,9 +24,6 @@
|
||||
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
|
||||
-LT_PREREQ([2.2])
|
||||
-LT_INIT([disable-static])
|
||||
-
|
||||
dnl Set internal versions
|
||||
OSMESA_VERSION=8
|
||||
AC_SUBST([OSMESA_VERSION])
|
||||
@@ -45,7 +42,9 @@
|
||||
dnl Check for progs
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
+AX_PROG_CC_FOR_BUILD
|
||||
AC_PROG_CXX
|
||||
+AX_PROG_CXX_FOR_BUILD
|
||||
AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
@@ -54,6 +53,9 @@
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PATH_PROG([MKDEP], [makedepend])
|
||||
|
||||
+LT_PREREQ([2.2])
|
||||
+LT_INIT([disable-static])
|
||||
+
|
||||
if test "x$MKDEP" = "x"; then
|
||||
AC_MSG_ERROR([makedepend is required to build Mesa])
|
||||
fi
|
||||
@@ -155,6 +157,21 @@
|
||||
_SAVE_LDFLAGS="$LDFLAGS"
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
+dnl build host compiler macros
|
||||
+DEFINES_FOR_BUILD=""
|
||||
+AC_SUBST([DEFINES_FOR_BUILD])
|
||||
+case "$build_os" in
|
||||
+linux*|*-gnu*|gnu*)
|
||||
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -D_GNU_SOURCE"
|
||||
+ ;;
|
||||
+solaris*)
|
||||
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DSVR4"
|
||||
+ ;;
|
||||
+cygwin*)
|
||||
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD"
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
dnl Compiler macros
|
||||
DEFINES=""
|
||||
AC_SUBST([DEFINES])
|
||||
@@ -173,6 +190,7 @@
|
||||
dnl Add flags for gcc and g++
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -Wall -std=c99"
|
||||
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wall -std=c99"
|
||||
|
||||
# Enable -Werror=implicit-function-declaration and
|
||||
# -Werror=missing-prototypes, if available, or otherwise, just
|
||||
@@ -199,13 +217,16 @@
|
||||
CFLAGS=$save_CFLAGS
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-strict-aliasing"
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
# gcc's builtin memcmp is slower than glibc's
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
||||
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
|
||||
CFLAGS="$CFLAGS -fno-builtin-memcmp"
|
||||
fi
|
||||
if test "x$GXX" = xyes; then
|
||||
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
|
||||
CXXFLAGS="$CXXFLAGS -Wall"
|
||||
|
||||
# Enable -fvisibility=hidden if using a gcc that supports it
|
||||
@@ -222,10 +243,12 @@
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-strict-aliasing"
|
||||
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
|
||||
|
||||
# gcc's builtin memcmp is slower than glibc's
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
|
||||
+ CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-builtin-memcmp"
|
||||
CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
|
||||
fi
|
||||
|
||||
@@ -309,6 +332,14 @@
|
||||
[enable_debug=no]
|
||||
)
|
||||
if test "x$enable_debug" = xyes; then
|
||||
+ DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
|
||||
+ if test "x$GCC_FOR_BUILD" = xyes; then
|
||||
+ CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g"
|
||||
+ fi
|
||||
+ if test "x$GXX_FOR_BUILD" = xyes; then
|
||||
+ CXXFLAGS_FOR_BUILD="$XXCFLAGS_FOR_BUILD -g"
|
||||
+ fi
|
||||
+
|
||||
DEFINES="$DEFINES -DDEBUG"
|
||||
if test "x$GCC" = xyes; then
|
||||
CFLAGS="$CFLAGS -g"
|
||||
@@ -1962,6 +1993,7 @@
|
||||
src/gbm/Makefile
|
||||
src/gbm/main/gbm.pc
|
||||
src/glsl/Makefile
|
||||
+ src/glsl/builtin_compiler/Makefile
|
||||
src/glsl/glcpp/Makefile
|
||||
src/glsl/tests/Makefile
|
||||
src/glx/Makefile
|
||||
diff -Naur Mesa-9.0/m4/ax_prog_cc_for_build.m4 Mesa-9.0.patch/m4/ax_prog_cc_for_build.m4
|
||||
--- Mesa-9.0/m4/ax_prog_cc_for_build.m4 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ Mesa-9.0.patch/m4/ax_prog_cc_for_build.m4 2012-10-29 21:37:57.270456386 +0100
|
||||
@@ -0,0 +1,140 @@
|
||||
+# ===========================================================================
|
||||
+# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
|
||||
+# ===========================================================================
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_PROG_CC_FOR_BUILD
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# This macro searches for a C compiler that generates native executables,
|
||||
+# that is a C compiler that surely is not a cross-compiler. This can be
|
||||
+# useful if you have to generate source code at compile-time like for
|
||||
+# example GCC does.
|
||||
+#
|
||||
+# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
|
||||
+# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
|
||||
+# The value of these variables can be overridden by the user by specifying
|
||||
+# a compiler with an environment variable (like you do for standard CC).
|
||||
+#
|
||||
+# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
|
||||
+# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
|
||||
+# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
|
||||
+# substituted in the Makefile.
|
||||
+#
|
||||
+# LICENSE
|
||||
+#
|
||||
+# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
+#
|
||||
+# Copying and distribution of this file, with or without modification, are
|
||||
+# permitted in any medium without royalty provided the copyright notice
|
||||
+# and this notice are preserved. This file is offered as-is, without any
|
||||
+# warranty.
|
||||
+
|
||||
+#serial 5
|
||||
+
|
||||
+AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
|
||||
+AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
|
||||
+AC_REQUIRE([AC_PROG_CC])dnl
|
||||
+AC_REQUIRE([AC_PROG_CPP])dnl
|
||||
+AC_REQUIRE([AC_EXEEXT])dnl
|
||||
+AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
|
||||
+dnl
|
||||
+pushdef([AC_TRY_COMPILER], [
|
||||
+cat > conftest.$ac_ext << EOF
|
||||
+#line __oline__ "configure"
|
||||
+#include "confdefs.h"
|
||||
+[$1]
|
||||
+EOF
|
||||
+# If we can't run a trivial program, we are probably using a cross
|
||||
+compiler.
|
||||
+# Fail miserably.
|
||||
+if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest;
|
||||
+exit) 2>/dev/null; then
|
||||
+ [$2]=yes
|
||||
+else
|
||||
+ echo "configure: failed program was:" >&AC_FD_CC
|
||||
+ cat conftest.$ac_ext >&AC_FD_CC
|
||||
+ [$2]=no
|
||||
+fi
|
||||
+[$3]=no
|
||||
+rm -fr conftest*])dnl
|
||||
+
|
||||
+dnl Use the standard macros, but make them use other variable names
|
||||
+dnl
|
||||
+pushdef([cross_compiling], [#])dnl
|
||||
+pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
|
||||
+pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
|
||||
+pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
|
||||
+pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
|
||||
+pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
|
||||
+pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
|
||||
+pushdef([ac_cv_objext], ac_cv_build_objext)dnl
|
||||
+pushdef([ac_exeext], ac_build_exeext)dnl
|
||||
+pushdef([ac_objext], ac_build_objext)dnl
|
||||
+pushdef([CC], CC_FOR_BUILD)dnl
|
||||
+pushdef([CPP], CPP_FOR_BUILD)dnl
|
||||
+pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
|
||||
+pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
|
||||
+pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
|
||||
+pushdef([host], build)dnl
|
||||
+pushdef([host_alias], build_alias)dnl
|
||||
+pushdef([host_cpu], build_cpu)dnl
|
||||
+pushdef([host_vendor], build_vendor)dnl
|
||||
+pushdef([host_os], build_os)dnl
|
||||
+pushdef([ac_cv_host], ac_cv_build)dnl
|
||||
+pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
||||
+pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
||||
+pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
||||
+pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
||||
+pushdef([ac_cpp], ac_build_cpp)dnl
|
||||
+pushdef([ac_compile], ac_build_compile)dnl
|
||||
+pushdef([ac_link], ac_build_link)dnl
|
||||
+pushdef([ac_tool_prefix], [#])dnl
|
||||
+
|
||||
+AC_PROG_CC
|
||||
+AC_PROG_CPP
|
||||
+AC_EXEEXT
|
||||
+
|
||||
+dnl Restore the old definitions
|
||||
+dnl
|
||||
+popdef([AC_TRY_COMPILER])dnl
|
||||
+popdef([ac_tool_prefix])dnl
|
||||
+popdef([ac_link])dnl
|
||||
+popdef([ac_compile])dnl
|
||||
+popdef([ac_cpp])dnl
|
||||
+popdef([ac_cv_host_os])dnl
|
||||
+popdef([ac_cv_host_vendor])dnl
|
||||
+popdef([ac_cv_host_cpu])dnl
|
||||
+popdef([ac_cv_host_alias])dnl
|
||||
+popdef([ac_cv_host])dnl
|
||||
+popdef([host_os])dnl
|
||||
+popdef([host_vendor])dnl
|
||||
+popdef([host_cpu])dnl
|
||||
+popdef([host_alias])dnl
|
||||
+popdef([host])dnl
|
||||
+popdef([CPPFLAGS])dnl
|
||||
+popdef([CFLAGS])dnl
|
||||
+popdef([CPP])dnl
|
||||
+popdef([CC])dnl
|
||||
+popdef([ac_objext])dnl
|
||||
+popdef([ac_exeext])dnl
|
||||
+popdef([ac_cv_objext])dnl
|
||||
+popdef([ac_cv_exeext])dnl
|
||||
+popdef([ac_cv_prog_cc_g])dnl
|
||||
+popdef([ac_cv_prog_cc_works])dnl
|
||||
+popdef([ac_cv_prog_cc_cross])dnl
|
||||
+popdef([ac_cv_prog_gcc])dnl
|
||||
+popdef([cross_compiling])dnl
|
||||
+
|
||||
+dnl Finally, set Makefile variables
|
||||
+dnl
|
||||
+BUILD_EXEEXT=$ac_build_exeext
|
||||
+BUILD_OBJEXT=$ac_build_objext
|
||||
+AC_SUBST(BUILD_EXEEXT)dnl
|
||||
+AC_SUBST(BUILD_OBJEXT)dnl
|
||||
+AC_SUBST([CFLAGS_FOR_BUILD])dnl
|
||||
+AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
|
||||
+AC_SUBST([LDFLAGS_FOR_BUILD])dnl
|
||||
+])
|
||||
diff -Naur Mesa-9.0/m4/ax_prog_cxx_for_build.m4 Mesa-9.0.patch/m4/ax_prog_cxx_for_build.m4
|
||||
--- Mesa-9.0/m4/ax_prog_cxx_for_build.m4 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ Mesa-9.0.patch/m4/ax_prog_cxx_for_build.m4 2012-10-29 21:37:57.270456386 +0100
|
||||
@@ -0,0 +1,123 @@
|
||||
+# ===========================================================================
|
||||
+# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_for_build.html
|
||||
+# ===========================================================================
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_PROG_CXX_FOR_BUILD
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# This macro searches for a C++ compiler that generates native executables,
|
||||
+# that is a C++ compiler that surely is not a cross-compiler. This can be
|
||||
+# useful if you have to generate source code at compile-time like for
|
||||
+# example GCC does.
|
||||
+#
|
||||
+# The macro sets the CXX_FOR_BUILD and CXXCPP_FOR_BUILD macros to anything
|
||||
+# needed to compile or link (CXX_FOR_BUILD) and preprocess (CXXCPP_FOR_BUILD).
|
||||
+# The value of these variables can be overridden by the user by specifying
|
||||
+# a compiler with an environment variable (like you do for standard CXX).
|
||||
+#
|
||||
+# LICENSE
|
||||
+#
|
||||
+# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
||||
+# Copyright (c) 2012 Avionic Design GmbH
|
||||
+#
|
||||
+# Based on the AX_PROG_CC_FOR_BUILD macro by Paolo Bonzini.
|
||||
+#
|
||||
+# Copying and distribution of this file, with or without modification, are
|
||||
+# permitted in any medium without royalty provided the copyright notice
|
||||
+# and this notice are preserved. This file is offered as-is, without any
|
||||
+# warranty.
|
||||
+
|
||||
+#serial 5
|
||||
+
|
||||
+AU_ALIAS([AC_PROG_CXX_FOR_BUILD], [AX_PROG_CXX_FOR_BUILD])
|
||||
+AC_DEFUN([AX_PROG_CXX_FOR_BUILD], [dnl
|
||||
+AC_REQUIRE([AX_PROG_CC_FOR_BUILD])dnl
|
||||
+AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
|
||||
+AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
|
||||
+dnl
|
||||
+pushdef([AC_TRY_COMPILER], [
|
||||
+cat > conftest.$ac_ext << EOF
|
||||
+#line __oline__ "configure"
|
||||
+#include "confdefs.h"
|
||||
+[$1]
|
||||
+EOF
|
||||
+# If we can't run a trivial program, we are probably using a cross
|
||||
+compiler.
|
||||
+# Fail miserably.
|
||||
+if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest;
|
||||
+exit) 2>/dev/null; then
|
||||
+ [$2]=yes
|
||||
+else
|
||||
+ echo "configure: failed program was:" >&AC_FD_CC
|
||||
+ cat conftest.$ac_ext >&AC_FD_CC
|
||||
+ [$2]=no
|
||||
+fi
|
||||
+[$3]=no
|
||||
+rm -fr conftest*])dnl
|
||||
+
|
||||
+dnl Use the standard macros, but make them use other variable names
|
||||
+dnl
|
||||
+pushdef([cross_compiling], [#])dnl
|
||||
+pushdef([ac_cv_prog_CXXCPP], ac_cv_build_prog_CXXCPP)dnl
|
||||
+pushdef([ac_cv_prog_gxx], ac_cv_build_prog_gxx)dnl
|
||||
+pushdef([ac_cv_prog_cxx_works], ac_cv_build_prog_cxx_works)dnl
|
||||
+pushdef([ac_cv_prog_cxx_cross], ac_cv_build_prog_cxx_cross)dnl
|
||||
+pushdef([ac_cv_prog_cxx_g], ac_cv_build_prog_cxx_g)dnl
|
||||
+pushdef([CXX], CXX_FOR_BUILD)dnl
|
||||
+pushdef([CXXCPP], CXXCPP_FOR_BUILD)dnl
|
||||
+pushdef([CXXFLAGS], CXXFLAGS_FOR_BUILD)dnl
|
||||
+pushdef([CXXCPPFLAGS], CXXCPPFLAGS_FOR_BUILD)dnl
|
||||
+pushdef([host], build)dnl
|
||||
+pushdef([host_alias], build_alias)dnl
|
||||
+pushdef([host_cpu], build_cpu)dnl
|
||||
+pushdef([host_vendor], build_vendor)dnl
|
||||
+pushdef([host_os], build_os)dnl
|
||||
+pushdef([ac_cv_host], ac_cv_build)dnl
|
||||
+pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
||||
+pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
||||
+pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
||||
+pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
||||
+pushdef([ac_cxxcpp], ac_build_cxxcpp)dnl
|
||||
+pushdef([ac_compile], ac_build_compile)dnl
|
||||
+pushdef([ac_link], ac_build_link)dnl
|
||||
+pushdef([ac_tool_prefix], [#])dnl
|
||||
+
|
||||
+AC_PROG_CXX
|
||||
+AC_PROG_CXXCPP
|
||||
+
|
||||
+dnl Restore the old definitions
|
||||
+dnl
|
||||
+popdef([AC_TRY_COMPILER])dnl
|
||||
+popdef([ac_tool_prefix])dnl
|
||||
+popdef([ac_link])dnl
|
||||
+popdef([ac_compile])dnl
|
||||
+popdef([ac_cxxcpp])dnl
|
||||
+popdef([ac_cv_host_os])dnl
|
||||
+popdef([ac_cv_host_vendor])dnl
|
||||
+popdef([ac_cv_host_cpu])dnl
|
||||
+popdef([ac_cv_host_alias])dnl
|
||||
+popdef([ac_cv_host])dnl
|
||||
+popdef([host_os])dnl
|
||||
+popdef([host_vendor])dnl
|
||||
+popdef([host_cpu])dnl
|
||||
+popdef([host_alias])dnl
|
||||
+popdef([host])dnl
|
||||
+popdef([CXXCPPFLAGS])dnl
|
||||
+popdef([CXXFLAGS])dnl
|
||||
+popdef([CXXCPP])dnl
|
||||
+popdef([CXX])dnl
|
||||
+popdef([ac_cv_prog_cxx_g])dnl
|
||||
+popdef([ac_cv_prog_cxx_works])dnl
|
||||
+popdef([ac_cv_prog_cxx_cross])dnl
|
||||
+popdef([ac_cv_prog_gxx])dnl
|
||||
+popdef([cross_compiling])dnl
|
||||
+
|
||||
+dnl Finally, set Makefile variables
|
||||
+dnl
|
||||
+AC_SUBST([CXXFLAGS_FOR_BUILD])dnl
|
||||
+AC_SUBST([CXXCPPFLAGS_FOR_BUILD])dnl
|
||||
+])
|
||||
diff -Naur Mesa-9.0/src/glsl/builtin_compiler/Makefile.am Mesa-9.0.patch/src/glsl/builtin_compiler/Makefile.am
|
||||
--- Mesa-9.0/src/glsl/builtin_compiler/Makefile.am 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ Mesa-9.0.patch/src/glsl/builtin_compiler/Makefile.am 2012-10-29 21:37:57.271456405 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+# Copyright © 2012 Jon TURNEY
|
||||
+# Copyright © 2012 Thierry Reding
|
||||
+#
|
||||
+# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+# copy of this software and associated documentation files (the "Software"),
|
||||
+# to deal in the Software without restriction, including without limitation
|
||||
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+# and/or sell copies of the Software, and to permit persons to whom the
|
||||
+# Software is furnished to do so, subject to the following conditions:
|
||||
+#
|
||||
+# The above copyright notice and this permission notice (including the next
|
||||
+# paragraph) shall be included in all copies or substantial portions of the
|
||||
+# Software.
|
||||
+#
|
||||
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
+# IN THE SOFTWARE.
|
||||
+
|
||||
+CC = @CC_FOR_BUILD@
|
||||
+CFLAGS = @CFLAGS_FOR_BUILD@
|
||||
+CPP = @CPP_FOR_BUILD@
|
||||
+CPPFLAGS = @CPPFLAGS_FOR_BUILD@
|
||||
+CXX = @CXX_FOR_BUILD@
|
||||
+CXXFLAGS = @CXXFLAGS_FOR_BUILD@
|
||||
+LD = @LD_FOR_BUILD@
|
||||
+LDFLAGS = @LDFLAGS_FOR_BUILD@
|
||||
+
|
||||
+AM_CFLAGS = \
|
||||
+ -I $(top_srcdir)/src/mapi \
|
||||
+ -I $(top_srcdir)/src/mesa \
|
||||
+ -I $(GLSL_SRCDIR) \
|
||||
+ -I $(GLSL_SRCDIR)/glcpp \
|
||||
+ $(DEFINES_FOR_BUILD)
|
||||
+
|
||||
+AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
+
|
||||
+AM_YFLAGS = -v -d -p "glcpp_parser_"
|
||||
+AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
|
||||
+
|
||||
+include ../Makefile.sources
|
||||
+
|
||||
+noinst_PROGRAMS = builtin_compiler
|
||||
+
|
||||
+builtin_compiler_SOURCES = \
|
||||
+ $(GLSL_SRCDIR)/glcpp/glcpp-lex.l \
|
||||
+ $(GLSL_SRCDIR)/glcpp/glcpp-parse.y \
|
||||
+ $(LIBGLCPP_FILES) \
|
||||
+ $(GLSL_SRCDIR)/glsl_lexer.ll \
|
||||
+ $(GLSL_SRCDIR)/glsl_parser.cc \
|
||||
+ $(LIBGLSL_FILES) \
|
||||
+ $(LIBGLSL_CXX_FILES) \
|
||||
+ $(top_srcdir)/src/mesa/program/hash_table.c \
|
||||
+ $(top_srcdir)/src/mesa/program/symbol_table.c \
|
||||
+ $(GLSL_COMPILER_CXX_FILES) \
|
||||
+ $(GLSL_SRCDIR)/builtin_stubs.cpp
|
||||
+
|
||||
+BUILT_SOURCES = \
|
||||
+ glcpp-lex.c \
|
||||
+ glcpp-parse.c \
|
||||
+ glcpp-parse.h \
|
||||
+ glsl_lexer.cc
|
||||
+
|
||||
+CLEANFILES = $(BUILT_SOURCES)
|
||||
diff -Naur Mesa-9.0/src/glsl/Makefile.am Mesa-9.0.patch/src/glsl/Makefile.am
|
||||
--- Mesa-9.0/src/glsl/Makefile.am 2012-10-05 22:22:23.000000000 +0200
|
||||
+++ Mesa-9.0.patch/src/glsl/Makefile.am 2012-10-29 21:37:57.271456405 +0100
|
||||
@@ -19,9 +19,7 @@
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
-
|
||||
-# builtin_compiler is built before libglsl to generate builtin_function.cpp for libglsl.
|
||||
-# For this to work, a dummy version of builtin_function.cpp, builtin_stubs.cpp, is used.
|
||||
+SUBDIRS = builtin_compiler glcpp
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
@@ -38,32 +36,23 @@
|
||||
|
||||
include Makefile.sources
|
||||
|
||||
-noinst_LTLIBRARIES = libglslcommon.la libglsl.la
|
||||
-noinst_PROGRAMS = glsl_compiler glsl_test builtin_compiler
|
||||
+noinst_LTLIBRARIES = libglsl.la
|
||||
+noinst_PROGRAMS = glsl_compiler glsl_test
|
||||
|
||||
-# common sources for builtin_compiler and libglsl
|
||||
-libglslcommon_la_SOURCES = \
|
||||
+libglsl_la_SOURCES = \
|
||||
glsl_lexer.ll \
|
||||
glsl_parser.cc \
|
||||
$(LIBGLSL_FILES) \
|
||||
- $(LIBGLSL_CXX_FILES)
|
||||
-
|
||||
-libglslcommon_la_LIBADD = glcpp/libglcpp.la
|
||||
-
|
||||
-# common sources for builtin_compiler and glsl_compiler
|
||||
-GLSL2_SOURCES = \
|
||||
- $(top_srcdir)/src/mesa/program/hash_table.c \
|
||||
- $(top_srcdir)/src/mesa/program/symbol_table.c \
|
||||
- $(GLSL_COMPILER_CXX_FILES)
|
||||
-
|
||||
-libglsl_la_SOURCES = \
|
||||
+ $(LIBGLSL_CXX_FILES) \
|
||||
builtin_function.cpp
|
||||
|
||||
-libglsl_la_LIBADD = libglslcommon.la
|
||||
+libglsl_la_LIBADD = glcpp/libglcpp.la
|
||||
libglsl_la_LDFLAGS =
|
||||
|
||||
glsl_compiler_SOURCES = \
|
||||
- $(GLSL2_SOURCES)
|
||||
+ $(top_srcdir)/src/mesa/program/hash_table.c \
|
||||
+ $(top_srcdir)/src/mesa/program/symbol_table.c \
|
||||
+ $(GLSL_COMPILER_CXX_FILES)
|
||||
|
||||
glsl_compiler_LDADD = libglsl.la
|
||||
|
||||
@@ -76,12 +65,6 @@
|
||||
|
||||
glsl_test_LDADD = libglsl.la
|
||||
|
||||
-builtin_compiler_SOURCES = \
|
||||
- $(GLSL2_SOURCES) \
|
||||
- builtin_stubs.cpp
|
||||
-
|
||||
-builtin_compiler_LDADD = libglslcommon.la
|
||||
-
|
||||
# automake <=1.11 and automake >=1.12 have different conventions for naming C++ header files
|
||||
# made by yacc. To work with both, we write our own rule rather than using automake's.
|
||||
# When (if) we require automake >=1.12 in configure.ac, this can be removed, and we can use
|
||||
@@ -89,16 +72,11 @@
|
||||
glsl_parser.cc glsl_parser.h: glsl_parser.yy
|
||||
$(AM_V_GEN) $(YACC) -v -o glsl_parser.cc -p "_mesa_glsl_" --defines=glsl_parser.h $<
|
||||
|
||||
-BUILT_SOURCES = glsl_parser.h builtin_function.cpp
|
||||
-CLEANFILES = glsl_lexer.cc glsl_parser.cc $(BUILT_SOURCES)
|
||||
-
|
||||
-builtin_function.cpp: $(srcdir)/builtins/profiles/* $(srcdir)/builtins/ir/* $(srcdir)/builtins/glsl/* $(srcdir)/builtins/tools/generate_builtins.py $(srcdir)/builtins/tools/texture_builtins.py builtin_compiler$(EXEEXT)
|
||||
- $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
|
||||
-
|
||||
-glcpp/libglcpp.la:
|
||||
- cd glcpp ; $(MAKE) $(AM_MAKEFLAGS)
|
||||
+BUILT_SOURCES = glsl_parser.h
|
||||
+CLEANFILES = glsl_lexer.cc glsl_parser.cc $(BUILT_SOURCES) builtin_function.cpp
|
||||
|
||||
-SUBDIRS = glcpp
|
||||
+builtin_function.cpp: $(srcdir)/builtins/profiles/* $(srcdir)/builtins/ir/* $(srcdir)/builtins/glsl/* $(srcdir)/builtins/tools/generate_builtins.py $(srcdir)/builtins/tools/texture_builtins.py builtin_compiler/builtin_compiler$(BUILD_EXEEXT)
|
||||
+ $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/builtins/tools/generate_builtins.py builtin_compiler/builtin_compiler$(BUILD_EXEEXT) > builtin_function.cpp || rm -f builtin_function.cpp
|
||||
|
||||
# Provide compatibility with scripts for the old Mesa build system for
|
||||
# a while by putting a link to the library in the current directory.
|
Loading…
x
Reference in New Issue
Block a user