Skip to contentSkip to conversation

qt: add QT_COORD_TYPE to double option

PATCH Superseded Richard Genoud 4 participants 8 messages Jan 20, 2015 – Apr 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt: add QT_COORD_TYPE to double option

From: Julien D'Ascenzio <[email protected]>

On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

---
 package/qt/Config.in | 7 +++++++
 package/qt/qt.mk     | 5 +++++
 2 files changed, 12 insertions(+)
package/qt/Config.in +7 -0
index 44710f52e627..fbc068b360b9 100644
@@ -88,6 +88,13 @@ config BR2_PACKAGE_QT_CONFIG_FILE
 	  This option allows to set the path of such a configuration
 	  file, which Buildroot will give to Qt at compile time.
 
+config BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE
+	bool "QT_COORD_TYPE to double"
+	help
+	  Set QT_COORD_TYPE to double
+	  On ARM-based platforms, qreal is a typedef for float for performance reasons.
+	  If unsure say n.
+
 config BR2_PACKAGE_QT_QT3SUPPORT
 	bool "Compatibility with Qt3"
 	depends on BR2_PACKAGE_QT_GUI_MODULE
package/qt/qt.mk +5 -0
index 98fc0e65f9c0..8fbbd63521c3 100644
@@ -60,6 +60,11 @@ QT_CFLAGS+=-marm
 QT_CXXFLAGS+=-marm
 endif
 
+ifeq ($(BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE),y)
+QT_CFLAGS += -DQT_COORD_TYPE=double
+QT_CXXFLAGS += -DQT_COORD_TYPE=double
+endif
+
 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y)
 QT_CONFIGURE_OPTS += -qt3support
 else
Signature · 1 line
2.0.0
#1 lore raw

PATCH RESEND 1/1 qt: add QT_COORD_TYPE to double option

From: Julien D'Ascenzio <[email protected]>

On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

---
Rebased and compiled on master (21 april 2015) for arm926ej-s

 package/qt/Config.in | 7 +++++++
 package/qt/qt.mk     | 5 +++++
 2 files changed, 12 insertions(+)
package/qt/Config.in +7 -0
index 43f5a0fc7c0d..c3922abb9f23 100644
@@ -120,6 +120,13 @@ config BR2_PACKAGE_QT_CONFIG_FILE
 	  This option allows to set the path of such a configuration
 	  file, which Buildroot will give to Qt at compile time.
 
+config BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE
+	bool "QT_COORD_TYPE to double"
+	help
+	  Set QT_COORD_TYPE to double
+	  On ARM-based platforms, qreal is a typedef for float for performance reasons.
+	  If unsure say n.
+
 config BR2_PACKAGE_QT_QT3SUPPORT
 	bool "Compatibility with Qt3"
 	depends on BR2_PACKAGE_QT_GUI_MODULE
package/qt/qt.mk +5 -0
index 76acbfcea476..ce0a21ab288a 100644
@@ -46,6 +46,11 @@ QT_CFLAGS += -marm
 QT_CXXFLAGS += -marm
 endif
 
+ifeq ($(BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE),y)
+QT_CFLAGS += -DQT_COORD_TYPE=double
+QT_CXXFLAGS += -DQT_COORD_TYPE=double
+endif
+
 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y)
 QT_CONFIGURE_OPTS += -qt3support
 else
Signature · 1 line
2.3.4
#2 lore raw

PATCH RESEND 1/1 qt: add QT_COORD_TYPE to double option

Richard, All,

On 2015-04-22 10:34 +0200, Richard Genoud spake thusly:

Quoted 7 lines

From: Julien D'Ascenzio <[email protected]>

On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

[build-tested only with a minimal Qt config for cCortex A7]

Regards,
Yann E. MORIN.

Quoted 48 lines

---
Rebased and compiled on master (21 april 2015) for arm926ej-s

 package/qt/Config.in | 7 +++++++
 package/qt/qt.mk     | 5 +++++
 2 files changed, 12 insertions(+)
package/qt/Config.in +7 -0
index 43f5a0fc7c0d..c3922abb9f23 100644
@@ -120,6 +120,13 @@ config BR2_PACKAGE_QT_CONFIG_FILE
 	  This option allows to set the path of such a configuration
 	  file, which Buildroot will give to Qt at compile time.
 
