From 63620afeadf378017ca5741cf4dad1f7cc24c754 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Thu, 21 Jan 2016 21:09:12 -0800 Subject: [PATCH] Added -fPIC flag for only qurt build Signed-off-by: Mark Charlebois --- cmake/common/px4_base.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index 0cf6b6504c..36072c185e 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -550,13 +550,16 @@ function(px4_add_common_flags) else() set(max_optimization -Os) + if ("${OS}" STREQUAL "qurt") + set(PIC_FLAG -fPIC) + endif() set(optimization_flags -fno-strict-aliasing -fomit-frame-pointer -funsafe-math-optimizations -ffunction-sections -fdata-sections - -fPIC + ${PIC_FLAG} ) endif()