Description: Do not force PIE when linking the feather executable
 The Debian package links the feather executable as non-PIE (debian/rules passes
 -no-pie) because the system libbc-ur.a is not built with -fPIC.  Upstream used to
 add -pie to LD_SECURITY_FLAGS and append it to CMAKE_EXE_LINKER_FLAGS after the
 user-provided flags, so -pie overrode -no-pie and the amd64 link failed with
 "relocation R_X86_64_32S against `.rodata'".  Drop the -pie linker flag here while
 keeping the other linker hardening flags.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed

--- feather-wallet-2.8.1+dfsg.orig/CMakeLists.txt
+++ feather-wallet-2.8.1+dfsg/CMakeLists.txt
@@ -230,8 +230,9 @@ if (APPLE)
     add_linker_flag_if_supported(-Wl,-dead_strip_dylibs LD_SECURITY_FLAGS)
 endif()
 if (NOT APPLE AND NOT (WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "GNU"))
-    # Windows binaries die on startup with PIE when compiled with GCC
-    add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
+    # Do not add -pie here.  The Debian package links the feather executable
+    # as non-PIE (see debian/rules): libbc-ur.a is not built with -fPIC, so a
+    # PIE link fails on amd64 with "relocation R_X86_64_32S against `.rodata'".
 endif()
 add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
 add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