+config BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE
+	bool "QT_COORD_TYPE to double"
+	help
+	  Set QT_COORD_TYPE to double
+	  On ARM-based platforms, qreal is a typedef for float for performance reasons.
+	  If unsure say n.
+
 config BR2_PACKAGE_QT_QT3SUPPORT
 	bool "Compatibility with Qt3"
 	depends on BR2_PACKAGE_QT_GUI_MODULE
package/qt/qt.mk +5 -0
index 76acbfcea476..ce0a21ab288a 100644
@@ -46,6 +46,11 @@ QT_CFLAGS += -marm
 QT_CXXFLAGS += -marm
 endif
 
+ifeq ($(BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE),y)
+QT_CFLAGS += -DQT_COORD_TYPE=double
+QT_CXXFLAGS += -DQT_COORD_TYPE=double
+endif
+
 ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y)
 QT_CONFIGURE_OPTS += -qt3support
 else
Signature · 6 lines
2.3.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH RESEND 1/1 qt: add QT_COORD_TYPE to double option

In reply to Richard Genoud

Dear Richard Genoud,

Quoted 9 lines · Richard Genoud

From: Julien D'Ascenzio <[email protected]>

On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

---
Rebased and compiled on master (21 april 2015) for arm926ej-s

Applied after slightly improving the Config.in help text, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH RESEND 1/1 qt: add QT_COORD_TYPE to double option

In reply to Richard Genoud
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Richard" == Richard Genoud <[email protected]> writes:

From: Julien D'Ascenzio <[email protected]>
On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

---
Rebased and compiled on master (21 april 2015) for arm926ej-s

This causes compilation issues with the test module as it defines a template using double and one using qreal:

http://autobuild.buildroot.net/?reason=qt-4.8.6

Care to take a look and send a fix?

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH RESEND 1/1 qt: add QT_COORD_TYPE to double option

2015-04-28 11:42 GMT+02:00 Peter Korsgaard <[email protected]>:

Quoted 11 lines
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Richard" == Richard Genoud <[email protected]> writes:

From: Julien D'Ascenzio <[email protected]>
On ARM-based platforms, qreal is a typedef for float for performance reasons.
But we may want a double precision anyway.

---
Rebased and compiled on master (21 april 2015) for arm926ej-s

Quoted 6 lines

This causes compilation issues with the test module as it defines a template using double and one using qreal:

http://autobuild.buildroot.net/?reason=qt-4.8.6

Care to take a look and send a fix?

yes, I'll have a look.
thanks !

#6 lore raw

PATCH 1/1 qt: QT_COORD_TYPE_DOUBLE should only be set on soft float

In reply to Peter Korsgaard

If QT_COORD_TYPE_DOUBLE is forced and hard float is used, Qt compilation breaks because it can't find hard coded operations on double.

Moreover, QT_COORD_TYPE is float only if QT_NO_FPU is set. (cf src/corelib/global/qglobal.h)

So, we can safely make the QT_COORD_TYPE_DOUBLE option depend on BR2_SOFT_FLOAT.

---
 package/qt/Config.in | 1 +
 1 file changed, 1 insertion(+)

based on master 2a15ce89ac5a
Compiled for:
cortexA8 in hard float/soft float with and without QT_COORD_TYPE_DOUBLE x86_64
arm926t with and without QT_COORD_TYPE_DOUBLE

package/qt/Config.in +1 -0
index 83fdeec812bb..9568b7010cff 100644
@@ -121,6 +121,7 @@ config BR2_PACKAGE_QT_CONFIG_FILE
 	  file, which Buildroot will give to Qt at compile time.
 
 config BR2_PACKAGE_QT_QT_COORD_TYPE_DOUBLE
+	depends on BR2_SOFT_FLOAT
 	bool "QT_COORD_TYPE to double"
 	help
 	  Set QT_COORD_TYPE to double. On ARM-based platforms, qreal
Signature · 1 line
2.3.4
#7 lore raw

PATCH 1/1 qt: QT_COORD_TYPE_DOUBLE should only be set on soft float

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Richard" == Richard Genoud <[email protected]> writes:

If QT_COORD_TYPE_DOUBLE is forced and hard float is used, Qt compilation breaks because it can't find hard coded operations on double.

Quoted 8 lines

Moreover, QT_COORD_TYPE is float only if QT_NO_FPU is set. (cf src/corelib/global/qglobal.h)

So, we can safely make the QT_COORD_TYPE_DOUBLE option depend on BR2_SOFT_FLOAT.

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard