summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2019-12-04 13:54:57 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2019-12-04 13:55:01 +0900
commitb9fb77898f268ac4234febbd41048455c0b4cedb (patch)
treefa66b2d211f08b0a554e85f7013f1c4c0a16e8fd
parentd172070747b87bf4877c9ebed3344fed7ed620ce (diff)
downloaddos2unix-accepted/tizen_6.5_base.tar.gz
dos2unix-accepted/tizen_6.5_base.tar.bz2
dos2unix-accepted/tizen_6.5_base.zip
Change-Id: I4215888ca140a20dbfa02cf14fd865c3cf55fb78 Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
-rw-r--r--packaging/0001-Add-pie-option.patch33
-rw-r--r--packaging/dos2unix.spec4
2 files changed, 36 insertions, 1 deletions
diff --git a/packaging/0001-Add-pie-option.patch b/packaging/0001-Add-pie-option.patch
new file mode 100644
index 0000000..3ebfbc3
--- /dev/null
+++ b/packaging/0001-Add-pie-option.patch
@@ -0,0 +1,33 @@
+From 422004616c651c18b58e56d32993ddbb7db56c93 Mon Sep 17 00:00:00 2001
+From: Hyunjee Kim <hj0426.kim@samsung.com>
+Date: Wed, 4 Dec 2019 13:45:53 +0900
+Subject: [PATCH] Add pie option
+
+Change-Id: Ic2b940da22944eed94d3a50cb983c4af09339e02
+Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
+
+diff --git a/Makefile b/Makefile
+index 2892f11..7b84b9a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -322,7 +322,7 @@ endif
+ # PostScript and PDF generation from UTF-8 manuals is not working,
+ # or I don't know how to do it.
+
+-CFLAGS_USER =
++CFLAGS_USER = -fPIC
+ ifeq ($(DEBUG), 1)
+ CFLAGS ?= -O0
+ else
+@@ -357,7 +357,7 @@ ifdef LFS
+ EXTRA_CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ endif
+
+-LDFLAGS_USER =
++LDFLAGS_USER = -pie
+ LDFLAGS = $(RPM_LD_FLAGS) $(LDFLAGS_EXTRA) $(LDFLAGS_USER)
+ LIBS = $(LIBS_EXTRA)
+
+--
+2.17.1
+
diff --git a/packaging/dos2unix.spec b/packaging/dos2unix.spec
index 9d6108f..815a57e 100644
--- a/packaging/dos2unix.spec
+++ b/packaging/dos2unix.spec
@@ -6,7 +6,8 @@ Summary: Text converters to and from DOS/MAC to UNIX
Url: http://waterlan.home.xs4all.nl/dos2unix.html
Group: Productivity/Text/Convertors
Source: http://waterlan.home.xs4all.nl/dos2unix/dos2unix-%{version}.tar.gz
-Source1001: dos2unix.manifest
+Source1: 0001-Add-pie-option.patch
+Source1001: dos2unix.manifest
BuildRequires: gettext-tools
Provides: unix2dos = %{version}
Obsoletes: unix2dos < %{version}
@@ -22,6 +23,7 @@ format to DOS format and unix2dos converts from UNIX to MAC format.
%prep
%setup -q
cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1}
#find . -type f | xargs chmod -x
%build