From 1d24e040080a249ebc2b7b9d6720438c3122fbfa Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 2 Oct 2020 15:32:16 -0600 Subject: [PATCH] - Use -fPIC rather than -fPIE. Re-enable LTO. --- nextcloud-client-picpie.patch | 30 ++++++++++++++++++++++++++++++ nextcloud-client.spec | 8 ++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 nextcloud-client-picpie.patch diff --git a/nextcloud-client-picpie.patch b/nextcloud-client-picpie.patch new file mode 100644 index 0000000..61de364 --- /dev/null +++ b/nextcloud-client-picpie.patch @@ -0,0 +1,30 @@ +diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt +index abb3620..5702702 100644 +--- a/src/cmd/CMakeLists.txt ++++ b/src/cmd/CMakeLists.txt +@@ -10,8 +10,8 @@ set(cmd_SRC + + + if(UNIX AND NOT APPLE) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + endif() + +diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt +index 2f1e99e..54a143c 100644 +--- a/src/gui/CMakeLists.txt ++++ b/src/gui/CMakeLists.txt +@@ -250,8 +250,8 @@ endif() + ecm_add_app_icon(final_src ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASENAME "${APPLICATION_ICON_NAME}") + + if(UNIX AND NOT APPLE) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") + endif() + diff --git a/nextcloud-client.spec b/nextcloud-client.spec index 2f8b10c..033b596 100644 --- a/nextcloud-client.spec +++ b/nextcloud-client.spec @@ -1,11 +1,10 @@ %undefine __cmake_in_source_build %undefine _cmake_skip_rpath -%define _lto_cflags %{nil} %global _hardened_build 1 Name: nextcloud-client Version: 3.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Nextcloud Client # -libs are LGPLv2+, rest GPLv2 @@ -21,6 +20,7 @@ Source1: nextcloud.appdata.xml # These fix are needed because the system wide QtSingleApplication is slightly # different from the bundled one. #Patch0: %%{name}-%%{version}-syslibs.patch +Patch1: nextcloud-client-picpie.patch BuildRequires: check BuildRequires: chrpath @@ -145,6 +145,7 @@ The nextcloud desktop client dolphin extension. %prep %setup -q -n desktop-%{version} +%patch1 -p1 #rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication @@ -231,6 +232,9 @@ test "$(chrpath --list %{buildroot}%{_bindir}/nextcloud)" = "%{buildroot}%{_bind %endif %changelog +* Fri Oct 02 2020 Jeff Law - 3.0.2-2 +- Use -fPIC rather than -fPIE. Re-enable LTO. + * Sat Sep 26 2020 Mukundan Ragavan - 3.0.2-1 - Update to 3.0.2