Change-Id: I3bd2e4342a85a5d13887184820ca1432e15dff88
--- /dev/null
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index f0eadba..094d399 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -487,7 +487,7 @@ coverage-report: regen-grammar
+
+ # Build the interpreter
+ $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
+- $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
++ $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -pie -o $@ \
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
Source3: python.sh
Source4: python.csh
Source6: python_lib64.patch
+Source10: add_pie_compile_option.patch
Source1001: %name.manifest
%ifarch x86_64 aarch64
%{__patch} -p1 < %{SOURCE6}
%endif
+%{__patch} -p1 < %{SOURCE10}
# drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.ac