summaryrefslogtreecommitdiff
path: root/package/openssl/patches/0001-openssl-parallel.patch
blob: d98196ee64487b8e01968a207340b95c8fca7dc5 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
diff -Nur openssl-1.0.2a.orig/crypto/Makefile openssl-1.0.2a/crypto/Makefile
--- openssl-1.0.2a.orig/crypto/Makefile	2015-03-19 14:31:02.000000000 +0100
+++ openssl-1.0.2a/crypto/Makefile	2015-05-25 15:20:59.000000000 +0200
@@ -85,11 +85,11 @@
 	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
 
 subdirs:
-	@target=all; $(RECURSIVE_MAKE)
+	+@target=all; $(RECURSIVE_MAKE)
 
 files:
 	$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
-	@target=files; $(RECURSIVE_MAKE)
+	+@target=files; $(RECURSIVE_MAKE)
 
 links:
 	@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
@@ -100,7 +100,7 @@
 # lib: $(LIB): are splitted to avoid end-less loop
 lib:	$(LIB)
 	@touch lib
-$(LIB):	$(LIBOBJ)
+$(LIB):	$(LIBOBJ) | subdirs
 	$(AR) $(LIB) $(LIBOBJ)
 	test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
 	$(RANLIB) $(LIB) || echo Never mind.
@@ -111,7 +111,7 @@
 	fi
 
 libs:
-	@target=lib; $(RECURSIVE_MAKE)
+	+@target=lib; $(RECURSIVE_MAKE)
 
 install:
 	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -120,7 +120,7 @@
 	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
 	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
 	done;
-	@target=install; $(RECURSIVE_MAKE)
+	+@target=install; $(RECURSIVE_MAKE)
 
 lint:
 	@target=lint; $(RECURSIVE_MAKE)
diff -Nur openssl-1.0.2a.orig/crypto/objects/Makefile openssl-1.0.2a/crypto/objects/Makefile
--- openssl-1.0.2a.orig/crypto/objects/Makefile	2015-03-19 14:31:02.000000000 +0100
+++ openssl-1.0.2a/crypto/objects/Makefile	2015-05-25 15:20:59.000000000 +0200
@@ -44,11 +44,11 @@
 # objects.pl both reads and writes obj_mac.num
 obj_mac.h: objects.pl objects.txt obj_mac.num
 	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
-	@sleep 1; touch obj_mac.h; sleep 1
 
-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
+# This doesn't really need obj_mac.h, but since that rule reads & writes
+# obj_mac.num, we can't run in parallel with it.
+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
 	$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
-	@sleep 1; touch obj_xref.h; sleep 1
 
 files:
 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
diff -Nur openssl-1.0.2a.orig/engines/Makefile openssl-1.0.2a/engines/Makefile
--- openssl-1.0.2a.orig/engines/Makefile	2015-03-19 14:31:14.000000000 +0100
+++ openssl-1.0.2a/engines/Makefile	2015-05-25 15:20:59.000000000 +0200
@@ -72,7 +72,7 @@
 
 all:	lib subdirs
 
-lib:	$(LIBOBJ)
+lib:	$(LIBOBJ) | subdirs
 	@if [ -n "$(SHARED_LIBS)" ]; then \
 		set -e; \
 		for l in $(LIBNAMES); do \
@@ -89,7 +89,7 @@
 
 subdirs:
 	echo $(EDIRS)
-	@target=all; $(RECURSIVE_MAKE)
+	+@target=all; $(RECURSIVE_MAKE)
 
 files:
 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -128,7 +128,7 @@
 			  mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
 		done; \
 	fi
-	@target=install; $(RECURSIVE_MAKE)
+	+@target=install; $(RECURSIVE_MAKE)
 
 tags:
 	ctags $(SRC)
diff -Nur openssl-1.0.2a.orig/Makefile.org openssl-1.0.2a/Makefile.org
--- openssl-1.0.2a.orig/Makefile.org	2015-03-19 14:30:36.000000000 +0100
+++ openssl-1.0.2a/Makefile.org	2015-05-25 15:20:59.000000000 +0200
@@ -274,17 +274,17 @@
 build_libs: build_crypto build_ssl build_engines
 
 build_crypto:
-	@dir=crypto; target=all; $(BUILD_ONE_CMD)
-build_ssl:
-	@dir=ssl; target=all; $(BUILD_ONE_CMD)
-build_engines:
-	@dir=engines; target=all; $(BUILD_ONE_CMD)
-build_apps:
-	@dir=apps; target=all; $(BUILD_ONE_CMD)
-build_tests:
-	@dir=test; target=all; $(BUILD_ONE_CMD)
-build_tools:
-	@dir=tools; target=all; $(BUILD_ONE_CMD)
+	+@dir=crypto; target=all; $(BUILD_ONE_CMD)
+build_ssl: build_crypto
+	+@dir=ssl; target=all; $(BUILD_ONE_CMD)
+build_engines: build_crypto
+	+@dir=engines; target=all; $(BUILD_ONE_CMD)
+build_apps: build_libs
+	+@dir=apps; target=all; $(BUILD_ONE_CMD)
+build_tests: build_libs
+	+@dir=test; target=all; $(BUILD_ONE_CMD)
+build_tools: build_libs
+	+@dir=tools; target=all; $(BUILD_ONE_CMD)
 
 all_testapps: build_libs build_testapps
 build_testapps:
diff -Nur openssl-1.0.2a.orig/test/Makefile openssl-1.0.2a/test/Makefile
--- openssl-1.0.2a.orig/test/Makefile	2015-03-19 14:31:16.000000000 +0100
+++ openssl-1.0.2a/test/Makefile	2015-05-25 15:20:59.000000000 +0200
@@ -133,7 +133,7 @@
 tags:
 	ctags $(SRC)
 
-tests:	exe apps $(TESTS)
+tests:	exe $(TESTS)
 
 apps:
 	@(cd ..; $(MAKE) DIRS=apps all)
@@ -529,7 +529,7 @@
 #	fi
 
 dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
-	@target=dummytest; $(BUILD_CMD)
+	+@target=dummytest; $(BUILD_CMD)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.