Add pie compile option 76/252176/1 accepted/tizen/base/tool/20210131.232028 submit/tizen_base/20210125.072212 submit/tizen_base/20210305.044014
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 25 Jan 2021 07:20:12 +0000 (16:20 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 25 Jan 2021 07:20:12 +0000 (16:20 +0900)
Change-Id: Ie97081e9e7d193135f7d223c7aded49772c52b60

packaging/add_pie_compile_option.patch [new file with mode: 0644]
packaging/python3-base.spec
packaging/python3.spec

diff --git a/packaging/add_pie_compile_option.patch b/packaging/add_pie_compile_option.patch
new file mode 100644 (file)
index 0000000..04376e6
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 789df36e..ae403066 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2755,7 +2755,7 @@ then
+           LINKFORSHARED="-Wl,-E -Wl,+s";;
+ #         LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
+       Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
+-      Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
++      Linux*|GNU*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
+       # -u libsys_s pulls in all symbols in libsys
+       Darwin/*)
+               LINKFORSHARED="$extra_undefs -framework CoreFoundation"
index 9dc739b94559899a87e06f0816bc701b941a24d3..db89c9d7dd27e9f46988b7100e070e8608519130 100644 (file)
@@ -88,6 +88,7 @@ Source7:        python3.csh
 Source8:        macros.python3.py
 Source9:        import_failed.py
 Source10:       import_failed.map
+Source11:       add_pie_compile_option.patch
 
 
 # The following files are not used in the build.
@@ -238,6 +239,7 @@ other applications.
 
 %prep
 %setup -q -n %{tarname}
+%{__patch} -p1 < %{SOURCE11}
 
 ### COMMON-PREP-BEGIN ###
 
index d22f22585ae1426a12459c3aa16a5067cc32b41d..abb714fa8e911319c56bb0d6fb6afba50b02ad58 100644 (file)
@@ -68,6 +68,7 @@ Group:          Development/Languages/Python
 Url:            http://www.python.org/
 Source0:        http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz
 #Source1:        http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz.asc
+Source10:       add_pie_compile_option.patch
 
 BuildRequires:  automake
 BuildRequires:  fdupes
@@ -153,6 +154,8 @@ Console User Interface.
 
 %prep
 %setup -q -n %{tarname}
+%{__patch} -p1 < %{SOURCE10}
+
 ### COMMON-PREP-BEGIN ###
 
 # drop Autoconf version requirement