[Qt] libQt4Pas on Ubuntu

Matthias Klumpp matthias at nlinux.org
Wed Apr 6 14:10:54 CEST 2011


Hi!
I applied the attached patch to the Debian and Ubuntu packages, which adds
the -mstackrealign flag if an x86_64 or x86 platform is detected, as this
GCC flag is not available for other targets than these two.
You might want to add it to the upstream sources too.
Cheers,
   Matthias


On Wed, 30 Mar 2011 08:45:47 +0200, zeljko <zeljko at holobit.net> wrote:
> Hi,
> Den, do you know who's package maintainer for libQt4Pas on Ubuntu ?
> Problem is with -mstackrealign, that should be added for ubuntu 10.10
> which 
> uses qt-4.7 (apps crashes). So package should be updated.
> 
> zeljko
-------------- next part --------------
Description: Compile Qt4 bindings with -mstackrealign.
(Required for Qt >= 4.7, since sse2 is enabled by default)
Forwarded: yes
Author: Matthias Klumpp <matthias at nlinux.org>
Last-Update: 2011-03-14
--- a/Qt4Pas.pro
+++ b/Qt4Pas.pro
@@ -31,12 +31,21 @@
 CONFIG += dll
 CONFIG += warn_off
 
+contains(QMAKE_HOST.arch, x86_64) {
+	message("Compiling with stackrealign on x86_64")
+	QMAKE_CXXFLAGS += -mstackrealign
+}
+
+contains(QMAKE_HOST.arch, x86) {
+	message("Compiling with stackrealign on x86")
+	QMAKE_CXXFLAGS += -mstackrealign
+}
 
 !equals(QT_MAJOR_VERSION,4)|!equals(QT_MINOR_VERSION,5) {
   message("This pascal binding should be used for 4.5.3 and current Qt is" $$QT_VERSION)
 }
 
-# Available Binding Platforms: see http://wiki.freepascal.org/Qt4_binding#Supported_Platforms  
+# Available Binding Platforms: see http://wiki.freepascal.org/Qt4_binding#Supported_Platforms
 
 target.path = $$[QT_INSTALL_LIBS]
 
@@ -44,18 +53,18 @@
   PLATFORM = MSWINDOWS
   target.path = $$[QT_INSTALL_BINS]
   }
-                            
-embedded:PLATFORM = QTOPIA  
+
+embedded:PLATFORM = QTOPIA
 
 unix:!embedded:!mac:PLATFORM = BINUX
 
 mac {
   PLATFORM = DARWIN
   CONFIG += lib_bundle
-  }                   
+  }
 
 message("Pascal Qt Interface for binding platform:" $$PLATFORM)
-DEFINES += $$PLATFORM   
+DEFINES += $$PLATFORM
 message("Install location:" $$target.path)
 
 INSTALLS += target


More information about the Qt mailing list