summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
blob: 22a2339ad9487932a7cabe6d39d80bba96226847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
UpstreamStatus: Pending

get correct compiler options for x32 gcc.

Received this patch from H.J. Lu <hjl.tools@gmail.com>

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01

--- Mesa-7.11/bin/mklib.x32	2011-11-30 14:29:14.976465283 -0800
+++ Mesa-7.11/bin/mklib	2011-11-30 14:32:48.591525193 -0800
@@ -335,7 +335,12 @@ case $ARCH in
 	    set ${OBJECTS}
 	    ABI32=`file $1 | grep 32-bit`
 	    if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
-		OPTS="-m32 ${OPTS}"
+		ABIX32=`file $1 | grep x86-64`
+		if [ "${ABI32}" ]; then
+		    OPTS="-mx32 ${OPTS}"
+		else
+		    OPTS="-m32 ${OPTS}"
+		fi
 	    fi
 
             if [ "${ALTOPTS}" ] ; then