diff --git a/android/mfx_defs.mk b/android/mfx_defs.mk index 82f772478..a9003d297 100644 --- a/android/mfx_defs.mk +++ b/android/mfx_defs.mk @@ -77,7 +77,7 @@ MFX_CFLAGS += \ # Security MFX_CFLAGS += \ -fstack-protector \ - -fPIE -fPIC -pie \ + -fPIE -fPIC \ -O2 -D_FORTIFY_SOURCE=2 \ -Wformat -Wformat-security \ -fexceptions -frtti @@ -117,7 +117,7 @@ MFX_INCLUDES_LIBVA := $(TARGET_OUT_HEADERS)/libva # Setting usual link flags MFX_LDFLAGS := \ - -z noexecstack \ + -z noexecstack -pie \ -z relro -z now # Setting vendor diff --git a/builder/FindGlobals.cmake b/builder/FindGlobals.cmake index 6c96fc8e0..d0d580698 100644 --- a/builder/FindGlobals.cmake +++ b/builder/FindGlobals.cmake @@ -71,7 +71,7 @@ if( Linux OR Darwin ) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -fPIC ${c_warnings} ${no_warnings} ${common_flags}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC ${cxx_warnings} ${no_warnings} ${common_flags}") - append("-fPIE -pie" CMAKE_EXE_LINKER_FLAGS) + append("-fPIE" CMAKE_EXE_LINKER_FLAGS) # CACHE + FORCE should be used only here to make sure that this parameters applied globally # End user is responsible to adjust configuration parameters further if needed. Here