Bug 6534 - Qt5 does not compiled with CLang in release mode
: Qt5 does not compiled with CLang in release mode
Status: RESOLVED WORKSFORME
Product: Desktop Bugs
Classification: ROSA Desktop
Component: -Enter Bugs Here-
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: Desktop Triage Team
: Desktop Triage Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-05 13:00 MSK by Yaroslav
Modified: 2016-01-14 13:57 MSK (History)
1 user (show)

See Also:
RPM Package: Qt5
ISO-related:
Bad POT generating:
Upstream:


Attachments
Differences drom make files some qt-projects. (1.11 KB, application/gzip)
2016-01-05 13:00 MSK, Yaroslav
Details
new problems (8.27 KB, text/plain)
2016-01-11 20:01 MSK, Yaroslav
Details
Full MakeFile Diff (3.17 KB, application/gzip)
2016-01-11 20:18 MSK, Yaroslav
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav 2016-01-05 13:00:55 MSK
Created attachment 4341 [details]
Differences drom make files some qt-projects.

Qt5 does not compiled with CLang in release mode
Arguments '-fvar-tracking-assignments' and '-frecord-gcc-switches' are unknown

Qmake from system package and Community version create different files.
Their differences (without includes) in the attachment.

Steps to Reproduce:
1. Make some project in Qt-Creator.
2. Chose CLang-release profile for compiling.
3. Push make button.
Comment 1 Andrey Bondrov 2016-01-07 05:24:13 MSK
Please check if this build resolves the issue.

Advisory: "Remove -fvar-tracking-assignments and -frecord-gcc-switches from default optflags because CLang rejects them"

https://abf.rosalinux.ru/build_lists/2615504
https://abf.rosalinux.ru/build_lists/2615505
Comment 2 Yaroslav 2016-01-11 20:01:11 MSK
Created attachment 4344 [details]
new problems


It was even worse!


This simple project where one button and one label.

Makefile will be in the next message
Comment 3 Yaroslav 2016-01-11 20:18:38 MSK
Created attachment 4345 [details]
Full MakeFile Diff

$QT_PATH - моя замена для пути к корневому Qt, чтобы можно было найти радикальные различия в строках.
Comment 4 Andrey Bondrov 2016-01-11 20:53:50 MSK
(In reply to comment #2)
> Created attachment 4344 [details]
> new problems
> 
> It was even worse!
> 
> This simple project where one button and one label.
> 
> Makefile will be in the next message

Well, in fact it's better. :-) Now let's try to drop -Wp,-D_FORTIFY_SOURCE=2 from optflags because it cannot be used with clang and glibc: https://bugzilla.redhat.com/show_bug.cgi?id=1188075

I'll post new build lists for testing soon.
Comment 5 Andrey Bondrov 2016-01-12 13:59:10 MSK
Plaase try new build lists:

https://abf.rosalinux.ru/build_lists/2617642
https://abf.rosalinux.ru/build_lists/2617643
Comment 6 Yaroslav 2016-01-13 22:16:06 MSK
It is now build projects. But it has warnings:
clang: warning: optimization flag '-ffat-lto-objects' is not supported                                                                                                                                             
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported                                                                                                                               
clang: warning: argument unused during compilation: '-ffat-lto-objects'                                                                                                                                            
clang: warning: argument unused during compilation: '-fno-delete-null-pointer-checks'

clang: warning: optimization flag '-ffat-lto-objects' is not supported
clang: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported
clang: warning: argument unused during compilation: '-ffat-lto-objects'
clang: warning: argument unused during compilation: '-fno-delete-null-pointer-checks'
Comment 7 Andrey Bondrov 2016-01-14 13:57:49 MSK
I guess the only correct way to deal with this issue is to run qmake as

qmake-qt5 QMAKE_CFLAGS_RELEASE=XXX QMAKE_CXXFLAGS_RELEASE=XXX [clags flags]

XXX can be either empty or any flags you need. This way it works fine.