From 387f120bf9d6c718796efe5d0db772abc71ab442 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Sat, 30 Mar 2019 13:52:48 +0800 Subject: 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 --- mkspecs/win32-g++/qmake.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mkspecs') 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) -- cgit v1.2.3