diff options
author | Yuhang Zhao <2546789017@qq.com> | 2019-03-30 13:52:48 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2019-03-30 07:34:30 +0000 |
commit | 387f120bf9d6c718796efe5d0db772abc71ab442 (patch) | |
tree | 7e5d70249e47f12c16001c0da04c40000148e600 /mkspecs | |
parent | 20b7e18146e28e73cba52a63a3415c6828f1f6f5 (diff) |
Fix cross compile on Ubuntu
When cross compiling on Ubuntu with LTO enabled, the linker will complain about the "-fno-fat-objects" parameter even if the "-fuse-linker-plugin" is passed it.
But if the "-fno-fat-objects" parameter is removed, the linker will complain about "don't support linker plugin in this mode".
Remove both parameters can fix this.
Change-Id: I2d792ca70737f2e82a360bfc597f2b110513b954
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/win32-g++/qmake.conf | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index ed131c6823..5e9923357f 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -22,4 +22,8 @@ QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_LINK = $${CROSS_COMPILE}g++ QMAKE_LINK_C = $${CROSS_COMPILE}gcc +QMAKE_CFLAGS_LTCG = -flto +QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG +QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG + load(qt_config) |