You are not logged in.

#1 2014-04-12 11:55:53

DaveCode
Member
Registered: 2008-08-15
Posts: 103

[SOLVED] Compiler Flags to Tune Qt Apps from AUR

I'm lost tuning Qt apps from AUR for particular CPUs. Qt doesn't read /etc/makepkg.conf and uses qmake not make. I have the flags in /etc/makepkg.conf already. So I added CMAKE_CXX_FLAGS to
/usr/share/qt4/mkspecs/default/qmake.conf per instructions.

The results are weird. My flags hit g++ TWICE, and that duplication is chased by a THIRD set of generic values. Build output looks like,

g++ ... -march=MYXYZ -msomeother=MYSTUFF ... -march=MYXYZ -msomeother=MYSTUFF ... -march=i686 -mtune=generic ...

I don't know enough Qt to guess forward. Web searches gave nada. I have qtchooser installed if it matters.

Thanks to anyone who can give me a clue.

Last edited by DaveCode (2014-04-14 10:26:03)

Offline

#2 2014-04-12 15:58:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

Is there a *.pro file for that project?  Local settings are controlled by that file.  That file can be written to add new options, or it can be written to override global settings.

Last edited by ewaller (2014-04-12 15:59:19)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-04-12 16:00:31

jean_no
Member
Registered: 2007-09-18
Posts: 48

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

Hi

For Qt 5, see :

/usr/lib/qt/mkspecs/common/g++-base.conf
/usr/lib/qt/mkspecs/common/gcc-base.conf

and fot Qt 4:

/usr/share/qt4/mkspecs/common/g++-base.conf
/usr/share/qt4/mkspecs/common/gcc-base.conf

A+

Offline

#4 2014-04-13 04:05:37

DaveCode
Member
Registered: 2008-08-15
Posts: 103

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

@ewaller Inspect qtweb for yourself. I wish to set defaults so every AUR build uses them. I assume compiler tuning will not affect ABI interop with Arch's stock Qt. I am not tuning Qt itself, just AUR packages. Qt will come from Arch repos. Someone can tell me if that's wrong-headed.

@jean_no OK thank you!

Offline

#5 2014-04-14 10:32:47

DaveCode
Member
Registered: 2008-08-15
Posts: 103

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

So jean_no nailed the flags.

Note qtweb is a terribly crash-prone app regardless. I tried it on two boxes, one with zero flags tuning. Still got crashes. Maybe a -git version would be better.

I prefer the nice zippy and stable dooble-qt4. There's also a Qt5 build.

Offline

#6 2015-09-26 02:11:10

dslink
Member
From: USA
Registered: 2012-02-23
Posts: 48

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

This should be sticky'd because its simple and to the point.

Offline

#7 2015-09-26 08:44:03

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED] Compiler Flags to Tune Qt Apps from AUR

I disagree. If it should be somewhere, it should be on the wiki.

Please don't necrobump.

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB