File octave_tools_pie.patch of Package octave

Index: octave-7.1.0/src/module.mk
===================================================================
--- octave-7.1.0.orig/src/module.mk
+++ octave-7.1.0/src/module.mk
@@ -74,6 +74,7 @@ nodist_%canon_reldir%_octave_SOURCES = %
 %canon_reldir%_octave_LDFLAGS = \
   $(NO_UNDEFINED_LDFLAG) \
   $(OCTAVE_LINK_OPTS) \
+  -pie \
   $(WARN_LDFLAGS) \
   $(OCTAVE_UNICODE_EXE_LDFLAGS)
 
@@ -95,6 +96,7 @@ nodist_%canon_reldir%_octave_cli_SOURCES
 %canon_reldir%_octave_cli_LDFLAGS = \
   $(NO_UNDEFINED_LDFLAG) \
   $(OCTAVE_LINK_OPTS) \
+  -pie \
   $(WARN_LDFLAGS) \
   $(OCTAVE_UNICODE_EXE_LDFLAGS)
 
@@ -121,6 +123,7 @@ endif
 %canon_reldir%_octave_gui_LDFLAGS = \
   $(NO_UNDEFINED_LDFLAG) \
   $(OCTAVE_GUI_LINK_OPTS) \
+  -pie \
   $(WARN_LDFLAGS) \
   $(OCTAVE_UNICODE_EXE_LDFLAGS)
 
@@ -149,8 +152,14 @@ nodist_%canon_reldir%_mkoctfile_SOURCES
   $(SRC_DIR_CPPFLAGS) \
   $(OCTAVE_CPPFLAGS)
 
+%canon_reldir%_mkoctfile_LDFLAGS = \
+  -pie
+
 %canon_reldir%_octave_config_SOURCES =
 
+%canon_reldir%_octave_config_LDFLAGS = \
+  -pie
+
 nodist_%canon_reldir%_octave_config_SOURCES = %reldir%/octave-config.cc
 
 %canon_reldir%_octave_config_LDADD = \
openSUSE Build Service is sponsored by