Patchwork [06/11] mesa: Properly create share library for x32

login
register
mail settings
Submitter Nitin A Kamble
Date Dec. 8, 2011, 5:48 a.m.
Message ID <ab9eb1bda82bc5924f06c97c10d5be9853bbf7db.1323323130.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/16455/
State Accepted
Commit 01256cb31d23134b9536b74461ef3dff4c15c513
Headers show

Comments

Nitin A Kamble - Dec. 8, 2011, 5:48 a.m.
From: "H.J. Lu" <hjl.tools@gmail.com>

Also pass -mx32 parameter to gcc to create create share library
for x32.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-Off-By: H.J. Lu <hjl.tools@gmail.com>
---
 .../mesa/mesa/mesa_fix_for_x32.patch               |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

Patch

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 22a2339..dfd67fe 100644
--- a/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
+++ b/meta/recipes-graphics/mesa/mesa/mesa_fix_for_x32.patch
@@ -4,10 +4,10 @@  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
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
 
---- 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
+--- Mesa-7.11/bin/mklib.x32	2011-12-06 13:15:17.968695114 -0800
++++ Mesa-7.11/bin/mklib	2011-12-06 13:17:13.872152249 -0800
 @@ -335,7 +335,12 @@ case $ARCH in
  	    set ${OBJECTS}
  	    ABI32=`file $1 | grep 32-bit`
@@ -22,3 +22,17 @@  Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
  	    fi
  
              if [ "${ALTOPTS}" ] ; then
+@@ -392,7 +397,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
+                 OPTS=${ALTOPTS}