[Lunar-commits] <moonbase> gtk+-2: Final fix for DnD crash

Zbigniew Luszpinski zbiggy at lunar-linux.org
Wed Jan 5 03:14:31 CET 2011


commit 8ed30ce9f50302abf043b2986efad4f3ad26c3b8
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Wed Jan 5 03:14:31 2011 +0100

    gtk+-2: Final fix for DnD crash
---
 graphics/gtk+-2/BUILD |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/graphics/gtk+-2/BUILD b/graphics/gtk+-2/BUILD
index 4122c3c..904b178 100644
--- a/graphics/gtk+-2/BUILD
+++ b/graphics/gtk+-2/BUILD
@@ -3,11 +3,15 @@
   bad_flags -mssse3 &&
   bad_flags -mfpmath=sse &&
 
-  # Fixes drag and drop crash
-  bad_flags -O3 &&
-  bad_flags -O2 &&
-  CFLAGS=" -O1 $CFLAGS" &&
-  CXXFLAGS=$CFLAGS &&
+  # Fixes mysterious drag and drop crash in gtk+-2
+  # gtk+-2 when compiled with -O2 or -O3 will compile well
+  # but crash on drag and drop of bitmaps.
+  # Surprisingly -Os works well and does not need the fix below.
+  # The scary thing is -O2, -O3 and -Os all enable -fcaller-saves
+  # but only -Os does it in a way gtk+-2 does not crash on DnD.
+  case "$CFLAGS" in
+  *-O[23]*) CFLAGS+=' -fno-caller-saves';;
+  esac &&
 
   patch_it $SOURCE2 1 &&
   if [ "$USE_XINPUT" == "y" ]; then


More information about the Lunar-commits mailing list