summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/mesa/mesa-common.inc2
-rw-r--r--meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch54
2 files changed, 29 insertions, 27 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
index 2b90aed212..1c376b7733 100644
--- a/meta/recipes-graphics/mesa/mesa-common.inc
+++ b/meta/recipes-graphics/mesa/mesa-common.inc
@@ -12,7 +12,7 @@ SECTION = "x11"
12LICENSE = "MIT" 12LICENSE = "MIT"
13LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1d" 13LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1d"
14 14
15INC_PR = "r13" 15INC_PR = "r14"
16PE = "2" 16PE = "2"
17 17
18 18
diff --git a/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch b/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
index 8994faf154..f072c34f71 100644
--- a/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
+++ b/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
@@ -1,38 +1,40 @@
1Upstream-Status: Pending 1Upstream-Status: Pending
2 2
3get correct compiler options for x32 gcc. 3Using uname like this when cross compiling is a really bad idea. We
4provide the correct linker flags, lets just assume we can get this
5right ourselves.
4 6
5Received this patch from H.J. Lu <hjl.tools@gmail.com> 7RP 2012/04/26
6 8
7Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06 9Index: Mesa-7.11/bin/mklib
8 10===================================================================
9--- Mesa-7.11/bin/mklib.x32 2011-12-06 13:15:17.968695114 -0800 11--- Mesa-7.11.orig/bin/mklib 2012-04-26 19:43:20.729150109 +0000
10+++ Mesa-7.11/bin/mklib 2011-12-06 13:17:13.872152249 -0800 12+++ Mesa-7.11/bin/mklib 2012-04-26 20:30:22.421086163 +0000
11@@ -335,7 +335,12 @@ case $ARCH in 13@@ -330,13 +330,7 @@
14 ;;
15 esac
16
17- # Check if objects are 32-bit and we're running in 64-bit
18- # environment. If so, pass -m32 flag to linker.
12 set ${OBJECTS} 19 set ${OBJECTS}
13 ABI32=`file $1 | grep 32-bit` 20- ABI32=`file $1 | grep 32-bit`
14 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then 21- if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
15- OPTS="-m32 ${OPTS}" 22- OPTS="-m32 ${OPTS}"
16+ ABIX32=`file $1 | grep x86-64` 23- fi
17+ if [ "${ABI32}" ]; then
18+ OPTS="-mx32 ${OPTS}"
19+ else
20+ OPTS="-m32 ${OPTS}"
21+ fi
22 fi
23 24
24 if [ "${ALTOPTS}" ] ; then 25 if [ "${ALTOPTS}" ] ; then
25@@ -392,7 +397,12 @@ case $ARCH in 26 OPTS=${ALTOPTS}
27@@ -387,13 +381,7 @@
28 # exptmp is removed below
29 fi
30
31- # Check if objects are 32-bit and we're running in 64-bit
32- # environment. If so, pass -m32 flag to linker.
26 set ${OBJECTS} 33 set ${OBJECTS}
27 ABI32=`file $1 | grep 32-bit` 34- ABI32=`file $1 | grep 32-bit`
28 if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then 35- if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
29- OPTS="-m32 ${OPTS}" 36- OPTS="-m32 ${OPTS}"
30+ ABIX32=`file $1 | grep x86-64` 37- fi
31+ if [ "${ABI32}" ]; then
32+ OPTS="-mx32 ${OPTS}"
33+ else
34+ OPTS="-m32 ${OPTS}"
35+ fi
36 fi
37 if [ "${ALTOPTS}" ] ; then 38 if [ "${ALTOPTS}" ] ; then
38 OPTS=${ALTOPTS} 39 OPTS=${ALTOPTS}
40 fi