feat: add pie for mips64el

add pie for mips64el

Log: 添加编译参数给mips64el平台
Change-Id: Ib0f0b3dcb069aca6bb2ead11414f51f667f95bb5
Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/7472
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com>
Tested-by: <mailman@uniontech.com>
This commit is contained in:
Zhang, DingYuan 2020-10-14 15:08:18 +08:00 committed by zhangdingyuan
parent ff93e9e78e
commit 0785dff36f

View File

@ -11,6 +11,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_FLAGS "-g -Wall")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ftree-vectorize -march=loongson3a -mhard-float -mno-micromips -mno-mips16 -flax-vector-conversions -mloongson-ext2 -mloongson-mmi -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()
# generate a compile commands file as complete database for vim-YouCompleteMe or some other similar tools
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)