File: 0001-fix-buildflags.patch

package info (click to toggle)
unrar-nonfree 1%3A7.2.2-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 1,964 kB
  • sloc: cpp: 26,512; makefile: 712; sh: 11
file content (43 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Nick Andrik <nick.andrik@gmail.com>
Date: Mon, 21 Jan 2013 23:07:40 +0100
Subject: unrar-nonfree: Doesn't export build flags

Forwarded: not-needed
Closes: 694611
Source: unrar-nonfree
Version: 1:4.1.4-1
Thanks: Felix Geyer <fgeyer@debian.org>

Added hardening support (Closes: #694611)
---
 makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/makefile b/makefile
index f7fe61a..a309fe0 100644
--- a/makefile
+++ b/makefile
@@ -6,12 +6,12 @@
 # Thus we removed it. Clang ARM users can add -march=armv8-a+crypto to enable
 # ARM NEON crypto.
 CXX=c++
-CXXFLAGS=-O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+CXXFLAGS=-std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
 LIBFLAGS=-fPIC
 DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
 STRIP=strip
 AR=ar
-LDFLAGS=-pthread
+LDFLAGS+=-pthread
 DESTDIR=/usr
 
 ##########################
@@ -62,7 +62,7 @@ lib:	WHAT=RARDLL
 lib:	CXXFLAGS+=$(LIBFLAGS)
 lib:	$(OBJECTS) $(LIB_OBJ)
 	@rm -f libunrar.*
-	$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+	$(LINK) -Wl,-soname,libunrar.so.5 -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
 	$(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
 
 install-unrar: