summarylogtreecommitdiffstats
path: root/makefile.patch
diff options
context:
space:
mode:
authorKirill2019-05-17 00:49:19 +0300
committerKirill2019-05-17 00:49:19 +0300
commit476dcb2a124652ee1e13dc1c4255e251133bdc4f (patch)
treea9985c47d9a64ebfe434a6b4edab9381ac0c8f69 /makefile.patch
parenta0c70aa4b95ba7f6e878003828c3109c279330f4 (diff)
downloadaur-476dcb2a124652ee1e13dc1c4255e251133bdc4f.tar.gz
Fixing SIGSEGV caused by linker
Diffstat (limited to 'makefile.patch')
-rw-r--r--makefile.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 000000000000..3786b0a36cd7
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,49 @@
+--- Makefile.proto 2015-07-21 23:15:10.000000000 +0300
++++ Makefile 2019-05-09 20:08:49.139698846 +0300
+@@ -31,8 +31,8 @@
+ # If using OpenSSL, uncomment the following 3 lines.
+ ##
+ #CRYPTO_CFLAGS =
+-#CRYPTO_OBJS = secure_random_openssl.o
+-#CRYPTO_LIBS = -lcrypto
++CRYPTO_OBJS = secure_random_openssl.o
++CRYPTO_LIBS = -lcrypto
+
+ ##
+ # If using cryptlib, uncomment the following 3 lines.
+@@ -45,7 +45,7 @@
+ # Change PREFIX to install to different directories. The binary is installed
+ # in $PREFIX/bin, and the man in $PREFIX/man/man1
+ ##
+-PREFIX = /usr/local
++PREFIX ?= /usr
+
+ ##
+ # On some operating systems (most notably Linux 2.6 kernels) using mlockall
+@@ -60,12 +60,13 @@
+ # Sometimes you have only dynamic libraries available. In that case COMMENT
+ # the following line.
+ ##
+-LINK_STATIC = -static
++#LINK_STATIC = -static
+
+ ##############################################################################
+ # NO USER MODIFIABLE PARTS AFTER THIS POINT
+ ##############################################################################
+-CFLAGS = -Wall $(CRYPTO_INCLUDE_PATH) $(CRYPTO_CFLAGS) $(NO_MLOCKALL)
++CFLAGS := ${CFLAGS} -Wall $(CRYPTO_INCLUDE_PATH) $(CRYPTO_CFLAGS) $(NO_MLOCKALL)
++#LDFLAGS on my system results in libcrypto catching SIGSEGV
+ LDFLAGS = $(CRYPTO_LIBRARY_PATH) $(LINK_STATIC) $(CRYPTO_LIBS) -lm
+
+ .PHONY : all install-strip install clean
+@@ -75,8 +76,9 @@
+
+ all: secpwgen
+
++#libcrypto catches SIGSEGV if linked with cc.
+ secpwgen: $(OBJS)
+- $(CC) -o $@ $(OBJS) $(LDFLAGS)
++ $(CXX) -o $@ $(OBJS) $(LDFLAGS)
+
+ install-strip: secpwgen
+ strip secpwgen